lkml.org 
[lkml]   [2014]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [iio:togreg 3/3] WARNING: Reusing the krealloc arg is almost always a bug
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 Xilinx XADC driver
>
> scripts/checkpatch.pl 0001-iio-adc-Add-Xilinx-XADC-driver.patch
> # many are suggestions rather than must-fix
> WARNING: Reusing the krealloc arg is almost always a bug
> #1220: drivers/iio/adc/xilinx-xadc-core.c:1138:
> + indio_dev->channels = krealloc(channels, sizeof(*channels) *
>

This is actually a false positive, checkpatch thinks that
'indio_dev->channels' and 'channels' is the same. Added Joe to Cc.

- Lars


\
 
 \ /
  Last update: 2014-03-02 11:01    [W:0.125 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site