Re: [PATCH v2] staging: media: sunxi: Add bool cast to value

2019-07-22 Thread Jeremy Sowden
On 2019-07-22, at 14:24:38 +0200, Paul Kocialkowski wrote: > On Mon 22 Jul 19, 12:12, Jeremy Sowden wrote: > > On 2019-07-22, at 11:36:51 +0530, Nishka Dasgupta wrote: > > > Typecast as bool the return value of cedrus_find_format in > > > cedrus_check

Re: [PATCH v2] staging: media: sunxi: Add bool cast to value

2019-07-22 Thread Jeremy Sowden
On 2019-07-22, at 11:36:51 +0530, Nishka Dasgupta wrote: > Typecast as bool the return value of cedrus_find_format in > cedrus_check_format as the return value of cedrus_check_format is > always treated like a boolean value. > > Signed-off-by: Nishka Dasgupta > --- > Changes in v2: > - Add !! to

[PATCH RESEND] staging: kpc2000: removed DMA AIO implementation.

2019-06-13 Thread Jeremy Sowden
The existing implementation for doing DMA via asynchronous IO didn't work and there was no longer a use-case for it. Removed it. Fixed a few checkpatch warnings about too-long lines and extraneous braces in the process. Reported-by: Matt Sickler Signed-off-by: Jeremy Sowden --- drivers

Re: [PATCH 1/6] staging: kpc2000_dma: added Kconfig to enable asynchronous I/O.

2019-06-13 Thread Jeremy Sowden
On 2019-06-13, at 10:45:31 +0200, Greg KH wrote: > On Tue, Jun 11, 2019 at 08:50:59PM +0100, Jeremy Sowden wrote: > > The DMA driver has call-backs for doing asynchronous I/O which are > > protected by a CONFIG_ macro which is not defined. Added a Kconfig > > stanza to define

[PATCH RESEND] staging: kpc2000: removed DMA AIO implementation.

2019-06-12 Thread Jeremy Sowden
The existing implementation for doing DMA via asynchronous IO didn't work and there was no longer a use-case for it. Removed it. Fixed a few checkpatch warnings about too-long lines and extraneous braces in the process. Reported-by: Matt Sickler Signed-off-by: Jeremy Sowden --- I mucked up

Re: [PATCH 0/6] staging: kpc2000_dma: fixes for AIO file-ops.

2019-06-12 Thread Jeremy Sowden
On 2019-06-11, at 23:43:19 +, Matt Sickler wrote: > >-Original Message- > > From: Jeremy Sowden > > I've had a go at getting the DMA AIO working. It compiles, but I > > don't have access to the hardware, so I have done no more testing > > than tha

[PATCH 5/6] staging: kpc2000_dma: removed aio cancel call-back.

2019-06-11 Thread Jeremy Sowden
The AIO cancel call-back doesn't do anything. Removed it. Cc: Matt Sickler Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc_dma/fileops.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma

[PATCH 2/6] staging: kpc2000_dma: removed casts of void pointers.

2019-06-11 Thread Jeremy Sowden
The AIO call-backs assigned void pointers to local variables and used superfluous casts in the process. Removed the casts. Cc: Matt Sickler Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc_dma/fileops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 1/6] staging: kpc2000_dma: added Kconfig to enable asynchronous I/O.

2019-06-11 Thread Jeremy Sowden
The DMA driver has call-backs for doing asynchronous I/O which are protected by a CONFIG_ macro which is not defined. Added a Kconfig stanza to define it. Cc: Matt Sickler Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/Kconfig | 8 drivers/staging/kpc2000/kpc_dma

[PATCH 0/6] staging: kpc2000_dma: fixes for AIO file-ops.

2019-06-11 Thread Jeremy Sowden
to implement something that would abort the transfer in the same manner that kpc_dma_close() if this would be useful. Jeremy Sowden (6): staging: kpc2000_dma: added Kconfig to enable asynchronous I/O. staging: kpc2000_dma: removed casts of void pointers. staging: kpc2000_dma: formatting fixes

[PATCH 3/6] staging: kpc2000_dma: formatting fixes for AIO functions.

2019-06-11 Thread Jeremy Sowden
Fixed some lines which were more than 80-characters long. Cc: Matt Sickler Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc_dma/fileops.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers

[PATCH 4/6] staging: kpc2000_dma: replaced aio_(read|write) file-ops with (read|write)_iter ones.

