]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit - sound/soc/samsung/i2s.c
ASoC: samsung: Remove tests of member address
authorKrzysztof Kozlowski <krzk@kernel.org>
Sat, 10 Dec 2016 09:51:11 +0000 (11:51 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 15 Dec 2016 11:42:42 +0000 (11:42 +0000)
commit409c69be433b819c924a8d1c457a835bc6d51700
tree9414844e73526cea5fa4ffe8d30c6d584f8f11d8
parent0223f500aa39a2b6df00af212da736232705be3e
ASoC: samsung: Remove tests of member address

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@intel.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
arch/arm/mach-s3c64xx/dev-audio.c
include/linux/platform_data/asoc-s3c.h
sound/soc/samsung/i2s.c