On Mon, Jun 10, 2019 at 03:48:24PM +0800, Hao Xu wrote:
> remove inb_p and outb_p to call readq/writeq directly.
>
> Signed-off-by: Hao Xu
> ---
> Changes in v2:
> - remove the macros inb_p/outb_p and use readq/writeq directly, per
> https://lkml.kernel.org/lkml/20190608134505.ga...@arch-01.home
On Sat, Jun 08, 2019 at 03:27:46PM +0800, Hao Xu wrote:
> modify void* to void * for #define inb_p(a) readq((void*)a)
> and #define outb_p(d,a) writeq(d,(void*)a)
>
> Signed-off-by: Hao Xu
> ---
> drivers/staging/kpc2000/kpc2000_i2c.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
The structure kp_spi_controller_state, defined in the kpc2000_spi
driver, contains a member named chip_select which is never used after
initialization. Therefore, it should be removed for simplicity's sake.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 2 --
1
operation.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c
b/drivers/staging/kpc2000/kpc2000_spi.c
index 4f517afc6239..28132e9e260d 100644
--- a/drivers/staging/kpc2000
The structure kp_spi_controller_state, defined in the kpc2000_spi
driver, contains a member named phys which is never used after
initialization. Therefore, it should be removed for simplicity's sake.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 2 --
1 file ch
The structure kp_spi_controller_state, defined in the kpc2000_spi
driver, contains a member named word_len which is never used after
initialization. Therefore, it should be removed for simplicity's sake.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 3 ---
1
a (u64 __iomem *), just remove this intermediate
step. As this intermediary is no longer used, also remove it from its
structure.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging
Primarily just a bunch of unused / unnecessarily used struct member
cleanup patches with the exception of one patch which removes an
unnecessary cast to a (void *) in a couple of functions.
Geordan Neukum (6):
staging: kpc2000: kpc_spi: remove unnecessary struct member phys
staging: kpc2000
The structure kpc_spi, defined in in the kpc2000_spi driver, contains
a member named pin_dir which is never used after initialization.
Therefore, it should be removed for simplicity's sake.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 2 --
1 file chang
The kp_spi structure contains a member 'fifo_depth'. This member is
never used. Therefore, it should be removed.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c
b/drive
The static function kp_spi_bytes_per_word() is defined in kpc2000_spi.c,
but it is completely unused. As this function is unused, it can and
should be removed.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 14 --
1 file changed, 14 deletions(-)
diff
The linux style guide prescribes that switch statements and their
subordinate case labels should be column-aligned rather than
double-indenting the case label. Make kpc2000_spi.c follow the desired
style with respect to switch/case alignment.
Signed-off-by: Geordan Neukum
---
drivers/staging
The kpc_spi driver does not unmap its I/O space upon error cases in the
probe() function or upon remove(). Make the driver clean up after itself
more maintainably by migrating to using the managed resource API.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 3 ++-
1
This patch set contains a few small fixups to the kpc_spi driver. There
is certainly nothing groundbreaking in this patch set. It is limited to
style fixups, removing unused things, and using the managed resource API
for mapping I/O space.
Geordan Neukum (5):
staging: kpc2000: kpc_spi: Remove
The kpc2000_spi.c file contains instances of unnecessary consecutive
newlines which negatively impact the readability of the file. Remove
all unnecessary consecutive newlines.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_spi.c | 13 -
1 file changed, 13
The kpc2000 driver does not verify whether or not mapping the I/O
space succeeded during probe time. Make the driver verify that the
mapping operation was successful before potentially using that area
in the future.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 2
The kpc_i2c driver attempts to map its I/O space without verifying
whether or not the result of platform_get_resource() is NULL. Make the
driver check that platform_get_resource did not return NULL before
attempting to use the value returned to map an I/O space.
Signed-off-by: Geordan Neukum
of type: struct i2c_device.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c
b/drivers/staging/kpc2000/kpc2000_i2c.c
index 2c272ad8eca6..b2a9cda05f1b 100644
--- a/drivers/staging
The kpc2000_i2c.c file contains instances of unnecessary consecutive
newlines which impact the readability of the file. Remove these
unnecessary newlines.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/drivers
In pi2c_probe, a rw_sem is initialized and stashed off in the
i2c_device private runtime state struct. This rw_sem is never used
after initialization. Remove the rw_sem and cleanup unneeded header
inclusion.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 3 ---
1 file
The kpc_i2c driver does not unmap its I/O space upon error cases in the
probe() function or upon remove(). Make the driver clean up after itself
more maintainably by using the managed resource API.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 4 +++-
1 file changed
meant to be accessible in driver callbacks.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c
b/drivers/staging/kpc2000/kpc2000_i2c.c
index 1767f351a116
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c
b/drivers/staging/kpc2000/kpc2000_i2c.c
index b2a9cda05f1b..1d100bb7c548 100644
--- a/drivers/staging/k
This series contains some patches aimed toward:
- cleaning up unused/unneeded parts of driver state
- a couple of small style fixups
- a couple of API changes
- better error handling in probe()
in the kpc2000 i2c driver.
Geordan Neukum (8):
staging: kpc2000: kpc_i2c: Remove unused rw_sem
On Fri, May 24, 2019 at 2:38 AM Geordan Neukum wrote:
> + depends on MFD_CORE
In order for this to work in menuconfig, this either needs to be a
select or I need to
add a prompt to MFD_CORE. I don't have strong feelings either way, but all other
Kconfig options which are relate
The kpc2000 core makes calls against functions conditionally exported
upon selection of the kconfig symbol MFD_CORE. Therefore, the kpc2000
core depends upon the mfd_core, and that dependency must be tracked in
Kconfig to avoid potential build issues.
Signed-off-by: Geordan Neukum
---
v2 changes
at I'm familiar with all of the different
build bots out there so I can't even begin to speculate on that one.
If someone could point me in the right direction there, I'd be happy
to investigate further.
Thanks again for your feedback all,
Geordan Neukum
The module parameter 'disable_features' is currently unused. Therefore,
it should be removed.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c
b/drivers/stagi
Attached are an assortment of minor updates to the kpc_i2c driver as
well as a build fix for all of those who will need the KPC2000 core.
Thanks,
Geordan
Geordan Neukum (6):
staging: kpc2000: make kconfig symbol 'KPC2000' select dependencies
staging: kpc2000: kpc_i2c: remove unu
-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 26 --
1 file changed, 26 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c
b/drivers/staging/kpc2000/kpc2000_i2c.c
index 5d98ed54c05c..f9259c06b605 100644
--- a/drivers/staging/kpc2000
Rather than include asm/io.h, include linux/io.h. Issue reported
by the script checkpatch.pl.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/kpc2000/kpc2000_i2c.c
b/drivers/staging
kpc_i2c.c declares:
- two functions
- pi2c_probe()
- pi2c_remove()
- one struct
- i2c_plat_driver_i
which are local to the file, yet missing the static qualifier. Add the
static qualifier to these symbols.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c
.
2) That the declaration of variables local to a given function
should be immediately followed by a blank newline. Therefore,
the single instance of this in kpc2000_i2c.c should be fixed
up.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc2000_i2c.c | 82
y select its
hard dependencies.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/Kconfig | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/staging/kpc2000/Kconfig b/drivers/staging/kpc2000/Kconfig
index fb5922928f47..8992dc67ff37 100644
--- a/drivers/staging/kpc2000/Kconfig
> On Mon, May 20, 2019 at 10:30:26AM +0200, Greg Kroah-Hartman wrote:
>
> All now queued up. I'll rebase my patches that move this file on top of
> yours, as kbuild found some problems with mine, and I'll resend them to
> the list.
>
> Thanks.
** Same content as last reply, just realized that I h
On Mon, May 20, 2019 at 10:30:26AM +0200, Greg Kroah-Hartman wrote:
> On Sat, May 18, 2019 at 02:29:55AM +0000, Geordan Neukum wrote:
> > Attached are an assortment of updates to the kpc_i2c driver in the
> > staging subtree.
>
> All now queued up. I'll rebase my patc
On Fri, May 17, 2019 at 07:58:19PM -0700, Joe Perches wrote:
> On Sat, 2019-05-18 at 02:29 +0000, Geordan Neukum wrote:
> > Throughout i2c_driver.c, there are instances where the log strings
> > contain the function's name hardcoded into the string. Instead, use the
> > p
Throughout i2c_driver.c, there are instances where the log strings
contain the function's name hardcoded into the string. Instead, use the
printk conversion specifier '%s' with the __func__ preprocessor
identifier to more maintainably print the function's name.
Signed-of
i2c_driver.c uses a mixture of space and tab indentations which
conflicts with the kernel coding style guide. Reindent i2c_driver.c.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 1014 +-
1 file changed, 507 insertions(+), 507 deletions
t style that is more consistent with the
prescribed guidelines.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 36
1 file changed, 21 insertions(+), 15 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
b/drivers/staging/kpc2000/
of the file. I attempted to look at some other drivers in the i2c
subsystem for inspiration, but I'd be happy to drop this isn't as simple
an update as it seems.
Patch 3 addresses a potential bug in the cleanup of memory allocated in
the probe method.
Geordan Neukum (5):
staging: k
The copyright header in i2c_driver.c is difficult to read and not
chronologically ordered. Reformat and reorganize the copyright header
to be similar to other drivers in the i2c subsystem.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 30
freeing of the memory in the remove() function.
Signed-off-by: Geordan Neukum
---
drivers/staging/kpc2000/kpc_i2c/i2c_driver.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
b/drivers/staging/kpc2000/kpc_i2c/i2c_driver.c
index
43 matches
Mail list logo