mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Markus Elfring <Markus.Elfring@web.de>,
	linux-alpha@vger.kernel.org, Chen Gang <gang.chen@asianux.com>,
	Matt Turner <mattst88@gmail.com>,
	Richard Henderson <richard.henderson@linaro.org>
Cc: oe-kbuild-all@lists.linux.dev,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org,
	Miaoqian Lin <linmq006@gmail.com>
Subject: Re: [PATCH] alpha: Use pointers from memcpy() calls for assignments in two functions
Date: Fri, 31 Oct 2025 20:51:26 +0800	[thread overview]
Message-ID: <202510312008.rLcaBIfL-lkp@intel.com> (raw)
In-Reply-To: <1605dd43-5e95-46eb-a0c6-78ff8b4d51b3@web.de>

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@intel.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

  reply	other threads:[~2025-10-31 12:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-30 16:35 Markus Elfring
2025-10-31 12:51 ` kernel test robot [this message]
2025-11-29 13:46 ` Magnus Lindholm
2025-11-29 15:50   ` Markus Elfring
2025-11-29 16:55   ` [PATCH] " Dan Carpenter
2025-11-29 17:33     ` Magnus Lindholm

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=202510312008.rLcaBIfL-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Markus.Elfring@web.de \
    --cc=gang.chen@asianux.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linmq006@gmail.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=richard.henderson@linaro.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

all inboxes | Powered by JetHome®