[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Dec 2016 14:35:41 +0100
From: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: Kukjin Kim <kgene@...nel.org>,
Javier Martinez Canillas <javier@....samsung.com>,
Sangbeom Kim <sbkim73@...sung.com>,
Sylwester Nawrocki <s.nawrocki@...sung.com>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
alsa-devel@...a-project.org
Subject: Re: [PATCH] ASoC: samsung: Remove tests of member address
Hi,
On Saturday, December 10, 2016 11:51:11 AM Krzysztof Kozlowski wrote:
> The driver was checking for non-NULL address of struct's members:
> - s3c_audio_pdata->type (union),
> - s3c_audio_pdata->type.i2s (embedded struct).
>
> This is pointless as these will be always non-NULL. The 's3c_audio_pdata'
> is always initialized in static memory so it will be zeroed.
> Additionally the 'type' member was an union with only one member.
>
> It is safe to reorganize the structures to get rid of useless union and
> checks for addresses to fix the coccinelle warning:
> >> sound/soc/samsung/i2s.c:1270:2-4: ERROR: test of a variable/field address
>
> Reported-by: kbuild test robot <fengguang.wu@...el.com>
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Powered by blists - more mailing lists