[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202510312008.rLcaBIfL-lkp@intel.com>
Date: Fri, 31 Oct 2025 20:51:26 +0800
From: kernel test robot <lkp@...el.com>
To: Markus Elfring <Markus.Elfring@....de>, linux-alpha@...r.kernel.org,
Chen Gang <gang.chen@...anux.com>, Matt Turner <mattst88@...il.com>,
Richard Henderson <richard.henderson@...aro.org>
Cc: oe-kbuild-all@...ts.linux.dev, LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org, Miaoqian Lin <linmq006@...il.com>
Subject: Re: [PATCH] alpha: Use pointers from memcpy() calls for assignments
in two functions
Hi Markus,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on mattst88-alpha/for-linus v6.18-rc3 next-20251031]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Markus-Elfring/alpha-Use-pointers-from-memcpy-calls-for-assignments-in-two-functions/20251031-003938
base: linus/master
patch link: https://lore.kernel.org/r/1605dd43-5e95-46eb-a0c6-78ff8b4d51b3%40web.de
patch subject: [PATCH] alpha: Use pointers from memcpy() calls for assignments in two functions
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20251031/202510312008.rLcaBIfL-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251031/202510312008.rLcaBIfL-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202510312008.rLcaBIfL-lkp@intel.com/
All warnings (new ones prefixed by >>):
arch/alpha/kernel/smp.c: In function 'send_secondary_console_msg':
>> arch/alpha/kernel/smp.c:201:24: warning: variable 'cp1' set but not used [-Wunused-but-set-variable]
201 | register char *cp1, *cp2;
| ^~~
arch/alpha/kernel/smp.c: In function 'recv_secondary_console_msg':
arch/alpha/kernel/smp.c:237:13: warning: variable 'mycpu' set but not used [-Wunused-but-set-variable]
237 | int mycpu, i, cnt;
| ^~~~~
vim +/cp1 +201 arch/alpha/kernel/smp.c
^1da177e4c3f415 Linus Torvalds 2005-04-16 192
^1da177e4c3f415 Linus Torvalds 2005-04-16 193 /*
^1da177e4c3f415 Linus Torvalds 2005-04-16 194 * Send a message to a secondary's console. "START" is one such
^1da177e4c3f415 Linus Torvalds 2005-04-16 195 * interesting message. ;-)
^1da177e4c3f415 Linus Torvalds 2005-04-16 196 */
ab39c77c3246f84 Paul Gortmaker 2013-06-17 197 static void
^1da177e4c3f415 Linus Torvalds 2005-04-16 198 send_secondary_console_msg(char *str, int cpuid)
^1da177e4c3f415 Linus Torvalds 2005-04-16 199 {
^1da177e4c3f415 Linus Torvalds 2005-04-16 200 struct percpu_struct *cpu;
^1da177e4c3f415 Linus Torvalds 2005-04-16 @201 register char *cp1, *cp2;
^1da177e4c3f415 Linus Torvalds 2005-04-16 202 unsigned long cpumask;
^1da177e4c3f415 Linus Torvalds 2005-04-16 203 size_t len;
^1da177e4c3f415 Linus Torvalds 2005-04-16 204
^1da177e4c3f415 Linus Torvalds 2005-04-16 205 cpu = (struct percpu_struct *)
^1da177e4c3f415 Linus Torvalds 2005-04-16 206 ((char*)hwrpb
^1da177e4c3f415 Linus Torvalds 2005-04-16 207 + hwrpb->processor_offset
^1da177e4c3f415 Linus Torvalds 2005-04-16 208 + cpuid * hwrpb->processor_size);
^1da177e4c3f415 Linus Torvalds 2005-04-16 209
^1da177e4c3f415 Linus Torvalds 2005-04-16 210 cpumask = (1UL << cpuid);
^1da177e4c3f415 Linus Torvalds 2005-04-16 211 if (wait_for_txrdy(cpumask))
^1da177e4c3f415 Linus Torvalds 2005-04-16 212 goto timeout;
^1da177e4c3f415 Linus Torvalds 2005-04-16 213
^1da177e4c3f415 Linus Torvalds 2005-04-16 214 cp2 = str;
^1da177e4c3f415 Linus Torvalds 2005-04-16 215 len = strlen(cp2);
^1da177e4c3f415 Linus Torvalds 2005-04-16 216 *(unsigned int *)&cpu->ipc_buffer[0] = len;
c37a29a96dcfc93 Markus Elfring 2025-10-30 217 cp1 = memcpy(&cpu->ipc_buffer[1], cp2, len);
^1da177e4c3f415 Linus Torvalds 2005-04-16 218
^1da177e4c3f415 Linus Torvalds 2005-04-16 219 /* atomic test and set */
^1da177e4c3f415 Linus Torvalds 2005-04-16 220 wmb();
^1da177e4c3f415 Linus Torvalds 2005-04-16 221 set_bit(cpuid, &hwrpb->rxrdy);
^1da177e4c3f415 Linus Torvalds 2005-04-16 222
^1da177e4c3f415 Linus Torvalds 2005-04-16 223 if (wait_for_txrdy(cpumask))
^1da177e4c3f415 Linus Torvalds 2005-04-16 224 goto timeout;
^1da177e4c3f415 Linus Torvalds 2005-04-16 225 return;
^1da177e4c3f415 Linus Torvalds 2005-04-16 226
^1da177e4c3f415 Linus Torvalds 2005-04-16 227 timeout:
^1da177e4c3f415 Linus Torvalds 2005-04-16 228 printk("Processor %x not ready\n", cpuid);
^1da177e4c3f415 Linus Torvalds 2005-04-16 229 }
^1da177e4c3f415 Linus Torvalds 2005-04-16 230
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists