Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [PATCH] usb: typec: tcpm: replace strcpy with strscpy
       [not found] <20260419213638.38291-2-m32285159@gmail.com>
@ 2026-04-28 23:11 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-04-28 23:11 UTC (permalink / raw)
  To: Maxwell Doose, badhri, heikki.krogerus, gregkh
  Cc: llvm, oe-kbuild-all, linux-usb, linux-kernel

Hi Maxwell,

kernel test robot noticed the following build errors:

[auto build test ERROR on v7.0]
[cannot apply to usb/usb-testing usb/usb-next usb/usb-linus linus/master next-20260428]
[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/Maxwell-Doose/usb-typec-tcpm-replace-strcpy-with-strscpy/20260427-011111
base:   v7.0
patch link:    https://lore.kernel.org/r/20260419213638.38291-2-m32285159%40gmail.com
patch subject: [PATCH] usb: typec: tcpm: replace strcpy with strscpy
config: riscv-allyesconfig (https://download.01.org/0day-ci/archive/20260429/202604290711.kHqUSJ8v-lkp@intel.com/config)
compiler: clang version 16.0.6 (https://github.com/llvm/llvm-project 7cbf1a2591520c2491aa35339f227775f4d3adf6)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260429/202604290711.kHqUSJ8v-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/202604290711.kHqUSJ8v-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/usb/typec/tcpm/tcpm.c:728:52: error: expected ';' after expression
                   strscpy(tmpbuffer, "overflow", sizeof(tmpbuffer))
                                                                    ^
                                                                    ;
   1 error generated.


vim +728 drivers/usb/typec/tcpm/tcpm.c

   706	
   707	__printf(2, 0)
   708	static void _tcpm_log(struct tcpm_port *port, const char *fmt, va_list args)
   709	{
   710		char tmpbuffer[LOG_BUFFER_ENTRY_SIZE];
   711		u64 ts_nsec = local_clock();
   712		unsigned long rem_nsec;
   713	
   714		mutex_lock(&port->logbuffer_lock);
   715		if (!port->logbuffer[port->logbuffer_head]) {
   716			port->logbuffer[port->logbuffer_head] =
   717					kzalloc(LOG_BUFFER_ENTRY_SIZE, GFP_KERNEL);
   718			if (!port->logbuffer[port->logbuffer_head]) {
   719				mutex_unlock(&port->logbuffer_lock);
   720				return;
   721			}
   722		}
   723	
   724		vsnprintf(tmpbuffer, sizeof(tmpbuffer), fmt, args);
   725	
   726		if (tcpm_log_full(port)) {
   727			port->logbuffer_head = max(port->logbuffer_head - 1, 0);
 > 728			strscpy(tmpbuffer, "overflow", sizeof(tmpbuffer))
   729		}
   730	
   731		if (port->logbuffer_head < 0 ||
   732		    port->logbuffer_head >= LOG_BUFFER_ENTRIES) {
   733			dev_warn(port->dev,
   734				 "Bad log buffer index %d\n", port->logbuffer_head);
   735			goto abort;
   736		}
   737	
   738		if (!port->logbuffer[port->logbuffer_head]) {
   739			dev_warn(port->dev,
   740				 "Log buffer index %d is NULL\n", port->logbuffer_head);
   741			goto abort;
   742		}
   743	
   744		rem_nsec = do_div(ts_nsec, 1000000000);
   745		scnprintf(port->logbuffer[port->logbuffer_head],
   746			  LOG_BUFFER_ENTRY_SIZE, "[%5lu.%06lu] %s",
   747			  (unsigned long)ts_nsec, rem_nsec / 1000,
   748			  tmpbuffer);
   749		port->logbuffer_head = (port->logbuffer_head + 1) % LOG_BUFFER_ENTRIES;
   750	
   751	abort:
   752		mutex_unlock(&port->logbuffer_lock);
   753	}
   754	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-28 23:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260419213638.38291-2-m32285159@gmail.com>
2026-04-28 23:11 ` [PATCH] usb: typec: tcpm: replace strcpy with strscpy 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