Re: [PATCH v2 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-02 Thread Dan Carpenter
On Sat, Dec 02, 2017 at 08:41:48PM +, Jeremy Sowden wrote: > On 2017-12-02, at 10:35:06 +, Jeremy Sowden wrote: > > On 2017-12-02, at 13:20:09 +0300, Dan Carpenter wrote: > > > On Fri, Dec 01, 2017 at 05:19:37PM +, Jeremy Sowden wrote: > > > > -#define DEFAULT_PIPE_INFO \ > > > > -{ \ >

Re: [PATCH] staging: lustre: check result of register_shrinker

2017-12-02 Thread Dilger, Andreas
On Dec 2, 2017, at 11:40, Aliaksei Karaliou wrote: > > Lustre code lacks checking the result of register_shrinker() > in several places. register_shrinker() was tagged __must_check > recently so that sparse has started reporting it. Thank you for your patch. Some comments below. > Signed-off-b

[PATCHv2] staging: pi433: pi433_if.c remove SET_CHECKED macro

2017-12-02 Thread Nguyen Phan Quang Minh
The macro calls its argument -a function- twice, makes the calling function return prematurely -skipping resource cleanup code- and hurts understandability. Signed-off-by: Nguyen Phan Quang Minh --- Base on Dan's feedback, I checked and the macro return indeed skips over some cleanup code, hence

[PATCH v4 3/3] media: atomisp: delete empty default struct values.

2017-12-02 Thread Jeremy Sowden
Removing zero-valued struct-members left a number of the default struct-values empty. These values have now been removed. Signed-off-by: Jeremy Sowden --- .../atomisp/pci/atomisp2/css2400/ia_css_pipe.h | 1 - .../atomisp/pci/atomisp2/css2400/ia_css_types.h| 1 - .../isp/kernels/s3a/s3

[PATCH v4 0/3] media: atomisp: clean up of data-structure initialization in the CSS API

2017-12-02 Thread Jeremy Sowden
v4. Removed the parens around the compound-literals in the macro definitions. They were superfluous and the errors reported by checkpatch.pl appear to have been false positives resulting from a bug. v3. Rebased on to git://linuxtv.org/media_tree.git. Patch-set applies cleanly to li

[PATCH v4 2/3] media: atomisp: delete zero-valued struct members.

2017-12-02 Thread Jeremy Sowden
A lot of the members of the default struct values used by the CSS API were explicitly initialized to zero values. Designated initializers have allowed these members to be removed. Signed-off-by: Jeremy Sowden --- .../hive_isp_css_common/input_formatter_global.h | 16 --- .../pci/atomisp2/css

[PATCH v4 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-02 Thread Jeremy Sowden
The CSS API uses a lot of nested anonymous structs defined in object macros to assign default values to its data-structures. These have been changed to use compound-literals and designated initializers to make them more comprehensible and less fragile. The compound-literals can also be used in as

Re: [PATCH] Staging: pi433: fix brace coding style issues in pi433_if.c

2017-12-02 Thread Joe Perches
On Sat, 2017-12-02 at 22:05 +0100, Tomas Marek wrote: > This patch fix several brace on next line, braces not necessary, space > around =/<, and space before/after open/close parenthesis coding style > errors find by checkpatch in pi433_if.c. > > Signed-off-by: Tomas Marek > --- > drivers/stagin

Re: [PATCH v2 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-02 Thread Jeremy Sowden
On 2017-12-02, at 20:41:48 +, Jeremy Sowden wrote: > On 2017-12-02, at 10:35:06 +, Jeremy Sowden wrote: > > On 2017-12-02, at 13:20:09 +0300, Dan Carpenter wrote: > > > On Fri, Dec 01, 2017 at 05:19:37PM +, Jeremy Sowden wrote: > > > > -#define DEFAULT_PIPE_INFO \ > > > > -{ \ > > > > -

[PATCH] Staging: pi433: fix brace coding style issues in pi433_if.c

2017-12-02 Thread Tomas Marek
This patch fix several brace on next line, braces not necessary, space around =/<, and space before/after open/close parenthesis coding style errors find by checkpatch in pi433_if.c. Signed-off-by: Tomas Marek --- drivers/staging/pi433/pi433_if.c | 130 --- 1

Re: [PATCH v2 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-02 Thread Jeremy Sowden
On 2017-12-02, at 10:35:06 +, Jeremy Sowden wrote: > On 2017-12-02, at 13:20:09 +0300, Dan Carpenter wrote: > > On Fri, Dec 01, 2017 at 05:19:37PM +, Jeremy Sowden wrote: > > > -#define DEFAULT_PIPE_INFO \ > > > -{ \ > > > - {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, /* output_info */ \ > > >

Re: [PATCH v3] staging: xgifb: remove macros with hidden variable

2017-12-02 Thread Dan Carpenter
Much nicer. Thanks! regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Re: [PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Joe Perches
On Sat, 2017-12-02 at 17:20 +0200, Marcus Wolf wrote: > rf69_set_dc_cut_off_frequency_intern is used by rf69.c internally only. > Therefore removed the function from header and declared it staic in > the implemtation. > Signed-off-by: Marcus Wolf > --- > drivers/staging/pi433/rf69.c |2 +- >

[PATCH] staging: lustre: check result of register_shrinker

2017-12-02 Thread Aliaksei Karaliou
Lustre code lacks checking the result of register_shrinker() in several places. register_shrinker() was tagged __must_check recently so that sparse has started reporting it. Signed-off-by: Aliaksei Karaliou --- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 7 +-- drivers/staging/lust

Re: [PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Joe Perches
On Sat, 2017-12-02 at 19:15 +0200, Marcus Wolf wrote: > Can you give me a hint, how to invoke the checkpatch.pl. There are lots of ways. I suggest reading the output of $ ./scripts/checkpatch.pl --help For instance: [ after the fact checking ] $ git checkout -b [ commit one or more changes

[PATCH] staging: android: add identifiers to function parameters

2017-12-02 Thread Ashish Kalra
Fix checkpatch.pl warnings of the form "function definition argument 'foo' should also have an identifier name". Signed-off-by: Ashish Kalra --- drivers/staging/android/ion/ion.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion.h b/drivers/st

[PATCH] staging: android: Fix checkpatch.pl error

2017-12-02 Thread Ashish Kalra
fixed CHECK: Lines should not end with a '(' reported by checkpatch.pl Signed-off-by: Ashish Kalra --- drivers/staging/android/ion/ion.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index fa4b75f4

Re: [PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Marcus Wolf
Am 02.12.2017 um 18:46 schrieb Joe Perches: On Sat, 2017-12-02 at 17:20 +0200, Marcus Wolf wrote: rf69_set_dc_cut_off_frequency_intern is used by rf69.c internally only. Therefore removed the function from header and declared it staic in the implemtation. Signed-off-by: Marcus Wolf --- driv

Re: [PATCH] staging: pi433: rf69.c: Introduced define DEBUG_FUNC_ENTRY

2017-12-02 Thread Marcus Wolf
Am 02.12.2017 um 17:00 schrieb Greg KH: On Sat, Dec 02, 2017 at 01:45:50PM +0200, Marcus Wolf wrote: Since dev_dbg already depends on define DEBUG, there was no sense, to enclose dev_dbg lines with #ifdef DEBUG. Instead of removing #ifdef DEBUG, I introduced define DEBUG_FUNC_ENTRY. So now it i

Re: [PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations

2017-12-02 Thread Marcus Wolf
Am 02.12.2017 um 18:09 schrieb Greg KH: A: http://en.wikipedia.org/wiki/Top_post Q: Were do I find info about this thing called top-posting? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoyin

Re: [PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Greg KH
A: http://en.wikipedia.org/wiki/Top_post Q: Were do I find info about this thing called top-posting? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I inclu

Re: [PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations

2017-12-02 Thread Greg KH
A: http://en.wikipedia.org/wiki/Top_post Q: Were do I find info about this thing called top-posting? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? A: No. Q: Should I inclu

Re: [PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Marcus Wolf
Hi! I am sorry :-/ Can you recover, or do I need to resend? Cheers, Marcus Am 02.12.2017 um 17:56 schrieb Greg KH: On Sat, Dec 02, 2017 at 05:20:22PM +0200, Marcus Wolf wrote: rf69_set_dc_cut_off_frequency_intern is used by rf69.c internally only. Therefore removed the function from header a

Re: [PATCH] staging: pi433: Style fix - spaces required

2017-12-02 Thread Greg KH
On Sat, Dec 02, 2017 at 05:43:20PM +0200, Marcus Wolf wrote: > Leftover changes from patch [PATCH 2/5] staging: pi433: rf69.c style fix - > spaces required around > from Marcin Ciupak (11.10.2017) Please properly wrap your changelog text at 72 columns like git asks you do :) thanks, greg k-h __

Re: [PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations

2017-12-02 Thread Marcus Wolf
Hi Greg, for me the action was "clean up the defines in rf69.c". So for me it was fine, that two defines were moved and several other deleted at the same. Is it ok for you, or should I split the patch belated? Cheers, Marcus Am 02.12.2017 um 17:55 schrieb Greg KH: On Sat, Dec 02, 2017 at 0

Re: [PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Greg KH
On Sat, Dec 02, 2017 at 05:20:22PM +0200, Marcus Wolf wrote: > rf69_set_dc_cut_off_frequency_intern is used by rf69.c internally only. > Therefore removed the function from header and declared it staic in > the implemtation. > Signed-off-by: Marcus Wolf No blank line before signed-off-by :( ___

Re: [PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations

2017-12-02 Thread Greg KH
On Sat, Dec 02, 2017 at 05:14:08PM +0200, Marcus Wolf wrote: > The define FIFO_SIZE was moved to rf69_registers.h. Although it is not a > register, > it is a value, that is given by hardware (like the registers). > > The define FIFO_THRESHOLD was moved to pi433_if.c, since it is a value, that >

Re: [PATCH v6 2/2] staging: ion: create one device entry per heap

2017-12-02 Thread Greg KH
On Wed, Nov 29, 2017 at 03:00:56PM +0100, Benjamin Gaignard wrote: > 2017-11-28 14:32 GMT+01:00 Greg KH : > > On Mon, Nov 06, 2017 at 04:59:45PM +0100, Benjamin Gaignard wrote: > >> Instead a getting only one common device "/dev/ion" for > >> all the heaps this patch allow to create one device > >>

Re: [PATCH] staging: pi433: rf69.c: Replace macros READ_REG and WRITE_REG with inline functions setBit rstBit and rmwBit

2017-12-02 Thread Greg KH
On Sat, Dec 02, 2017 at 02:21:32PM +0200, Marcus Wolf wrote: > To increase the readability of the register accesses, the abstraction of the > helpers was increased from simple read and write to set bit, reset bit and > read modify write bit. In addition - according to the proposal from Walter > Har

Re: [PATCH] staging: pi433: rf69.c: Introduced define DEBUG_FUNC_ENTRY

2017-12-02 Thread Greg KH
On Sat, Dec 02, 2017 at 01:45:50PM +0200, Marcus Wolf wrote: > Since dev_dbg already depends on define DEBUG, there was no sense, to enclose > dev_dbg lines with #ifdef DEBUG. > Instead of removing #ifdef DEBUG, I introduced define DEBUG_FUNC_ENTRY. So > now it is > possible to switch of the funct

Re: staging: pi433: Possible bug in rf69.c

2017-12-02 Thread Greg KH
On Thu, Nov 30, 2017 at 07:38:41PM +0200, Marcus Wolf wrote: > Hi Greg, > > don't know, wether that's best option. What is? > With that procedure, it will be very hard, to integrate large patches, if > the owner of the patch isn't dealing with kernel source in his daily > business and thus isn't

Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Greg KH
On Sat, Dec 02, 2017 at 12:51:54PM +0200, Marcus Wolf wrote: > Defines used in cases contain already shifted bits, so currentValue must not > be shifted. > Signed-off-by: Marcus Wolf Odd extra ' ' in your subject :( And again, linewrap please. thanks, greg k-h

Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Greg KH
On Sat, Dec 02, 2017 at 12:32:20PM +0200, Marcus Wolf wrote: > Defines used in cases contain already shifted bits, so currentValue must not > be shifted. Please properly wrap your changelog text. And you need a blank line before your signed-off-by line. > signed_of_by: Marcus Wolf "Signed-off

[PATCH] staging: pi433: Style fix - spaces required

2017-12-02 Thread Marcus Wolf
Leftover changes from patch [PATCH 2/5] staging: pi433: rf69.c style fix - spaces required around from Marcin Ciupak (11.10.2017) Signed-of-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b/driv

Re: [PATCH 4/5] staging: pi433: rf69.c style fix - code indent should use tabs

2017-12-02 Thread Marcus Wolf
Revieved-by: Marcus Wolf Am 11.10.2017 um 21:24 schrieb Marcin Ciupak: This patch fixes the following checkpatch.pl error: ERROR: code indent should use tabs where possible in rf69.c file as requested by TODO file. Additionally some style warnings remain valid here and could be fixed by anot

[PATCH] staging: pi433: Make rf69_set_dc_cut_off_frequency_intern static

2017-12-02 Thread Marcus Wolf
rf69_set_dc_cut_off_frequency_intern is used by rf69.c internally only. Therefore removed the function from header and declared it staic in the implemtation. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- drivers/staging/pi433/rf69.h |1 - 2 files changed, 1 insertion(

[PATCH] staging: pi433: Removed some obsolete or duplicated defines; moved two defines to better locations

2017-12-02 Thread Marcus Wolf
The define FIFO_SIZE was moved to rf69_registers.h. Although it is not a register, it is a value, that is given by hardware (like the registers). The define FIFO_THRESHOLD was moved to pi433_if.c, since it is a value, that is freely choosen by the interface implementation. The better the response

Re: [PATCH v2 2/3] media: atomisp: delete zero-valued struct members.

2017-12-02 Thread Jeremy Sowden
On 2017-12-01, at 17:41:50 +, Alan Cox wrote: > > --- > > a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h > > +++ > > b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h > > @@ -152,14 +152,6 @@ struct ia_css_pipe_config { > > }; > > > > > Than

Re: [PATCH 1/3] iio: trigger: Fix platform_get_irq's error checking

2017-12-02 Thread Jonathan Cameron
On Thu, 30 Nov 2017 21:13:34 +0530 Arvind Yadav wrote: > The platform_get_irq() function returns negative if an error occurs. > zero or positive number on success. platform_get_irq() error checking > for zero is not correct. > > Signed-off-by: Arvind Yadav Applied to the togreg branch of iio.gi

[PATCH] staging: pi433: rf69.c: Replace macros READ_REG and WRITE_REG with inline functions setBit rstBit and rmwBit

2017-12-02 Thread Marcus Wolf
To increase the readability of the register accesses, the abstraction of the helpers was increased from simple read and write to set bit, reset bit and read modify write bit. In addition - according to the proposal from Walter Harms from 20.07.2017 - instead of marcros inline functions were used.

[PATCH] staging: pi433: rf69.c: Introduced define DEBUG_FUNC_ENTRY

2017-12-02 Thread Marcus Wolf
Since dev_dbg already depends on define DEBUG, there was no sense, to enclose dev_dbg lines with #ifdef DEBUG. Instead of removing #ifdef DEBUG, I introduced define DEBUG_FUNC_ENTRY. So now it is possible to switch of the function entry debug lines even while debug is switched on. Signed-off-by:

[PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Marcus Wolf
Defines used in cases contain already shifted bits, so currentValue must not be shifted. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index e69a215..1

Re: [PATCH v2 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-02 Thread Jeremy Sowden
On 2017-12-02, at 13:20:09 +0300, Dan Carpenter wrote: > On Fri, Dec 01, 2017 at 05:19:37PM +, Jeremy Sowden wrote: > > -#define DEFAULT_PIPE_INFO \ > > -{ \ > > - {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, /* output_info */ \ > > - {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, /* vf_output_info */

[PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Marcus Wolf
Defines used in cases contain already shifted bits, so currentValue must not be shifted. signed_of_by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index e69a215..12

Re: [PATCH v2 1/3] media: atomisp: convert default struct values to use compound-literals with designated initializers.

2017-12-02 Thread Dan Carpenter
On Fri, Dec 01, 2017 at 05:19:37PM +, Jeremy Sowden wrote: > -#define DEFAULT_PIPE_INFO \ > -{ \ > - {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, /* output_info */ \ > - {IA_CSS_BINARY_DEFAULT_FRAME_INFO}, /* vf_output_info */ \ > - IA_CSS_BINARY_DEFAULT_FRAME_INFO, /* raw_outp

Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Marcus Wolf
Hi Greg, yes, of course. Just got the wrong console to enter the commit command - but when I recognized, it was already too late :-/ The patch already was generated in user console. I am wondering myself, where this From: comes from. I used 'git send-email -1 --annotate' How to prevent the

Re: [PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Greg KH
On Sat, Dec 02, 2017 at 11:58:12AM +0200, Marcus Wolf wrote: > From: root I think something went wrong here :) Also, you should never need to do kernel development as root... greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverde

[PATCH] staging: pi433: Bugfix for shift operation in rf69_get_modulation()

2017-12-02 Thread Marcus Wolf
From: root Defines used in cases contain already shifted bits, so currentValue must not be shifted. Signed-off-by: Marcus Wolf --- drivers/staging/pi433/rf69.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c ind

Re: [PATCH 01/10] trailing whitespace fixed

2017-12-02 Thread Greg KH
On Sun, Nov 26, 2017 at 01:45:56AM +0300, Mike wrote: > Signed-off-by: Mike > --- > drivers/staging/irda/drivers/ali-ircc.c | 1002 > +++ > 1 file changed, 501 insertions(+), 501 deletions(-) > Hi, This is the friendly patch-bot of Greg Kroah-Hartman. You have sen

Re: [PATCH 00/10] Code style patches for staging/irda

2017-12-02 Thread Greg KH
On Sun, Nov 26, 2017 at 01:45:55AM +0300, Mike wrote: > > This is my task from Little Penguin :) What does that mean? > > Mike (10): > trailing whitespace fixed > spaces before tabs are fixed > trailing */ on a separate line fixed > if-else code style fixed > space prohibited before t