linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Saurabh Sengar <saurabh.singh@xilinx.com>
Cc: Michal Simek <monstr@monstr.eu>,
	Pranavi Somisetty <pranavi.somisetty@xilinx.com>,
	kbuild-all@lists.01.org,
	Ravali Potineni <ravali.potineni@xilinx.com>,
	Syed Syed <syed.syed@xilinx.com>,
	Priyadarshini Babu <priyadarshini.babu@xilinx.com>,
	linux-arm-kernel@lists.infradead.org
Subject: [xlnx:xlnx_rebase_v5.4 1102/1697] include/uapi/linux/swab.h:20:38: warning: 'pmap' may be used uninitialized in this function
Date: Wed, 13 Jan 2021 02:14:55 +0800	[thread overview]
Message-ID: <202101130245.tyicqyTC-lkp@intel.com> (raw)

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

tree:   https://github.com/Xilinx/linux-xlnx xlnx_rebase_v5.4
head:   629150468791671b5fde21363e643e87c5815b17
commit: bbcf6f9bb1bc206330ca4d423e5a3966d8d82110 [1102/1697] net: xilinx: Add support for PL TSN IP features
config: h8300-allyesconfig (attached as .config)
compiler: h8300-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
        # https://github.com/Xilinx/linux-xlnx/commit/bbcf6f9bb1bc206330ca4d423e5a3966d8d82110
        git remote add xlnx https://github.com/Xilinx/linux-xlnx
        git fetch --no-tags xlnx xlnx_rebase_v5.4
        git checkout bbcf6f9bb1bc206330ca4d423e5a3966d8d82110
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300 

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

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:11,
                    from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:24,
                    from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
   include/linux/scatterlist.h: In function 'sg_set_buf':
   include/asm-generic/page.h:93:50: warning: ordered comparison of pointer with null pointer [-Wextra]
      93 | #define virt_addr_valid(kaddr) (((void *)(kaddr) >= (void *)PAGE_OFFSET) && \
         |                                                  ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |  ^~~~~~
   include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
     143 |  BUG_ON(!virt_addr_valid(buf));
         |          ^~~~~~~~~~~~~~~
   In file included from arch/h8300/include/asm/bug.h:8,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/h8300/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/ktime.h:24,
                    from include/linux/timer.h:6,
                    from include/linux/netdevice.h:24,
                    from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
   include/linux/dma-mapping.h: In function 'dma_map_resource':
   include/asm-generic/page.h:91:32: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
      91 | #define pfn_valid(pfn)  ((pfn) >= ARCH_PFN_OFFSET && ((pfn) - ARCH_PFN_OFFSET) < max_mapnr)
         |                                ^~
   include/asm-generic/bug.h:139:27: note: in definition of macro 'WARN_ON_ONCE'
     139 |  int __ret_warn_once = !!(condition);   \
         |                           ^~~~~~~~~
   include/linux/dma-mapping.h:355:19: note: in expansion of macro 'pfn_valid'
     355 |  if (WARN_ON_ONCE(pfn_valid(PHYS_PFN(phys_addr))))
         |                   ^~~~~~~~~
   In file included from include/linux/swab.h:5,
                    from include/uapi/linux/byteorder/big_endian.h:13,
                    from include/linux/byteorder/big_endian.h:5,
                    from arch/h8300/include/asm/byteorder.h:5,
                    from include/asm-generic/bitops/le.h:6,
                    from arch/h8300/include/asm/bitops.h:171,
                    from include/linux/bitops.h:26,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/timer.h:5,
                    from include/linux/netdevice.h:24,
                    from drivers/net/ethernet/xilinx/xilinx_axienet.h:12,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.h:21,
                    from drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:18:
   drivers/net/ethernet/xilinx/xilinx_tsn_switch.c: In function 'tsnswitch_probe':
>> include/uapi/linux/swab.h:20:38: warning: 'pmap' may be used uninitialized in this function [-Wmaybe-uninitialized]
      20 |  (((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |  \
         |                                      ^~
   drivers/net/ethernet/xilinx/xilinx_tsn_switch.c:580:6: note: 'pmap' was declared here
     580 |  u32 pmap;
         |      ^~~~


vim +/pmap +20 include/uapi/linux/swab.h

607ca46e97a1b659 David Howells 2012-10-13   8  
607ca46e97a1b659 David Howells 2012-10-13   9  /*
607ca46e97a1b659 David Howells 2012-10-13  10   * casts are necessary for constants, because we never know how for sure
607ca46e97a1b659 David Howells 2012-10-13  11   * how U/UL/ULL map to __u16, __u32, __u64. At least not in a portable way.
607ca46e97a1b659 David Howells 2012-10-13  12   */
607ca46e97a1b659 David Howells 2012-10-13  13  #define ___constant_swab16(x) ((__u16)(				\
607ca46e97a1b659 David Howells 2012-10-13  14  	(((__u16)(x) & (__u16)0x00ffU) << 8) |			\
607ca46e97a1b659 David Howells 2012-10-13  15  	(((__u16)(x) & (__u16)0xff00U) >> 8)))
607ca46e97a1b659 David Howells 2012-10-13  16  
607ca46e97a1b659 David Howells 2012-10-13  17  #define ___constant_swab32(x) ((__u32)(				\
607ca46e97a1b659 David Howells 2012-10-13  18  	(((__u32)(x) & (__u32)0x000000ffUL) << 24) |		\
607ca46e97a1b659 David Howells 2012-10-13  19  	(((__u32)(x) & (__u32)0x0000ff00UL) <<  8) |		\
607ca46e97a1b659 David Howells 2012-10-13 @20  	(((__u32)(x) & (__u32)0x00ff0000UL) >>  8) |		\
607ca46e97a1b659 David Howells 2012-10-13  21  	(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
607ca46e97a1b659 David Howells 2012-10-13  22  

:::::: The code at line 20 was first introduced by commit
:::::: 607ca46e97a1b6594b29647d98a32d545c24bdff UAPI: (Scripted) Disintegrate include/linux

:::::: TO: David Howells <dhowells@redhat.com>
:::::: CC: David Howells <dhowells@redhat.com>

---
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: 52689 bytes --]

[-- Attachment #3: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

                 reply	other threads:[~2021-01-12 18:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202101130245.tyicqyTC-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=monstr@monstr.eu \
    --cc=pranavi.somisetty@xilinx.com \
    --cc=priyadarshini.babu@xilinx.com \
    --cc=ravali.potineni@xilinx.com \
    --cc=saurabh.singh@xilinx.com \
    --cc=syed.syed@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;
as well as URLs for NNTP newsgroup(s).