[PATCH 0/2] staging: erofs: fixed -Wmissing-prototype warnings.

2019-01-07 Thread Jeremy Sowden
Fixes for -Wmissing-prototype warnings in the erofs driver. One group of functions have been made static; for the second, prototypes have been moved to a head Jeremy Sowden (2): staging: erofs: fixed -Wmissing-prototype warnings. staging: erofs: fixed -Wmissing-prototype warnings. drivers

[PATCH 1/2] staging: erofs: fixed -Wmissing-prototype warnings.

2019-01-07 Thread Jeremy Sowden
) ^~~~ drivers/staging/erofs/unzip_vle_lz4.c:16:5: warning: no previous prototype for ‘z_erofs_unzip_lz4’ [-Wmissing-prototypes] int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen) ^ Signed-off-by: Jeremy Sowden --- drivers/staging/erofs/unzip_vle.c | 2

[PATCH 2/2] staging: erofs: fixed -Wmissing-prototype warnings.

2019-01-07 Thread Jeremy Sowden
) ^~~~ drivers/staging/erofs/unzip_vle.c:1702:5: warning: no previous prototype for ‘z_erofs_map_blocks_iter’ [-Wmissing-prototypes] int z_erofs_map_blocks_iter(struct inode *inode, ^~~ Signed-off-by: Jeremy Sowden --- drivers/staging/erofs/data.c

[PATCH v2 2/2] staging: erofs: fixed -Wmissing-prototype warnings by moving prototypes to header file.

2019-01-08 Thread Jeremy Sowden
) ^~~~ drivers/staging/erofs/unzip_vle.c:1702:5: warning: no previous prototype for ‘z_erofs_map_blocks_iter’ [-Wmissing-prototypes] int z_erofs_map_blocks_iter(struct inode *inode, ^~~ Signed-off-by: Jeremy Sowden --- drivers/staging/erofs/data.c

[PATCH v2 0/2] staging: erofs: fixed -Wmissing-prototype warnings.

2019-01-08 Thread Jeremy Sowden
Fixes for -Wmissing-prototype warnings in the erofs driver. One group of functions have been made static; for the second, prototypes have been moved to a header file. Changes since v1: * amended commit messages to ensure distinct e-mail subjects. Jeremy Sowden (2): staging: erofs: fixed

[PATCH v2 1/2] staging: erofs: fixed -Wmissing-prototype warnings by making functions static.

2019-01-08 Thread Jeremy Sowden
) ^~~~ drivers/staging/erofs/unzip_vle_lz4.c:16:5: warning: no previous prototype for ‘z_erofs_unzip_lz4’ [-Wmissing-prototypes] int z_erofs_unzip_lz4(void *in, void *out, size_t inlen, size_t outlen) ^ Signed-off-by: Jeremy Sowden --- drivers/staging/erofs/unzip_vle.c | 2

[PATCH] staging: ks7010: removed custom Michael MIC implementation.

2019-02-28 Thread Jeremy Sowden
Changed the driver to use the kernel's own implementation. Signed-off-by: Jeremy Sowden --- drivers/staging/ks7010/Makefile | 2 +- drivers/staging/ks7010/TODO | 2 - drivers/staging/ks7010/ks_hostif.c | 111 +++ drivers/staging/ks7010/michael_mic.c

Re: [PATCH] staging: ks7010: removed custom Michael MIC implementation.

2019-02-28 Thread Jeremy Sowden
On 2019-02-28, at 19:17:03 +0100, Greg Kroah-Hartman wrote: > On Thu, Feb 28, 2019 at 11:15:56AM +0000, Jeremy Sowden wrote: > > Changed the driver to use the kernel's own implementation. > > > > Signed-off-by: Jeremy Sowden > > --- > > drivers/staging/ks70

[PATCH] staging: fbtft: fixed format-string errors.

2019-03-07 Thread Jeremy Sowden
Added __printf attribute to declaration of fbtft_dbg_hex and fixed mismatches between format-specifiers and arguments in several function calls. Signed-off-by: Jeremy Sowden --- drivers/staging/fbtft/fbtft-io.c | 12 ++-- drivers/staging/fbtft/fbtft.h| 1 + 2 files changed, 7

[PATCH v2] staging: fbtft: fixed format-string errors.

2019-03-08 Thread Jeremy Sowden
Added __printf attribute to declaration of fbtft_dbg_hex and fixed mismatches between format-specifiers and arguments in several function calls. Signed-off-by: Jeremy Sowden --- Since v1: * fixed some mismatches that I missed but were picked up by the kbuild test robot. drivers/staging

Re: [PATCH] staging: iio: adc: ad7192: Add spaces around minus operator

2019-03-11 Thread Jeremy Sowden
On 2019-03-11, at 11:31:59 +0300, Dan Carpenter wrote: > On Mon, Mar 11, 2019 at 10:12:48AM +0200, Alexandru Ardelean wrote: > > On Sun, Mar 10, 2019 at 11:23 PM Karen Palacio > > wrote: > > > > > > Add spaces around minus operator to fix readibility. > > > > > > Signed-off-by: Karen Palacio > >

Re: [PATCH] staging: ks7010: remove redundant auth_type check

2019-03-18 Thread Jeremy Sowden
iv->rx_size, > + 0, mic); > + if (ret < 0) > + return ret; > if (memcmp(mic, recv_mic, sizeof(mic)) != 0) { > now = jiffies; > mic_failure = &priv->wpa.mic_failure; Acked-by: Jeremy Sowden ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 2/2] staging: kpc2000_spi: eliminated duplicate initialization of master local variable.

2019-04-27 Thread Jeremy Sowden
master was being initialized to a particular value and then having the same value assigned to it immediately afterwards. Removed the initializer. Since the value assigned to master was dynamically allocated, this fixes a memory-leak. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000

[PATCH 0/2] staging: kpc2000_spi: eliminated duplicate initialization of two local variables.

2019-04-27 Thread Jeremy Sowden
A couple of the local variables in kp_spi_probe had initializers which were being overwritten by immediate assignment of the same values. One of them was dynamically allocated and so would leak memory. Checkpatch whinges about the formatting, but fixing that would be rather a large job. Jeremy

[PATCH 1/2] staging: kpc2000_spi: eliminated duplicate initialization of drvdata local variable.

2019-04-27 Thread Jeremy Sowden
drvdata was being initialized to a particular value and then having the same value assigned to it immediately afterwards. Removed the initializer. Since the value assigned, pldev->dev.platform_data, is a pointer-to- void, removed superfluous cast. Signed-off-by: Jeremy Sowden --- driv

[PATCH 0/5] staging: kpc2000: assorted fixes

2019-05-15 Thread Jeremy Sowden
and third patches contain fixes for some sparse warnings. The last two patches contain the actual error-handling fixes. Jeremy Sowden (5): staging: kpc2000: inverted conditional in order to reduce indentation. staging: kpc2000: declare two functions as static. staging: kpc2000: added

[PATCH 4/5] staging: kpc2000: added missing clean-up to probe_core_uio.

2019-05-15 Thread Jeremy Sowden
On error, probe_core_uio just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c | 3

