public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
To: kernel test robot <lkp@intel.com>
Cc: Anand Ashok Dumbre <anand.ashok.dumbre@xilinx.com>,
	<kbuild-all@lists.01.org>, <linux-kernel@vger.kernel.org>,
	Manish Narani <manish.narani@xilinx.com>,
	<linux-sh@vger.kernel.org>
Subject: Re: drivers/iio/adc/xilinx-ams.c:1195:21: error: unused variable 'ams'
Date: Mon, 14 Feb 2022 15:19:05 +0000	[thread overview]
Message-ID: <20220214151905.00005a27@Huawei.com> (raw)
In-Reply-To: <202202142203.4ofqbic9-lkp@intel.com>

On Mon, 14 Feb 2022 22:47:14 +0800
kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   754e0b0e35608ed5206d6a67a791563c631cec07
> commit: d5c70627a79455154f5f636096abe6fe57510605 iio: adc: Add Xilinx AMS driver
> date:   8 weeks ago
> config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20220214/202202142203.4ofqbic9-lkp@intel.com/config)
> compiler: sh4-linux-gcc (GCC) 11.2.0
> 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
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d5c70627a79455154f5f636096abe6fe57510605
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout d5c70627a79455154f5f636096abe6fe57510605
>         # save the config file to linux build tree
>         mkdir build_dir
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=sh SHELL=/bin/bash drivers/iio/adc/ drivers/net/ethernet/freescale/
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>

I'm very tempted to say won't fix on this at least not in the IIO code.

The issue I think is the stub for iounmap on sh with no MMU not using the argument because it's
defined as a while loop rather than as an empty static inline function which is what we'd
get it it wasn't defined at all (AFAICT).

If anyone wants to take this on, my guess is drop
https://elixir.bootlin.com/linux/latest/source/arch/sh/include/asm/io.h#L274
and see if everything still works and the warning goes away.

+CC linux-sh for inputs.

Thanks,

Jonathan


> 
> All errors (new ones prefixed by >>):
> 
>    drivers/iio/adc/xilinx-ams.c: In function 'ams_iounmap_ps':
> >> drivers/iio/adc/xilinx-ams.c:1195:21: error: unused variable 'ams' [-Werror=unused-variable]  
>     1195 |         struct ams *ams = data;
>          |                     ^~~
>    drivers/iio/adc/xilinx-ams.c: In function 'ams_iounmap_pl':
>    drivers/iio/adc/xilinx-ams.c:1202:21: error: unused variable 'ams' [-Werror=unused-variable]
>     1202 |         struct ams *ams = data;
>          |                     ^~~
>    cc1: all warnings being treated as errors
> 
> 
> vim +/ams +1195 drivers/iio/adc/xilinx-ams.c
> 
>   1192	
>   1193	static void ams_iounmap_ps(void *data)
>   1194	{
> > 1195		struct ams *ams = data;  
>   1196	
>   1197		iounmap(ams->ps_base);
>   1198	}
>   1199	
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


  reply	other threads:[~2022-02-14 15:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 14:47 drivers/iio/adc/xilinx-ams.c:1195:21: error: unused variable 'ams' kernel test robot
2022-02-14 15:19 ` Jonathan Cameron [this message]
2022-02-15  8:33   ` Geert Uytterhoeven
2022-02-15  8:53     ` Geert Uytterhoeven

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=20220214151905.00005a27@Huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=anand.ashok.dumbre@xilinx.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=manish.narani@xilinx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox