* drivers/char/ipmi/ipmi_watchdog.c:1251:2: warning: 'strcpy' source argument is the same as destination
@ 2025-06-13 23:20 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-06-13 23:20 UTC (permalink / raw)
To: Heiko Carstens; +Cc: oe-kbuild-all, linux-kernel, Mikhail Zaslonko
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 18531f4d1c8c47c4796289dbbc1ab657ffa063d2
commit: de6b4f99010ad22f0242f1fc0f75c0752a56e9bb s390/string: Remove strcpy() implementation
date: 6 weeks ago
config: s390-randconfig-002-20250614 (https://download.01.org/0day-ci/archive/20250614/202506140756.EFXXvIP4-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 10.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250614/202506140756.EFXXvIP4-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/202506140756.EFXXvIP4-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/char/ipmi/ipmi_watchdog.c: In function 'ipmi_wdog_init':
>> drivers/char/ipmi/ipmi_watchdog.c:1251:2: warning: 'strcpy' source argument is the same as destination [-Wrestrict]
1251 | strcpy(preop, inval);
| ^~~~~~~~~~~~~~~~~~~~
drivers/char/ipmi/ipmi_watchdog.c:1231:2: warning: 'strcpy' source argument is the same as destination [-Wrestrict]
1231 | strcpy(preaction, inval);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/char/ipmi/ipmi_watchdog.c:1207:2: warning: 'strcpy' source argument is the same as destination [-Wrestrict]
1207 | strcpy(action, inval);
| ^~~~~~~~~~~~~~~~~~~~~
vim +/strcpy +1251 drivers/char/ipmi/ipmi_watchdog.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1234
cc4673eecdcc4a Corey Minyard 2005-11-07 1235 static int preop_op(const char *inval, char *outval)
cc4673eecdcc4a Corey Minyard 2005-11-07 1236 {
cc4673eecdcc4a Corey Minyard 2005-11-07 1237 if (outval)
cc4673eecdcc4a Corey Minyard 2005-11-07 1238 strcpy(outval, preop);
cc4673eecdcc4a Corey Minyard 2005-11-07 1239
cc4673eecdcc4a Corey Minyard 2005-11-07 1240 if (!inval)
cc4673eecdcc4a Corey Minyard 2005-11-07 1241 return 0;
cc4673eecdcc4a Corey Minyard 2005-11-07 1242
cc4673eecdcc4a Corey Minyard 2005-11-07 1243 if (strcmp(inval, "preop_none") == 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1244 preop_val = WDOG_PREOP_NONE;
cc4673eecdcc4a Corey Minyard 2005-11-07 1245 else if (strcmp(inval, "preop_panic") == 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1246 preop_val = WDOG_PREOP_PANIC;
cc4673eecdcc4a Corey Minyard 2005-11-07 1247 else if (strcmp(inval, "preop_give_data") == 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1248 preop_val = WDOG_PREOP_GIVE_DATA;
cc4673eecdcc4a Corey Minyard 2005-11-07 1249 else
cc4673eecdcc4a Corey Minyard 2005-11-07 1250 return -EINVAL;
cc4673eecdcc4a Corey Minyard 2005-11-07 @1251 strcpy(preop, inval);
cc4673eecdcc4a Corey Minyard 2005-11-07 1252 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1253 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1254
:::::: The code at line 1251 was first introduced by commit
:::::: cc4673eecdcc4a918e4d8796295d798b5e98d602 [PATCH] ipmi: watchdog parms in sysfs
:::::: TO: Corey Minyard <minyard@acm.org>
:::::: CC: Linus Torvalds <torvalds@g5.osdl.org>
--
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:[~2025-06-13 23:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-13 23:20 drivers/char/ipmi/ipmi_watchdog.c:1251:2: warning: 'strcpy' source argument is the same as destination 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;
as well as URLs for NNTP newsgroup(s).