[PATCH 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Jeremy Sowden
: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c index 30e6f176ddfa..9cb745f4323a 100644 --- a/drivers/staging/kpc2000

[PATCH 2/5] staging: kpc2000: declare two functions as static.

2019-05-15 Thread Jeremy Sowden
00/kpc2000/cell_probe.c:288:5: warning: symbol 'probe_core_uio' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc

[PATCH 1/5] staging: kpc2000: inverted conditional in order to reduce indentation.

2019-05-15 Thread Jeremy Sowden
Changed: for (...) { ... if (expr) { ... } } into: for (...) { ... if (!expr) continue; ... } in order to reduce indentation of conditional block. Fixed indentation of cases blocks at the same time. Signed-off-by: Jeremy Sowden --- drivers

[PATCH 5/5] staging: kpc2000: clean up after probe failure.

2019-05-15 Thread Jeremy Sowden
On error, kp2000_probe_cores just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c

[PATCH v2 1/5] staging: kpc2000: inverted conditional in order to reduce indentation.

2019-05-15 Thread Jeremy Sowden
Changed: for (...) { ... if (expr) { ... } } into: for (...) { ... if (!expr) continue; ... } in order to reduce indentation of conditional block. Fixed indentation of cases blocks at the same time. Signed-off-by: Jeremy Sowden --- drivers

[PATCH v2 2/5] staging: kpc2000: declare two functions as static.

2019-05-15 Thread Jeremy Sowden
00/kpc2000/cell_probe.c:288:5: warning: symbol 'probe_core_uio' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/kpc2000/kpc

[PATCH v2 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Jeremy Sowden
: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c index 30e6f176ddfa..b98d53c8637f 100644 --- a/drivers/staging/kpc2000

[PATCH v2 4/5] staging: kpc2000: added missing clean-up to probe_core_uio.

2019-05-15 Thread Jeremy Sowden
On error, probe_core_uio just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c | 3

[PATCH v2 0/5] staging: kpc2000: assorted fixes

2019-05-15 Thread Jeremy Sowden
and third patches contain fixes for some sparse warnings. The last two patches contain the actual error-handling fixes. Jeremy Sowden (5): staging: kpc2000: inverted conditional in order to reduce indentation. staging: kpc2000: declare two functions as static. staging: kpc2000: added

[PATCH v2 5/5] staging: kpc2000: clean up after probe failure.

2019-05-15 Thread Jeremy Sowden
On error, kp2000_probe_cores just returned an error without freeing resources which had previously been allocated. Added the missing clean-up code. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000/kpc2000/cell_probe.c

Re: [PATCH 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Jeremy Sowden
On 2019-05-15, at 14:11:53 +0300, Dan Carpenter wrote: > On Wed, May 15, 2019 at 02:09:49PM +0300, Dan Carpenter wrote: > > On Wed, May 15, 2019 at 11:34:52AM +0100, Jeremy Sowden wrote: > > > diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c > > > b/driv

Re: [PATCH v2 1/5] staging: kpc2000: inverted conditional in order to reduce indentation.

2019-05-15 Thread Jeremy Sowden
On 2019-05-15, at 15:14:51 +0200, Greg KH wrote: > On Wed, May 15, 2019 at 12:14:33PM +0100, Jeremy Sowden wrote: > > Changed: > > > > for (...) { > > ... > > if (expr) { > > ... > > } > > } > > > > into: > >

[PATCH 04/11] staging: kpc2000: removed two kpc_uio_class device attributes.

2019-05-16 Thread Jeremy Sowden
The show functions of two attributes output nothing. Removed them. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000

[PATCH 09/11] staging: kpc2000: formatting fixes for kp device attributes.

2019-05-16 Thread Jeremy Sowden
Fixed indentation of cpld_reconfigure store call-back and definition of attribute list. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 51 ++ 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c

[PATCH 08/11] staging: kpc2000: add separate show functions for readable kp device attributes.

2019-05-16 Thread Jeremy Sowden
Define separate simple show functions for each attribute instead of having a one big one containing a chain of conditionals. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 91 +++--- 1 file changed, 67 insertions(+), 24 deletions(-) diff --git a

[PATCH 06/11] staging: kpc2000: use atomic_t to assign card numbers.

2019-05-16 Thread Jeremy Sowden
Previously the next card number was assigned from a static int local variable, which was read and later incremented. This was not thread- safe, so now we use an atomic_t and atomic_fetch_add instead. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1

[PATCH 03/11] staging: kpc2000: define all kpc_uio_class device attributes as read-only.

2019-05-16 Thread Jeremy Sowden
All of the device attributes are read-only, so use DEVICE_ATTR_RO to define them. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c

[PATCH 02/11] staging: kpc2000: add separate show functions for kpc_uio_class device attributes.

2019-05-16 Thread Jeremy Sowden
Define separate simple show functions for each attribute instead of having a one big one containing a chain of conditionals. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 138 --- 1 file changed, 92 insertions(+), 46 deletions(-) diff --git a

[PATCH 00/11] staging: kpc2000: another batch of fixes

2019-05-16 Thread Jeremy Sowden
These apply on top of the ones I sent earlier this week, which are currently in the staging-test branch. There's one white-space patch, a number relating to device attributes and one that fixes a race affecting the assignment of card numbers. Jeremy Sowden (11): staging: kpc2000: re

[PATCH 07/11] staging: kpc2000: simplified kp2000_device retrieval in device attributes call-backs.

2019-05-16 Thread Jeremy Sowden
ard); // ... err = sysfs_create_files(&(pdev->dev.kobj), kp_attr_list); Therefore, to_pci_dev and pci_get_drvdata cannot return NULL, and pcard can be initialized directly from dev: struct kp2000_device *pcard = dev_get_drvdata(dev); Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2

[PATCH 01/11] staging: kpc2000: removed trailing white-space.

2019-05-16 Thread Jeremy Sowden
Removed trailing white-space from four files. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 62 ++--- drivers/staging/kpc2000/kpc2000/core.c | 98 ++-- drivers/staging/kpc2000/kpc2000/fileops.c| 2 +- drivers/staging/kpc2000

[PATCH 05/11] staging: kpc2000: declare all kpc_uio_class device attributes as static.

2019-05-16 Thread Jeremy Sowden
27;dev_attr_core_num' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kp

[PATCH 10/11] staging: kpc2000: define read-only kp device attributes as read-only.

2019-05-16 Thread Jeremy Sowden
Most of the device attributes are read-only, so use DEVICE_ATTR_RO to define them. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers

[PATCH 11/11] staging: kpc2000: declare all kp device attributes as static.

2019-05-16 Thread Jeremy Sowden
ld it be static? drivers/staging/kpc2000/kpc2000/core.c:161:1: warning: symbol 'dev_attr_cpld_reconfigure' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) dif

Re: [PATCH 02/11] staging: kpc2000: add separate show functions for kpc_uio_class device attributes.

2019-05-16 Thread Jeremy Sowden
On 2019-05-16, at 20:17:51 +, Matt Sickler wrote: > >-Original Message- > >From: devel On Behalf Of > >Define separate simple show functions for each attribute instead of having a > >one big one containing a chain of conditionals. > > > >+static ssize_t s2c_dma_ch_show(struct device *d

Re: [PATCH 02/11] staging: kpc2000: add separate show functions for kpc_uio_class device attributes.

2019-05-16 Thread Jeremy Sowden
On 2019-05-16, at 22:45:33 +0200, Greg KH wrote: > On Thu, May 16, 2019 at 09:04:02PM +0100, Jeremy Sowden wrote: > > Define separate simple show functions for each attribute instead of > > having a one big one containing a chain of conditionals. > > There's noth

[PATCH v2 6/9] staging: kpc2000: simplified kp2000_device retrieval in device attributes call-backs.

2019-05-16 Thread Jeremy Sowden
ard); // ... err = sysfs_create_files(&(pdev->dev.kobj), kp_attr_list); Therefore, to_pci_dev and pci_get_drvdata cannot return NULL, and pcard can be initialized directly from dev: struct kp2000_device *pcard = dev_get_drvdata(dev); Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2

[PATCH v2 8/9] staging: kpc2000: add separate show functions for readable kp device attributes, and defined them as read-only.

2019-05-16 Thread Jeremy Sowden
. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 89 +++--- 1 file changed, 66 insertions(+), 23 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index 6147c47c44ab..6fa3dd6531ef 100644 --- a

[PATCH v2 9/9] staging: kpc2000: declare all kp device attributes as static.

2019-05-16 Thread Jeremy Sowden
ld it be static? drivers/staging/kpc2000/kpc2000/core.c:161:1: warning: symbol 'dev_attr_cpld_reconfigure' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) dif

