public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: b.zolnierkie@samsung.com (Bartlomiej Zolnierkiewicz)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ASoC: samsung: Remove tests of member address
Date: Mon, 12 Dec 2016 14:35:41 +0100	[thread overview]
Message-ID: <2863148.52BcI6omVF@amdc3058> (raw)
In-Reply-To: <1481363471-21364-1-git-send-email-krzk@kernel.org>


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@intel.com>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

  reply	other threads:[~2016-12-12 13:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-10  9:51 [PATCH] ASoC: samsung: Remove tests of member address Krzysztof Kozlowski
2016-12-12 13:35 ` Bartlomiej Zolnierkiewicz [this message]
2016-12-15 12:21 ` Applied "ASoC: samsung: Remove tests of member address" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2863148.52BcI6omVF@amdc3058 \
    --to=b.zolnierkie@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox