* drivers/usb/typec/mux/intel_pmc_mux.c:664:43: warning: '%d' directive output may be truncated writing between 1 and 3 bytes into a region of size 2
@ 2024-12-03 6:58 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-12-03 6:58 UTC (permalink / raw)
To: Rajat Khandelwal; +Cc: oe-kbuild-all, linux-kernel, Heikki Krogerus
Hi Rajat,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: cdd30ebb1b9f36159d66f088b61aee264e649d7a
commit: 0a453dc9f260281e3a063e07b526a7e494e496fe usb: typec: intel_pmc_mux: Expose IOM port status to debugfs
date: 1 year, 6 months ago
config: x86_64-buildonly-randconfig-002-20240106 (https://download.01.org/0day-ci/archive/20241203/202412031437.vX580pxx-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241203/202412031437.vX580pxx-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/202412031437.vX580pxx-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/usb/typec/mux/intel_pmc_mux.c: In function 'pmc_usb_probe':
>> drivers/usb/typec/mux/intel_pmc_mux.c:664:43: warning: '%d' directive output may be truncated writing between 1 and 3 bytes into a region of size 2 [-Wformat-truncation=]
664 | snprintf(name, sizeof(name), "port%d", port->usb3_port - 1);
| ^~
In function 'pmc_mux_port_debugfs_init',
inlined from 'pmc_usb_probe' at drivers/usb/typec/mux/intel_pmc_mux.c:723:3:
drivers/usb/typec/mux/intel_pmc_mux.c:664:38: note: directive argument in the range [-1, 254]
664 | snprintf(name, sizeof(name), "port%d", port->usb3_port - 1);
| ^~~~~~~~
drivers/usb/typec/mux/intel_pmc_mux.c:664:9: note: 'snprintf' output between 6 and 8 bytes into a destination of size 6
664 | snprintf(name, sizeof(name), "port%d", port->usb3_port - 1);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +664 drivers/usb/typec/mux/intel_pmc_mux.c
658
659 static void pmc_mux_port_debugfs_init(struct pmc_usb_port *port)
660 {
661 struct dentry *debugfs_dir;
662 char name[6];
663
> 664 snprintf(name, sizeof(name), "port%d", port->usb3_port - 1);
665
666 debugfs_dir = debugfs_create_dir(name, port->pmc->dentry);
667 debugfs_create_file("iom_status", 0400, debugfs_dir, port,
668 &port_iom_status_fops);
669 }
670
--
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:[~2024-12-03 6:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-03 6:58 drivers/usb/typec/mux/intel_pmc_mux.c:664:43: warning: '%d' directive output may be truncated writing between 1 and 3 bytes into a region of size 2 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
all inboxes | Powered by JetHome®