[PATCH v2 0/9] staging: kpc2000: another batch of fixes

2019-05-16 Thread Jeremy Sowden
These apply on top of the ones I sent earlier this week, which are currently in the staging-test branch. There's one white-space patch, a number relating to device attributes and one that fixes a race affecting the assignment of card numbers. Jeremy Sowden (9): staging: kpc2000: re

[PATCH v2 7/9] staging: kpc2000: formatting fixes for kp device attributes.

2019-05-16 Thread Jeremy Sowden
Fixed indentation of cpld_reconfigure store call-back and definition of attribute list. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 55 ++ 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c

[PATCH v2 5/9] staging: kpc2000: use atomic_t to assign card numbers.

2019-05-16 Thread Jeremy Sowden
Previously the next card number was assigned from a static int local variable, which was read and later incremented. This was not thread- safe, so now we use an atomic_t and atomic_fetch_add instead. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1

[PATCH v2 2/9] staging: kpc2000: add separate show functions for kpc_uio_class device attributes and defined them as read-only.

2019-05-16 Thread Jeremy Sowden
to define them. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 136 --- 1 file changed, 90 insertions(+), 46 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c index 6a2ebdf20113

[PATCH v2 3/9] staging: kpc2000: declare all kpc_uio_class device attributes as static.

2019-05-16 Thread Jeremy Sowden
27;dev_attr_core_num' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/st

