All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Maxwell Doose <m32285159@gmail.com>,
	badhri@google.com, heikki.krogerus@linux.intel.com,
	gregkh@linuxfoundation.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: typec: tcpm: replace strcpy with strscpy
Date: Wed, 29 Apr 2026 07:11:17 +0800	[thread overview]
Message-ID: <202604290711.kHqUSJ8v-lkp@intel.com> (raw)
In-Reply-To: <20260419213638.38291-2-m32285159@gmail.com>

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

      parent reply	other threads:[~2026-04-28 23:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-19 21:36 [PATCH] usb: typec: tcpm: replace strcpy with strscpy Maxwell Doose
2026-04-23 19:23 ` Amit Sunil Dhamne
2026-04-23 20:56   ` Maxwell Doose
2026-04-29  8:54   ` David Laight
2026-05-04 18:09     ` Amit Sunil Dhamne
2026-04-27 23:01 ` kernel test robot
2026-04-28 23:11 ` kernel test robot [this message]

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=202604290711.kHqUSJ8v-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=badhri@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=m32285159@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.