LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Nathan Chancellor <nathan@kernel.org>,
	"Gustavo A. R. Silva" <gustavoars@kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	LKML <linux-kernel@vger.kernel.org>,
	Kees Cook <keescook@chromium.org>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	linux-kbuild@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>
Subject: Re: [PATCH] kbuild: Enable -Wimplicit-fallthrough for clang 14.0.0+
Date: Tue, 17 Aug 2021 12:16:01 +0800	[thread overview]
Message-ID: <202108171208.eXOwrLQr-lkp@intel.com> (raw)
In-Reply-To: <20210817005624.1455428-1-nathan@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 6342 bytes --]

Hi Nathan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on a2824f19e6065a0d3735acd9fe7155b104e7edf5]

url:    https://github.com/0day-ci/linux/commits/Nathan-Chancellor/kbuild-Enable-Wimplicit-fallthrough-for-clang-14-0-0/20210817-085926
base:   a2824f19e6065a0d3735acd9fe7155b104e7edf5
config: mips-randconfig-r003-20210816 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 2c6448cdc2f68f8c28fd0bd9404182b81306e6e6)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://github.com/0day-ci/linux/commit/358205a0573f713b532173c9cf3c9efa052dc9d0
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nathan-Chancellor/kbuild-Enable-Wimplicit-fallthrough-for-clang-14-0-0/20210817-085926
        git checkout 358205a0573f713b532173c9cf3c9efa052dc9d0
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   sound/core/pcm_native.c:273:18: warning: variable 'old_mask' set but not used [-Wunused-but-set-variable]
           struct snd_mask old_mask;
                           ^
   sound/core/pcm_native.c:309:22: warning: variable 'old_interval' set but not used [-Wunused-but-set-variable]
           struct snd_interval old_interval;
                               ^
   sound/core/pcm_native.c:350:22: warning: variable 'old_interval' set but not used [-Wunused-but-set-variable]
           struct snd_interval old_interval;
                               ^
   sound/core/pcm_native.c:349:18: warning: variable 'old_mask' set but not used [-Wunused-but-set-variable]
           struct snd_mask old_mask;
                           ^
   sound/core/pcm_native.c:633:18: warning: variable 'old_mask' set but not used [-Wunused-but-set-variable]
           struct snd_mask old_mask;
                           ^
   sound/core/pcm_native.c:634:22: warning: variable 'old_interval' set but not used [-Wunused-but-set-variable]
           struct snd_interval old_interval;
                               ^
>> sound/core/pcm_native.c:3815:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
                   fallthrough;
                   ^
   include/linux/compiler_attributes.h:210:41: note: expanded from macro 'fallthrough'
   # define fallthrough                    __attribute__((__fallthrough__))
                                           ^
   sound/core/pcm_native.c:3823:3: warning: fallthrough annotation in unreachable code [-Wimplicit-fallthrough]
                   fallthrough;
                   ^
   include/linux/compiler_attributes.h:210:41: note: expanded from macro 'fallthrough'
   # define fallthrough                    __attribute__((__fallthrough__))
                                           ^
   8 warnings generated.


vim +3815 sound/core/pcm_native.c

