Re: [PATCH v2] platform/x86: Move Lenovo files into lenovo subdir

From: Andy Shevchenko
Date: Fri Jun 06 2025 - 14:57:34 EST


On Fri, Jun 06, 2025 at 01:30:25PM -0400, Mark Pearson wrote:
> On Fri, Jun 6, 2025, at 11:58 AM, kernel test robot wrote:
> > Hi Mark,
> >
> > kernel test robot noticed the following build warnings:
> >
> > [auto build test WARNING on linus/master]
> > [also build test WARNING on next-20250606]
> > [cannot apply to v6.15]
> > [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/Mark-Pearson/platform-x86-Move-Lenovo-files-into-lenovo-subdir/20250605-013934
> > base: linus/master
> > patch link:
> > https://lore.kernel.org/r/20250604173702.3025074-1-mpearson-lenovo%40squebb.ca
> > patch subject: [PATCH v2] platform/x86: Move Lenovo files into lenovo
> > subdir
> > config: x86_64-randconfig-078-20250606
> > (https://download.01.org/0day-ci/archive/20250606/202506062319.F0IpDxF6-lkp@xxxxxxxxx/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/20250606/202506062319.F0IpDxF6-lkp@xxxxxxxxx/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@xxxxxxxxx>
> > | Closes:
> > https://lore.kernel.org/oe-kbuild-all/202506062319.F0IpDxF6-lkp@xxxxxxxxx/
> >
> > All warnings (new ones prefixed by >>):
> >
> > drivers/platform/x86/lenovo/think-lmi.c: In function 'certificate_store':
> >>> drivers/platform/x86/lenovo/think-lmi.c:661:47: warning: '%s' directive argument is null [-Wformat-overflow=]
> > 661 | return kasprintf(GFP_KERNEL, "%s,%s", arg1,
> > arg2);
> > | ^~
> > drivers/platform/x86/lenovo/think-lmi.c:657:50: warning: '%s'
> > directive argument is null [-Wformat-overflow=]
> > 657 | return kasprintf(GFP_KERNEL, "%s,%s,%s",
> > | ^~
> >
> >
> > vim +661 drivers/platform/x86/lenovo/think-lmi.c
> >
> > 640a5fa50a42b9 drivers/platform/x86/think-lmi.c Mark Pearson 2021-11-17
> > 652
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 653 static char *cert_command(struct tlmi_pwd_setting *setting, const
> > char *arg1, const char *arg2)
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 654 {
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 655 /* Prepend with SVC or SMC if multicert supported */
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 656 if (tlmi_priv.pwdcfg.core.password_mode >=
> > TLMI_PWDCFG_MODE_MULTICERT)
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 657 return kasprintf(GFP_KERNEL, "%s,%s,%s",
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 658 setting == tlmi_priv.pwd_admin ? "SVC" : "SMC",
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 659 arg1, arg2);
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 660 else
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > @661 return kasprintf(GFP_KERNEL, "%s,%s", arg1, arg2);
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 662 }
> > 5dcb5ef125907d drivers/platform/x86/think-lmi.c Mark Pearson 2024-10-24
> > 663
> >
> > --
> > 0-DAY CI Kernel Test Service
> > https://github.com/intel/lkp-tests/wiki
>
> I'm unable to reproduce this issue with a W=1 build

Do you have GCC-12?

> and I think it's a false positive.

I think the problematic line is in certificate_store().
You need to check the value of dmi_get_system_info().
Or make sure the DMI is always selected (depend on DMI
in Kconfig, perhaps).

> Am I safe to ignore this report?

Please, try to fix it.

--
With Best Regards,
Andy Shevchenko