linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arch/csky/include/asm/uaccess.h:158:2: warning: 'retval' is used uninitialized in this function
@ 2021-07-09  6:37 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-09  6:37 UTC (permalink / raw)
  To: Guo Ren; +Cc: kbuild-all, linux-kernel

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

Hi Guo,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   f55966571d5eb2876a11e48e798b4592fa1ffbb7
commit: e58a41c2226847fb1446f3942dc1b55af8acfe02 csky: uaccess.h: Coding convention with asm generic
date:   2 months ago
config: csky-buildonly-randconfig-r006-20210709 (attached as .config)
compiler: csky-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e58a41c2226847fb1446f3942dc1b55af8acfe02
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e58a41c2226847fb1446f3942dc1b55af8acfe02
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=csky 

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

   In file included from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:33,
                    from include/linux/huge_mm.h:8,
                    from include/linux/mm.h:707,
                    from include/linux/mman.h:5,
                    from lib/test_user_copy.c:13:
   arch/csky/include/asm/uaccess.h: In function '__get_user_fn.constprop':
>> arch/csky/include/asm/uaccess.h:158:2: warning: 'retval' is used uninitialized in this function [-Wuninitialized]
     158 |  __asm__ __volatile__(    \
         |  ^~~~~~~
   arch/csky/include/asm/uaccess.h:181:6: note: 'retval' was declared here
     181 |  int retval;
         |      ^~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for LOCKDEP
   Depends on DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT && (FRAME_POINTER || MIPS || PPC || S390 || MICROBLAZE || ARM || ARC || X86)
   Selected by
   - LOCK_STAT && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT
   - DEBUG_LOCK_ALLOC && DEBUG_KERNEL && LOCK_DEBUGGING_SUPPORT


vim +/retval +158 arch/csky/include/asm/uaccess.h

   152	
   153	#define __get_user_asm_64(x, ptr, err)			\
   154	do {							\
   155		int tmp;					\
   156		int errcode;					\
   157								\
 > 158		__asm__ __volatile__(				\
   159		"1:   ldw     %3, (%2, 0)     \n"		\
   160		"     stw     %3, (%1, 0)     \n"		\
   161		"2:   ldw     %3, (%2, 4)     \n"		\
   162		"     stw     %3, (%1, 4)     \n"		\
   163		"     br      4f              \n"		\
   164		"3:   mov     %0, %4          \n"		\
   165		"     br      4f              \n"		\
   166		".section __ex_table, \"a\"   \n"		\
   167		".align   2                   \n"		\
   168		".long    1b, 3b              \n"		\
   169		".long    2b, 3b              \n"		\
   170		".previous                    \n"		\
   171		"4:                           \n"		\
   172		: "=r"(err), "=r"(x), "=r"(ptr),		\
   173		  "=r"(tmp), "=r"(errcode)			\
   174		: "0"(err), "1"(x), "2"(ptr), "3"(0),		\
   175		  "4"(-EFAULT)					\
   176		: "memory");					\
   177	} while (0)
   178	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* arch/csky/include/asm/uaccess.h:158:2: warning: 'retval' is used uninitialized in this function
@ 2021-05-05  8:02 kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-05-05  8:02 UTC (permalink / raw)
  To: Guo Ren; +Cc: kbuild-all, linux-kernel

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

Hi Guo,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   d665ea6ea86c785760ee4bad4543dab3267ad074
commit: e58a41c2226847fb1446f3942dc1b55af8acfe02 csky: uaccess.h: Coding convention with asm generic
date:   7 days ago
config: csky-randconfig-r023-20210505 (attached as .config)
compiler: csky-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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e58a41c2226847fb1446f3942dc1b55af8acfe02
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout e58a41c2226847fb1446f3942dc1b55af8acfe02
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=csky 

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

   In file included from include/linux/uaccess.h:11,
                    from include/linux/sched/task.h:11,
                    from include/linux/sched/signal.h:9,
                    from include/linux/rcuwait.h:6,
                    from include/linux/percpu-rwsem.h:7,
                    from include/linux/fs.h:33,
                    from include/linux/huge_mm.h:8,
                    from include/linux/mm.h:707,
                    from include/linux/mman.h:5,
                    from lib/test_user_copy.c:13:
   arch/csky/include/asm/uaccess.h: In function '__get_user_fn.constprop':
>> arch/csky/include/asm/uaccess.h:158:2: warning: 'retval' is used uninitialized in this function [-Wuninitialized]
     158 |  __asm__ __volatile__(    \
         |  ^~~~~~~
   arch/csky/include/asm/uaccess.h:181:6: note: 'retval' was declared here
     181 |  int retval;
         |      ^~~~~~


vim +/retval +158 arch/csky/include/asm/uaccess.h

   152	
   153	#define __get_user_asm_64(x, ptr, err)			\
   154	do {							\
   155		int tmp;					\
   156		int errcode;					\
   157								\
 > 158		__asm__ __volatile__(				\
   159		"1:   ldw     %3, (%2, 0)     \n"		\
   160		"     stw     %3, (%1, 0)     \n"		\
   161		"2:   ldw     %3, (%2, 4)     \n"		\
   162		"     stw     %3, (%1, 4)     \n"		\
   163		"     br      4f              \n"		\
   164		"3:   mov     %0, %4          \n"		\
   165		"     br      4f              \n"		\
   166		".section __ex_table, \"a\"   \n"		\
   167		".align   2                   \n"		\
   168		".long    1b, 3b              \n"		\
   169		".long    2b, 3b              \n"		\
   170		".previous                    \n"		\
   171		"4:                           \n"		\
   172		: "=r"(err), "=r"(x), "=r"(ptr),		\
   173		  "=r"(tmp), "=r"(errcode)			\
   174		: "0"(err), "1"(x), "2"(ptr), "3"(0),		\
   175		  "4"(-EFAULT)					\
   176		: "memory");					\
   177	} while (0)
   178	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-09  7:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-09  6:37 arch/csky/include/asm/uaccess.h:158:2: warning: 'retval' is used uninitialized in this function kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-05-05  8:02 kernel test robot

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