Re: [iio:togreg 3/3] WARNING: Reusing the krealloc arg is almost always a bug

2014-03-02 Thread Joe Perches
That last one doesn't work if the krealloc has a cast like foo = (struct bar *)krealloc(foo, 1, GFP_KERNEL) Maybe this one is better... --- scripts/checkpatch.pl | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl

Re: [iio:togreg 3/3] WARNING: Reusing the krealloc arg is almost always a bug

2014-03-02 Thread Joe Perches
(Adding Andy Whitcroft to cc's) On Sun, 2014-03-02 at 10:11 +0100, Lars-Peter Clausen wrote: > On 03/02/2014 03:24 AM, Fengguang Wu wrote: > > > > Hi Lars-Peter, > > > > FYI, there are new warnings show up in > > > > tree: git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg > >

Re: [iio:togreg 3/3] WARNING: Reusing the krealloc arg is almost always a bug

2014-03-02 Thread Lars-Peter Clausen
On 03/02/2014 03:24 AM, Fengguang Wu wrote: Hi Lars-Peter, FYI, there are new warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg head: bdc8cda1d010887c06bd8c29564b74cd61ec0a7b commit: bdc8cda1d010887c06bd8c29564b74cd61ec0a7b [3/3] iio:adc: Add

Re: [iio:togreg 3/3] WARNING: Reusing the krealloc arg is almost always a bug

2014-03-02 Thread Lars-Peter Clausen
On 03/02/2014 03:24 AM, Fengguang Wu wrote: Hi Lars-Peter, FYI, there are new warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg head: bdc8cda1d010887c06bd8c29564b74cd61ec0a7b commit: bdc8cda1d010887c06bd8c29564b74cd61ec0a7b [3/3] iio:adc: Add

Re: [iio:togreg 3/3] WARNING: Reusing the krealloc arg is almost always a bug

2014-03-02 Thread Joe Perches
(Adding Andy Whitcroft to cc's) On Sun, 2014-03-02 at 10:11 +0100, Lars-Peter Clausen wrote: On 03/02/2014 03:24 AM, Fengguang Wu wrote: Hi Lars-Peter, FYI, there are new warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg head:

Re: [iio:togreg 3/3] WARNING: Reusing the krealloc arg is almost always a bug

2014-03-02 Thread Joe Perches
That last one doesn't work if the krealloc has a cast like foo = (struct bar *)krealloc(foo, 1, GFP_KERNEL) Maybe this one is better... --- scripts/checkpatch.pl | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/checkpatch.pl