[PATCH v2 4/9] staging: kpc2000: removed two kpc_uio_class device attributes.

2019-05-16 Thread Jeremy Sowden
The show functions of two attributes output nothing and they are unused. Removed them. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers

[PATCH v2 1/9] staging: kpc2000: removed trailing white-space.

2019-05-16 Thread Jeremy Sowden
Removed trailing white-space from four files. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 62 ++--- drivers/staging/kpc2000/kpc2000/core.c | 98 ++-- drivers/staging/kpc2000/kpc2000/fileops.c| 2 +- drivers/staging/kpc2000

[PATCH v3 1/6] staging: kpc2000: add separate show functions for kpc_uio_class device attributes, defined them as read-only and declared them static.

2019-05-17 Thread Jeremy Sowden
ing: symbol 'dev_attr_core_num' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 135 --- 1 file changed, 89 insertions(+), 46 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c

[PATCH v3 5/6] staging: kpc2000: add separate show functions for readable kp device attributes, defined them as read-only, and declared them static.

2019-05-17 Thread Jeremy Sowden
ld it be static? drivers/staging/kpc2000/kpc2000/core.c:161:1: warning: symbol 'dev_attr_cpld_reconfigure' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 89 +++--- 1 file changed, 66 insertions(+), 23 de

[PATCH v3 3/6] staging: kpc2000: simplified kp2000_device retrieval in device attributes call-backs.

2019-05-17 Thread Jeremy Sowden
ard); // ... err = sysfs_create_files(&(pdev->dev.kobj), kp_attr_list); Therefore, to_pci_dev and pci_get_drvdata cannot return NULL, and pcard can be initialized directly from dev: struct kp2000_device *pcard = dev_get_drvdata(dev); Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2

[PATCH v3 4/6] staging: kpc2000: formatting fixes for kp device attributes.

2019-05-17 Thread Jeremy Sowden
Fixed indentation of cpld_reconfigure store call-back and definition of attribute list. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 55 ++ 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c

[PATCH v3 0/6] staging: kpc2000: another batch of fixes

2019-05-17 Thread Jeremy Sowden
These apply on top of the ones I sent earlier this week, which are currently in the staging-test branch. There are a number relating to device attributes and one that fixes a race affecting the assignment of card numbers. Jeremy Sowden (6): staging: kpc2000: add separate show functions for

[PATCH v3 2/6] staging: kpc2000: removed two kpc_uio_class device attributes.

2019-05-17 Thread Jeremy Sowden
The show functions of two attributes output nothing and they are unused. Removed them. Signed-off-by: Jeremy Sowden Reported-by: Matt Sickler --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000

[PATCH v3 6/6] staging: kpc2000: use IDA to assign card numbers.

2019-05-17 Thread Jeremy Sowden
Previously the next card number was assigned from a static int local variable, which was read and later incremented. This was not thread- safe, so now we use an IDA instead. Updated TODO. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 1 - drivers/staging/kpc2000

Re: [PATCH v3 3/6] staging: kpc2000: simplified kp2000_device retrieval in device attributes call-backs.

2019-05-17 Thread Jeremy Sowden
On 2019-05-17, at 13:54:51 +0200, Greg KH wrote: > On Fri, May 17, 2019 at 12:03:12PM +0100, Jeremy Sowden wrote: > > The call-backs used the same recipe to get the pcard from dev: > > > > struct pci_dev *pdev = to_pci_dev(dev); > > struct kp2000_device *pcard;

Re: [PATCH v3 6/6] staging: kpc2000: use IDA to assign card numbers.

2019-05-17 Thread Jeremy Sowden
On 2019-05-17, at 13:50:13 +0200, Greg KH wrote: > On Fri, May 17, 2019 at 12:03:15PM +0100, Jeremy Sowden wrote: > > Previously the next card number was assigned from a static int local > > variable, which was read and later incremented. This was not > > thread- safe,

[PATCH 4/8] staging: kpc2000: added a helper to get struct kp2000_device from struct device.

2019-05-20 Thread Jeremy Sowden
. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 29 -- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index d4af5a643a7b..c33595cc1332 100644 --- a

[PATCH v4 0/8] staging: kpc2000: another batch of fixes

2019-05-20 Thread Jeremy Sowden
them and split them into two patches because I was doing two different things in the previous patch. I *think* they are correct, but I've moved them to the end of the series in case I really have just got the wrong end of the stick, so they can easily be dropped. Jeremy Sowden (8): stagin

[PATCH 5/8] staging: kpc2000: added separate show functions for readable kp device attributes, defined them as read-only, and declared them static.

2019-05-20 Thread Jeremy Sowden
ld it be static? drivers/staging/kpc2000/kpc2000/core.c:161:1: warning: symbol 'dev_attr_cpld_reconfigure' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 106 + 1 file changed, 73 insertions(+), 33 de

[PATCH 2/8] staging: kpc2000: removed two kpc_uio_class device attributes.

2019-05-20 Thread Jeremy Sowden
The show functions of two attributes output nothing and they are unused. Removed them. Signed-off-by: Jeremy Sowden Reported-by: Matt Sickler --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000

[PATCH v4 1/8] staging: kpc2000: added separate show functions for kpc_uio_class device attributes, defined them as read-only and declared them static.

2019-05-20 Thread Jeremy Sowden
1: warning: symbol 'dev_attr_core_num' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 135 --- 1 file changed, 89 insertions(+), 46 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c

[PATCH 7/8] staging: kpc2000: simplified kp2000_device retrieval in device attribute call-backs.

2019-05-20 Thread Jeremy Sowden
pci_get_drvdata just calls dev_get_drvdata on the dev member of pdev, this is equivalent to: struct kp2000_device *pcard = dev_get_drvdata(&(container_of(dev, struct pci_dev, dev)->dev)); and we can simplify it to: struct kp2000_device *pcard = dev_get_drvdata(dev); Signed-off-by:

[PATCH 8/8] staging: kpc2000: removed superfluous NULL checks from device attribute call-backs.

2019-05-20 Thread Jeremy Sowden
drop the checks. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 27 -- 1 file changed, 27 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index f6043ef7b55b..4a0af2645747 100644 --- a

[PATCH 1/8] staging: kpc2000: added separate show functions for kpc_uio_class device attributes, defined them as read-only and declared them static.

2019-05-20 Thread Jeremy Sowden
1: warning: symbol 'dev_attr_core_num' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 135 --- 1 file changed, 89 insertions(+), 46 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c

[PATCH 6/8] staging: kpc2000: use IDA to assign card numbers.

2019-05-20 Thread Jeremy Sowden
Previously the next card number was assigned from a static int local variable. Replaced it with an IDA. Avoids the assignment of ever- increasing card-numbers by allowing them to be reused. Updated TODO. Corrected format-specifier for unsigned pcard->card_num. Signed-off-by: Jeremy Sow

[PATCH 3/8] staging: kpc2000: improved formatting of core.c.

2019-05-20 Thread Jeremy Sowden
* Indented with tabs. * Broke lines over 80 columns where possible. * Removed braces from one-statement blocks. * Tidied up some comments. * Removed multiple blank lines. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 810 ++--- 1 file

git-send-email cock-up [Was: Re: [PATCH v3 0/6] staging: kpc2000: another batch of fixes]

2019-05-20 Thread Jeremy Sowden
I've mucked up sending out v4 of this series. Please ignore the messages I just sent. I'll send the right ones out as v5 shortly. Sorry for the noise. J. signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org ht

[PATCH v4 7/8] staging: kpc2000: simplified kp2000_device retrieval in device attribute call-backs.

2019-05-20 Thread Jeremy Sowden
pci_get_drvdata just calls dev_get_drvdata on the dev member of pdev, this is equivalent to: struct kp2000_device *pcard = dev_get_drvdata(&(container_of(dev, struct pci_dev, dev)->dev)); and we can simplify it to: struct kp2000_device *pcard = dev_get_drvdata(dev); Signed-off-by:

[PATCH v4 2/8] staging: kpc2000: removed two kpc_uio_class device attributes.

2019-05-20 Thread Jeremy Sowden
The show functions of two attributes output nothing and they are unused. Removed them. Signed-off-by: Jeremy Sowden Reported-by: Matt Sickler --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000

[PATCH v4 5/8] staging: kpc2000: added separate show functions for readable kp device attributes, defined them as read-only, and declared them static.