2019-06-11 Thread Jeremy Sowden
The AIO API was implemented in terms of obsolete file-ops. Replaced the ->aio_read and ->aio_write call-backs with ->read_iter and ->write_iter ones. Replaced the call to aio_complete with a call to the ki_complete call-back of the kiocb object. Cc: Matt Sickler Signed-off-by: J

[PATCH 6/6] staging: kpc2000: updated TODO in light of DMA AIO fixes.

2019-06-11 Thread Jeremy Sowden
The DMA AIO file-ops now work, so remove that item from the to-do list. Cc: Matt Sickler Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/TODO | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/kpc2000/TODO b/drivers/staging/kpc2000/TODO index

[PATCH 2/2] staging: kpc2000: removed misc device.

2019-05-31 Thread Jeremy Sowden
Now that all the card information is available via sysfs, the misc device is no longer necessary. Removed it. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 127 + drivers/staging/kpc2000/kpc2000/pcie.h | 2 - 2 files changed, 2 insertions

[PATCH 1/2] staging: kpc2000: export more device attributes via sysfs.

2019-05-31 Thread Jeremy Sowden
Added more read-only device attributes in order to expose all the information about the hardware which is available by calling read() or ioct() on the misc device associated with it. Signed-off-by: Jeremy Sowden --- drivers/staging/kpc2000/kpc2000/core.c | 57 ++ 1 file

[PATCH 0/2] staging: kpc2000: replace per-card misc devices.

2019-05-31 Thread Jeremy Sowden
Each card has a misc device associated with it. The devices are used to get access to various attributes of the hardware. Most of these attributes are also available via sysfs. Therefore, we make all the attributes available via sysfs and remove the devices. Jeremy Sowden (2): staging

Re: [PATCH] staging: kpc2000: simplify nested conditionals that just return a boolean.

2019-05-26 Thread Jeremy Sowden
On 2019-05-24, at 16:59:45 +, Matt Sickler wrote: > From: devel On Behalf Of > Greg KH > > On Fri, May 24, 2019 at 01:19:26PM +0100, Jeremy Sowden wrote: > > > kp2000_check_uio_irq contained a pair of nested ifs which each > > > evaluated a bitwise operation. I

[PATCH] staging: kpc2000: simplify nested conditionals that just return a boolean.

2019-05-24 Thread Jeremy Sowden
-off-by: Jeremy Sowden --- This applies to staging-testing. I was in two minds whether to send this patch or something less terse: + return (interrupt_active & irq_check_mask) && + (interrupt_mask_inv & irq_check_mask); drivers/staging/kpc2000/kpc2000/c

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 > > >

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. > > > > Gre

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(+) > >

[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
'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 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000

[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

[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 0/6] staging: kpc2000: another batch of fixes

2019-05-21 Thread Jeremy Sowden
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): staging: kpc2000

[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 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 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

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

2019-05-21 Thread Jeremy Sowden

[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

[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
'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 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000

[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
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 b/drivers/staging/kpc2000/kpc2000/cell_probe.c index 9289ac98c8c6..3796f034312a

[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 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

[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

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

2019-05-21 Thread Jeremy Sowden
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): staging: kpc2000

[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

[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

[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
'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 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000

[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 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:

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

[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
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 b/drivers/staging/kpc2000/kpc2000/cell_probe.c index 6a2ebdf20113..3339b84b8666

[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

[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

[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

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

2019-05-20 Thread Jeremy Sowden
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): staging: kpc2000

[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
'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 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000

[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
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 b/drivers/staging/kpc2000/kpc2000/cell_probe.c index 6a2ebdf20113..3339b84b8666

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,

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;

[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

[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 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
? 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 b/drivers/staging/kpc2000/kpc2000/cell_probe.c index 6a2ebdf20113..3339b84b8666

[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
'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 deletions(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000

[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

[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 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
-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/staging/kpc2000/kpc2000/cell_probe.c index 3798f8e2e165..3073b4813b7a 100644

[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: removed

[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 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

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

2019-05-16 Thread Jeremy Sowden
'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(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c

[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 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

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 nothin

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

[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
'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(-) diff --git a/drivers/staging/kpc2000/kpc2000/core.c b/drivers/staging/kpc2000/kpc2000/core.c

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

2019-05-16 Thread Jeremy Sowden
-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/kpc2000/kpc2000/cell_probe.c index 38c3738209a7..4a1fec7f563b 100644 --- a/drivers

[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 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 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: removed

[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

[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 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

[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

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: > >

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

[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

[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 3/5] staging: kpc2000: added designated initializers to two structs.

2019-05-15 Thread Jeremy Sowden
-by: 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 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
/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/kpc2000/cell_probe.c b

[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 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

  1   2   >