From: Michael Schmitz <schmitzmic@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org, Michael Schmitz <schmitz@debian.org>
Subject: Re: [m68k:m68k-queue 8/13] drivers/usb/host/isp116x.h:370:87: note: in expansion of macro 'isa_rom_writew_raw'
Date: Sat, 30 May 2020 11:23:58 +1200 [thread overview]
Message-ID: <18b6b8b1-d91e-56c9-2eef-6d79fc0ad3e9@gmail.com> (raw)
In-Reply-To: <202005300247.nivoTcuo%lkp@intel.com>
Hi Geert,
the __w is used as a dummy read variable to execute a read cycle where
the address encodes the value to be written to the peripheral on the ROM
port. The value of this dummy variable is of no consequence (and may
very well be undefined).
How do I annotate this so the compiler will shut up about it?
Cheers,
Michael
Am 30.05.2020 um 06:19 schrieb kbuild test robot:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git m68k-queue
> head: 5e423cc0afd9cc668eba93f37fd9975db9a9d96c
> commit: ef0029557f6a4845901edc3f08a2fe21a16c982c [8/13] m68k: atari: usb: Add ISP1160 USB host controller support
> config: m68k-allmodconfig (attached as .config)
> compiler: m68k-linux-gcc (GCC) 9.3.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
> git checkout ef0029557f6a4845901edc3f08a2fe21a16c982c
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All warnings (new ones prefixed by >>, old ones prefixed by <<):
>
> In file included from arch/m68k/include/asm/io_mm.h:25,
> from arch/m68k/include/asm/io.h:8,
> from include/linux/io.h:13,
> from include/linux/irq.h:20,
> from include/asm-generic/hardirq.h:13,
> from ./arch/m68k/include/generated/asm/hardirq.h:1,
> from include/linux/hardirq.h:9,
> from include/linux/interrupt.h:11,
> from include/linux/usb.h:16,
> from drivers/usb/host/isp116x-hcd.c:66:
> arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsb':
> arch/m68k/include/asm/raw_io.h:83:7: warning: variable '__w' set but not used [-Wunused-but-set-variable]
> 83 | ({u8 __w, __v = (b); u32 _addr = ((u32) (addr)); | ^~~
> arch/m68k/include/asm/raw_io.h:430:3: note: in expansion of macro 'rom_out_8'
> 430 | rom_out_8(port, *buf++);
> | ^~~~~~~~~
> arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw':
> arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
> 86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); | ^~~
> arch/m68k/include/asm/raw_io.h:448:3: note: in expansion of macro 'rom_out_be16'
> 448 | rom_out_be16(port, *buf++);
> | ^~~~~~~~~~~~
> arch/m68k/include/asm/raw_io.h: In function 'raw_rom_outsw_swapw':
> arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
> 90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); | ^~~
> arch/m68k/include/asm/raw_io.h:466:3: note: in expansion of macro 'rom_out_le16'
> 466 | rom_out_le16(port, *buf++);
> | ^~~~~~~~~~~~
> drivers/usb/host/isp116x.h: In function 'isp116x_write_addr':
> arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
> 86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); | ^~~
> arch/m68k/include/asm/io_mm.h:246:37: note: in expansion of macro 'rom_out_be16'
> 246 | #define isa_rom_writew_raw(val, p) rom_out_be16(isa_mtw((unsigned long)(p)), (val))
> | ^~~~~~~~~~~~
>>> drivers/usb/host/isp116x.h:370:87: note: in expansion of macro 'isa_rom_writew_raw'
> 370 | #define isp_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew_raw((v), __pa(p)) : __raw_writew((v), (p)))
> | ^~~~~~~~~~~~~~~~~~
> drivers/usb/host/isp116x.h:391:2: note: in expansion of macro 'isp_writew'
> 391 | isp_writew(reg & 0xff, isp116x->addr_reg);
> | ^~~~~~~~~~
> drivers/usb/host/isp116x.h: In function 'isp116x_write_data16':
> arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
> 86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); | ^~~
> arch/m68k/include/asm/io_mm.h:246:37: note: in expansion of macro 'rom_out_be16'
> 246 | #define isa_rom_writew_raw(val, p) rom_out_be16(isa_mtw((unsigned long)(p)), (val))
> | ^~~~~~~~~~~~
>>> drivers/usb/host/isp116x.h:370:87: note: in expansion of macro 'isa_rom_writew_raw'
> 370 | #define isp_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew_raw((v), __pa(p)) : __raw_writew((v), (p)))
> | ^~~~~~~~~~~~~~~~~~
> drivers/usb/host/isp116x.h:397:2: note: in expansion of macro 'isp_writew'
> 397 | isp_writew(val, isp116x->data_reg);
> | ^~~~~~~~~~
> drivers/usb/host/isp116x.h: In function 'isp116x_raw_write_data16':
> arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
> 86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); | ^~~
> arch/m68k/include/asm/io_mm.h:241:13: note: in expansion of macro 'rom_out_be16'
> 241 | (ISA_SEX ? rom_out_be16(isa_mtw((unsigned long)(p)), (val)) | ^~~~~~~~~~~~
>>> drivers/usb/host/isp116x.h:372:91: note: in expansion of macro 'isa_rom_writew'
> 372 | #define isp_raw_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew((v), __pa(p)) : writew((v), (p)))
> | ^~~~~~~~~~~~~~
> drivers/usb/host/isp116x.h:403:2: note: in expansion of macro 'isp_raw_writew'
> 403 | isp_raw_writew(val, isp116x->data_reg);
> | ^~~~~~~~~~~~~~
> arch/m68k/include/asm/raw_io.h:90:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
> 90 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); | ^~~
> arch/m68k/include/asm/io_mm.h:242:6: note: in expansion of macro 'rom_out_le16'
> 242 | : rom_out_le16(isa_mtw((unsigned long)(p)), (val)))
> | ^~~~~~~~~~~~
>>> drivers/usb/host/isp116x.h:372:91: note: in expansion of macro 'isa_rom_writew'
> 372 | #define isp_raw_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew((v), __pa(p)) : writew((v), (p)))
> | ^~~~~~~~~~~~~~
> drivers/usb/host/isp116x.h:403:2: note: in expansion of macro 'isp_raw_writew'
> 403 | isp_raw_writew(val, isp116x->data_reg);
> | ^~~~~~~~~~~~~~
> drivers/usb/host/isp116x.h: In function 'isp116x_write_data32':
> arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
> 86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); | ^~~
> arch/m68k/include/asm/io_mm.h:246:37: note: in expansion of macro 'rom_out_be16'
> 246 | #define isa_rom_writew_raw(val, p) rom_out_be16(isa_mtw((unsigned long)(p)), (val))
> | ^~~~~~~~~~~~
>>> drivers/usb/host/isp116x.h:370:87: note: in expansion of macro 'isa_rom_writew_raw'
> 370 | #define isp_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew_raw((v), __pa(p)) : __raw_writew((v), (p)))
> | ^~~~~~~~~~~~~~~~~~
> drivers/usb/host/isp116x.h:427:2: note: in expansion of macro 'isp_writew'
> 427 | isp_writew(val & 0xffff, isp116x->data_reg);
> | ^~~~~~~~~~
> arch/m68k/include/asm/raw_io.h:86:8: warning: variable '__w' set but not used [-Wunused-but-set-variable]
> 86 | ({u16 __w, __v = (w); u32 _addr = ((u32) (addr)); | ^~~
> arch/m68k/include/asm/io_mm.h:246:37: note: in expansion of macro 'rom_out_be16'
> 246 | #define isa_rom_writew_raw(val, p) rom_out_be16(isa_mtw((unsigned long)(p)), (val))
> | ^~~~~~~~~~~~
>>> drivers/usb/host/isp116x.h:370:87: note: in expansion of macro 'isa_rom_writew_raw'
> 370 | #define isp_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew_raw((v), __pa(p)) : __raw_writew((v), (p)))
> | ^~~~~~~~~~~~~~~~~~
> drivers/usb/host/isp116x.h:429:2: note: in expansion of macro 'isp_writew'
> 429 | isp_writew(val >> 16, isp116x->data_reg);
> | ^~~~~~~~~~
>
> vim +/isa_rom_writew_raw +370 drivers/usb/host/isp116x.h
>
> 357
> 358
> 359 #ifdef CONFIG_ATARI_ROM_ISA
> 360 /*
> 361 * 16 bit data bus byte swapped in hardware on both Atari variants.
> 362 * EtherNAT variant of ISP1160 integration is memory mapped at 0x800000XX,
> 363 * and uses regular readw/__raw_readw (but semantics swapped).
> 364 * NetUSBee variant is hooked up through ROM port and uses ROM port
> 365 * IO access, with fake IO address of 0x3XX.
> 366 * Selection of the appropriate accessors relies on ioremapped addresses still
> 367 * retaining the 0x3XX bit.
> 368 */
> 369 #define isp_readw(p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_readw_raw(__pa(p)) : __raw_readw((p)))
> > 370 #define isp_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew_raw((v), __pa(p)) : __raw_writew((v), (p)))
> 371 #define isp_raw_readw(p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_readw(__pa(p)) : readw((p)))
> > 372 #define isp_raw_writew(v, p) ((((unsigned long)(__pa(p)) & 0x00000F00) == 0x00000300UL) ? isa_rom_writew((v), __pa(p)) : writew((v), (p)))
> 373 #elif defined(CONFIG_ATARI)
> 374 /*
> 375 * 16 bit data bus byte swapped in hardware on EtherNAT only.
> 376 */
> 377 #define isp_readw __raw_readw
> 378 #define isp_writew __raw_writew
> 379 #define isp_raw_readw readw
> 380 #define isp_raw_writew writew
> 381 #else
> 382 /* sane hardware */
> 383 #define isp_readw readw
> 384 #define isp_writew writew
> 385 #define isp_raw_readw __raw_readw
> 386 #define isp_raw_writew __raw_writew
> 387 #endif
> 388
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
>
next prev parent reply other threads:[~2020-05-29 23:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 18:19 [m68k:m68k-queue 8/13] drivers/usb/host/isp116x.h:370:87: note: in expansion of macro 'isa_rom_writew_raw' kbuild test robot
2020-05-29 23:23 ` Michael Schmitz [this message]
2020-05-29 23:32 ` Finn Thain
2020-05-30 22:45 ` Michael Schmitz
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=18b6b8b1-d91e-56c9-2eef-6d79fc0ad3e9@gmail.com \
--to=schmitzmic@gmail.com \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=schmitz@debian.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