All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	MyungJoo Ham <myungjoo.ham@samsung.com>,
	linux-kernel@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH v1 1/7] extcon: Make static analyzer happy about union assignment
Date: Wed, 29 Aug 2018 16:06:49 +0900	[thread overview]
Message-ID: <5B864609.2040405@samsung.com> (raw)
In-Reply-To: <20180827153557.58363-1-andriy.shevchenko@linux.intel.com>

Hi,

On 2018년 08월 28일 00:35, Andy Shevchenko wrote:
> When assign unions we need to supply non-scalar value, otherwise
> static analyzer is not happy:
> 
> CHECK   drivers/extcon/extcon.c
> drivers/extcon/extcon.c:631:22: warning: cast to non-scalar
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/extcon/extcon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/extcon/extcon.c b/drivers/extcon/extcon.c
> index b9d27c8fe57e..c21650a92689 100644
> --- a/drivers/extcon/extcon.c
> +++ b/drivers/extcon/extcon.c
> @@ -628,7 +628,7 @@ int extcon_get_property(struct extcon_dev *edev, unsigned int id,
>  	unsigned long flags;
>  	int index, ret = 0;
>  
> -	*prop_val = (union extcon_property_value)(0);
> +	*prop_val = (union extcon_property_value){0};
>  
>  	if (!edev)
>  		return -EINVAL;
> 

Applied all patches of this series. Thanks.

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics

      parent reply	other threads:[~2018-08-29  7:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180827153615epcas5p212a6279a5d5c3cbfc2608cbf34c2803d@epcas5p2.samsung.com>
2018-08-27 15:35 ` [PATCH v1 1/7] extcon: Make static analyzer happy about union assignment Andy Shevchenko
2018-08-27 15:35   ` [PATCH v1 2/7] extcon: Switch to use kasprintf() instead of open coded Andy Shevchenko
2018-08-29  9:40     ` David Laight
2018-08-27 15:35   ` [PATCH v1 3/7] extcon: cht-wc: Return from default case to avoid warnings Andy Shevchenko
2018-08-27 15:35   ` [PATCH v1 4/7] extcon: cht-wc: Fix definition names according to spec Andy Shevchenko
2018-08-27 15:35   ` [PATCH v1 5/7] extcon: cht-wc: Correct USBID bit field handling Andy Shevchenko
2018-08-27 15:35   ` [PATCH v1 6/7] extcon: cht-wc: Convert to use SPDX identifier Andy Shevchenko
2018-08-27 15:35   ` [PATCH v1 7/7] extcon: int3496: " Andy Shevchenko
2018-08-29  7:06   ` Chanwoo Choi [this message]

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=5B864609.2040405@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hdegoede@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.