netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: natechancellor@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	clang-built-linux@googlegroups.com, ndesaulniers@google.com
Subject: Re: [PATCH] net: atm: Use IS_ENABLED in atm_dev_ioctl
Date: Thu, 07 Mar 2019 09:53:14 -0800 (PST)	[thread overview]
Message-ID: <20190307.095314.717279119845244235.davem@davemloft.net> (raw)
In-Reply-To: <20190307165741.19870-1-natechancellor@gmail.com>

From: Nathan Chancellor <natechancellor@gmail.com>
Date: Thu,  7 Mar 2019 09:57:42 -0700

> When building with -Wsometimes-uninitialized, Clang warns:
> 
> net/atm/resources.c:256:6: warning: variable 'number' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> net/atm/resources.c:212:7: warning: variable 'iobuf_len' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
> 
> Clang won't realize that compat is 0 when CONFIG_COMPAT is not set until
> the constant folding stage, which happens after this semantic analysis.
> Use IS_ENABLED instead so that the zero is present at the semantic
> analysis stage, which eliminates this warning.
> 
> Link: https://github.com/ClangBuiltLinux/linux/issues/386
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Applied, thanks.

 

  reply	other threads:[~2019-03-07 17:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 16:57 [PATCH] net: atm: Use IS_ENABLED in atm_dev_ioctl Nathan Chancellor
2019-03-07 17:53 ` David Miller [this message]
2019-03-07 18:11 ` [PATCH] net: atm: Add another IS_ENABLED(CONFIG_COMPAT) " Nathan Chancellor
2019-03-07 18:59   ` David Miller

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=20190307.095314.717279119845244235.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).