e88e8ae639a490 Takashi Iwai        2006-04-28  3798  
^1da177e4c3f41 Linus Torvalds      2005-04-16  3799  static int snd_pcm_mmap(struct file *file, struct vm_area_struct *area)
^1da177e4c3f41 Linus Torvalds      2005-04-16  3800  {
877211f5e1b119 Takashi Iwai        2005-11-17  3801  	struct snd_pcm_file * pcm_file;
877211f5e1b119 Takashi Iwai        2005-11-17  3802  	struct snd_pcm_substream *substream;	
^1da177e4c3f41 Linus Torvalds      2005-04-16  3803  	unsigned long offset;
^1da177e4c3f41 Linus Torvalds      2005-04-16  3804  	
^1da177e4c3f41 Linus Torvalds      2005-04-16  3805  	pcm_file = file->private_data;
^1da177e4c3f41 Linus Torvalds      2005-04-16  3806  	substream = pcm_file->substream;
7eaa943c8ed8e9 Takashi Iwai        2008-08-08  3807  	if (PCM_RUNTIME_CHECK(substream))
7eaa943c8ed8e9 Takashi Iwai        2008-08-08  3808  		return -ENXIO;
^1da177e4c3f41 Linus Torvalds      2005-04-16  3809  
^1da177e4c3f41 Linus Torvalds      2005-04-16  3810  	offset = area->vm_pgoff << PAGE_SHIFT;
^1da177e4c3f41 Linus Torvalds      2005-04-16  3811  	switch (offset) {
80fe7430c70859 Arnd Bergmann       2018-04-24  3812  	case SNDRV_PCM_MMAP_OFFSET_STATUS_OLD:
80fe7430c70859 Arnd Bergmann       2018-04-24  3813  		if (pcm_file->no_compat_mmap || !IS_ENABLED(CONFIG_64BIT))
80fe7430c70859 Arnd Bergmann       2018-04-24  3814  			return -ENXIO;
c0dbbdad4e11f8 Gustavo A. R. Silva 2020-07-08 @3815  		fallthrough;
80fe7430c70859 Arnd Bergmann       2018-04-24  3816  	case SNDRV_PCM_MMAP_OFFSET_STATUS_NEW:
42f945970af9df Takashi Iwai        2017-06-19  3817  		if (!pcm_status_mmap_allowed(pcm_file))
^1da177e4c3f41 Linus Torvalds      2005-04-16  3818  			return -ENXIO;
^1da177e4c3f41 Linus Torvalds      2005-04-16  3819  		return snd_pcm_mmap_status(substream, file, area);
80fe7430c70859 Arnd Bergmann       2018-04-24  3820  	case SNDRV_PCM_MMAP_OFFSET_CONTROL_OLD:
80fe7430c70859 Arnd Bergmann       2018-04-24  3821  		if (pcm_file->no_compat_mmap || !IS_ENABLED(CONFIG_64BIT))
80fe7430c70859 Arnd Bergmann       2018-04-24  3822  			return -ENXIO;
c0dbbdad4e11f8 Gustavo A. R. Silva 2020-07-08  3823  		fallthrough;
80fe7430c70859 Arnd Bergmann       2018-04-24  3824  	case SNDRV_PCM_MMAP_OFFSET_CONTROL_NEW:
b602aa8eb1a0f5 Takashi Iwai        2017-06-27  3825  		if (!pcm_control_mmap_allowed(pcm_file))
^1da177e4c3f41 Linus Torvalds      2005-04-16  3826  			return -ENXIO;
^1da177e4c3f41 Linus Torvalds      2005-04-16  3827  		return snd_pcm_mmap_control(substream, file, area);
^1da177e4c3f41 Linus Torvalds      2005-04-16  3828  	default:
^1da177e4c3f41 Linus Torvalds      2005-04-16  3829  		return snd_pcm_mmap_data(substream, file, area);
^1da177e4c3f41 Linus Torvalds      2005-04-16  3830  	}
^1da177e4c3f41 Linus Torvalds      2005-04-16  3831  	return 0;
^1da177e4c3f41 Linus Torvalds      2005-04-16  3832  }
^1da177e4c3f41 Linus Torvalds      2005-04-16  3833  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34833 bytes --]

  reply	other threads:[~2021-08-17  4:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17  0:56 Nathan Chancellor
2021-08-17  4:16 ` kernel test robot [this message]
2021-08-17  4:20 ` Nathan Chancellor
2021-08-17  4:37   ` Linus Torvalds
2021-08-17  4:55     ` Nathan Chancellor
2021-08-17 18:03       ` Kees Cook
2021-08-17 18:25         ` Nathan Chancellor
2021-08-17 21:17           ` Masahiro Yamada
2021-08-17 21:33             ` Gustavo A. R. Silva
2021-08-17 23:06               ` Kees Cook
2021-08-17 23:23                 ` Nathan Chancellor
2021-08-17 23:40                   ` Gustavo A. R. Silva
2021-08-18  4:15                   ` Masahiro Yamada
2021-08-18  4:27                   ` Philip Li
2021-08-18  4:45                     ` Gustavo A. R. Silva
2021-08-18  7:31                       ` Philip Li
2021-08-18 12:12                   ` Mark Brown
2021-08-25 21:09             ` Nick Desaulniers

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=202108171208.eXOwrLQr-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=gustavoars@kernel.org \
    --cc=kbuild-all@lists.01.org \
    --cc=keescook@chromium.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [PATCH] kbuild: Enable -Wimplicit-fallthrough for clang 14.0.0+' \
    /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

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).