2019-05-20 Thread Jeremy Sowden
ld it be static? drivers/staging/kpc2000/kpc2000/core.c:161:1: warning: symbol 'dev_attr_cpld_reconfigure' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 106 + 1 file changed, 73 insertions(+), 33 de

[PATCH v4 3/8] staging: kpc2000: improved formatting of core.c.

2019-05-20 Thread Jeremy Sowden
* Indented with tabs. * Broke lines over 80 columns where possible. * Removed braces from one-statement blocks. * Tidied up some comments. * Removed multiple blank lines. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 810 ++--- 1 file

[PATCH v4 4/8] staging: kpc2000: added a helper to get struct kp2000_device from struct device.

2019-05-20 Thread Jeremy Sowden
. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 29 -- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index d4af5a643a7b..c33595cc1332 100644 --- a

[PATCH v4 6/8] staging: kpc2000: use IDA to assign card numbers.

2019-05-20 Thread Jeremy Sowden
Previously the next card number was assigned from a static int local variable. Replaced it with an IDA. Avoids the assignment of ever- increasing card-numbers by allowing them to be reused. Updated TODO. Corrected format-specifier for unsigned pcard->card_num. Signed-off-by: Jeremy Sow

[PATCH v4 8/8] staging: kpc2000: removed superfluous NULL checks from device attribute call-backs.

2019-05-20 Thread Jeremy Sowden
drop the checks. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 27 -- 1 file changed, 27 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index f6043ef7b55b..4a0af2645747 100644 --- a

[PATCH v5 6/8] staging: kpc2000: use IDA to assign card numbers.

2019-05-21 Thread Jeremy Sowden
Previously the next card number was assigned from a static int local variable. Replaced it with an IDA. Avoids the assignment of ever- increasing card-numbers by allowing them to be reused. Updated TODO. Corrected format-specifier for unsigned pcard->card_num. Signed-off-by: Jeremy Sow

[PATCH v5 8/8] staging: kpc2000: removed superfluous NULL checks from device attribute call-backs.

2019-05-21 Thread Jeremy Sowden
drop the checks. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 27 -- 1 file changed, 27 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index f5ad90b17959..3a4773183cab 100644 --- a

[PATCH v5 3/8] staging: kpc2000: improved formatting of core.c.

2019-05-21 Thread Jeremy Sowden
* Indented with tabs. * Broke lines over 80 columns where possible. * Removed braces from one-statement blocks. * Tidied up some comments. * Removed multiple blank lines. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 788 ++--- 1 file

[PATCH v5 4/8] staging: kpc2000: added a helper to get struct kp2000_device from struct device.

2019-05-21 Thread Jeremy Sowden
. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 29 -- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index 65e31bf01227..1d10e252c8da 100644 --- a

[PATCH v5 0/8] staging: kpc2000: another batch of fixes

2019-05-21 Thread Jeremy Sowden
them and split them into two patches because I was doing two different things in the previous patch. I *think* they are correct, but I've moved them to the end of the series in case I really have just got the wrong end of the stick, so they can easily be dropped. Jeremy Sowden (8): stagin

[PATCH v5 5/8] staging: kpc2000: added separate show functions for readable kp device attributes, defined them as read-only, and declared them static.

2019-05-21 Thread Jeremy Sowden
ld it be static? drivers/staging/kpc2000/kpc2000/core.c:161:1: warning: symbol 'dev_attr_cpld_reconfigure' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 106 + 1 file changed, 73 insertions(+), 33 de

[PATCH v5 1/8] staging: kpc2000: added separate show functions for kpc_uio_class device attributes, defined them as read-only and declared them static.

2019-05-21 Thread Jeremy Sowden
1: warning: symbol 'dev_attr_core_num' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 135 --- 1 file changed, 89 insertions(+), 46 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c

[PATCH v5 7/8] staging: kpc2000: simplified kp2000_device retrieval in device attribute call-backs.

2019-05-21 Thread Jeremy Sowden
pci_get_drvdata just calls dev_get_drvdata on the dev member of pdev, this is equivalent to: struct kp2000_device *pcard = dev_get_drvdata(&(container_of(dev, struct pci_dev, dev)->dev)); and we can simplify it to: struct kp2000_device *pcard = dev_get_drvdata(dev); Signed-off-by:

[PATCH v5 2/8] staging: kpc2000: removed two kpc_uio_class device attributes.

2019-05-21 Thread Jeremy Sowden
The show functions of two attributes output nothing and they are unused. Removed them. Signed-off-by: Jeremy Sowden Reported-by: Matt Sickler --- drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 1 file changed, 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000

Re: [PATCH v5 3/8] staging: kpc2000: improved formatting of core.c.

2019-05-21 Thread Jeremy Sowden

[PATCH v6 4/6] staging: kpc2000: use IDA to assign card numbers.

2019-05-21 Thread Jeremy Sowden
Previously the next card number was assigned from a static int local variable. Replaced it with an IDA. Avoids the assignment of ever- increasing card-numbers by allowing them to be reused. Updated TODO. Corrected format-specifier for unsigned pcard->card_num. Signed-off-by: Jeremy Sow

[PATCH v6 0/6] staging: kpc2000: another batch of fixes

2019-05-21 Thread Jeremy Sowden
them and split them into two patches because I was doing two different things in the previous patch. I *think* they are correct, but I've moved them to the end of the series in case I really have just got the wrong end of the stick, so they can easily be dropped. Jeremy Sowden (6): stagin

[PATCH v6 6/6] staging: kpc2000: removed superfluous NULL checks from device attribute call-backs.

2019-05-21 Thread Jeremy Sowden
drop the checks. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 27 -- 1 file changed, 27 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index 2af4170a0d68..4110032d0cbb 100644 --- a

[PATCH v6 5/6] staging: kpc2000: simplified kp2000_device retrieval in device attribute call-backs.

2019-05-21 Thread Jeremy Sowden
pci_get_drvdata just calls dev_get_drvdata on the dev member of pdev, this is equivalent to: struct kp2000_device *pcard = dev_get_drvdata(&(container_of(dev, struct pci_dev, dev)->dev)); and we can simplify it to: struct kp2000_device *pcard = dev_get_drvdata(dev); Signed-off-by:

[PATCH v6 1/6] staging: kpc2000: improved formatting of core.c.

2019-05-21 Thread Jeremy Sowden
* Indented with tabs. * Broke lines over 80 columns where possible. * Removed braces from one-statement blocks. * Tidied up some comments. * Removed multiple blank lines. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 769 ++--- 1 file

[PATCH v6 3/6] staging: kpc2000: added separate show functions for readable kp device attributes, defined them as read-only, and declared them static.

2019-05-21 Thread Jeremy Sowden
ld it be static? drivers/staging/kpc2000/kpc2000/core.c:161:1: warning: symbol 'dev_attr_cpld_reconfigure' was not declared. Should it be static? Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 106 + 1 file changed, 73 insertions(+), 33 de

[PATCH v6 2/6] staging: kpc2000: added a helper to get struct kp2000_device from struct device.

2019-05-21 Thread Jeremy Sowden
. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 29 -- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c index f1735237cfb6..e58bddec87ee 100644 --- a

Re: [PATCH] staging: rtl8723bs: Add missing blank lines

2019-05-22 Thread Jeremy Sowden
On 2019-05-21, at 21:46:55 -0300, Fabio Lima wrote: > This patch resolves the following warning from checkpatch.pl > WARNING: Missing a blank line after declarations > > Signed-off-by: Fabio Lima > --- > drivers/staging/rtl8723bs/core/rtw_debug.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff

Re: [PATCH v6 0/6] staging: kpc2000: another batch of fixes

2019-05-22 Thread Jeremy Sowden
On 2019-05-22, at 14:45:51 +0200, Greg KH wrote: > On Tue, May 21, 2019 at 11:35:18AM +0100, Jeremy Sowden wrote: > > There are a number relating to device attributes, one formatting > > patch, and another that changes how card numbers are assigned. > > > > Greg recko

Re: [PATCH] staging: fieldbus: anybuss: Remove unnecessary variables

2019-05-23 Thread Jeremy Sowden
On 2019-05-23, at 13:51:18 +0530, Nishka Dasgupta wrote: > On 23/05/19 12:52 PM, Greg KH wrote: > > On Thu, May 23, 2019 at 12:05:01PM +0530, Nishka Dasgupta wrote: > > > In the functions export_reset_0 and export_reset_1 in > > > arcx-anybus.c, the only operation performed before return is > > > p

  1   2   >