public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Luke D. Jones" <luke@ljones.dev>, hdegoede@redhat.com
Cc: oe-kbuild-all@lists.linux.dev, ilpo.jarvinen@linux.intel.com,
	corentin.chary@gmail.com, platform-driver-x86@vger.kernel.org,
	linux-kernel@vger.kernel.org, "Luke D. Jones" <luke@ljones.dev>
Subject: Re: [PATCH 3/9] platform/x86: asus-wmi: add macros and expose min/max sysfs for ppt tunables
Date: Tue, 4 Jun 2024 13:14:26 +0800	[thread overview]
Message-ID: <202406041330.25g44UcT-lkp@intel.com> (raw)
In-Reply-To: <20240528013626.14066-4-luke@ljones.dev>

Hi Luke,

kernel test robot noticed the following build warnings:

[auto build test WARNING on linus/master]
[also build test WARNING on v6.10-rc2 next-20240603]
[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/Luke-D-Jones/platform-x86-asus-wmi-add-debug-print-in-more-key-places/20240528-094139
base:   linus/master
patch link:    https://lore.kernel.org/r/20240528013626.14066-4-luke%40ljones.dev
patch subject: [PATCH 3/9] platform/x86: asus-wmi: add macros and expose min/max sysfs for ppt tunables
config: x86_64-randconfig-006-20240604 (https://download.01.org/0day-ci/archive/20240604/202406041330.25g44UcT-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240604/202406041330.25g44UcT-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/202406041330.25g44UcT-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/platform/x86/asus-wmi.c: In function 'init_rog_tunables':
>> drivers/platform/x86/asus-wmi.c:4508:13: warning: argument 1 null where non-null expected [-Wnonnull]
    4508 |         if (strstr(product, "GA402R")) {
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/bitmap.h:13,
                    from include/linux/cpumask.h:13,
                    from include/linux/smp.h:13,
                    from include/linux/lockdep.h:14,
                    from include/linux/spinlock.h:63,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/slab.h:16,
                    from include/linux/resource_ext.h:11,
                    from include/linux/acpi.h:13,
                    from drivers/platform/x86/asus-wmi.c:16:
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4510:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4510 |         } else if (strstr(product, "13QY")) {
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4512:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4512 |         } else if (strstr(product, "X13")) {
         |                    ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4515:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4515 |         } else if (strstr(product, "RC71")) {
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4518:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4518 |         } else if (strstr(product, "G814")
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4519:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4519 |                 || strstr(product, "G614")
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4520:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4520 |                 || strstr(product, "G834")
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4521:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4521 |                 || strstr(product, "G634")) {
         |                    ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4523:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4523 |         } else if (strstr(product, "GA402X")
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4524:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4524 |                 || strstr(product, "GA403")
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4525:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4525 |                 || strstr(product, "FA507N")
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4526:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4526 |                 || strstr(product, "FA507X")
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4527:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4527 |                 || strstr(product, "FA707N")
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4528:20: warning: argument 1 null where non-null expected [-Wnonnull]
    4528 |                 || strstr(product, "FA707X")) {
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~
   drivers/platform/x86/asus-wmi.c:4532:13: warning: argument 1 null where non-null expected [-Wnonnull]
    4532 |         if (strstr(product, "GZ301ZE"))
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/string.h:190:15: note: in a call to function 'strstr' declared 'nonnull'
     190 | extern char * strstr(const char *, const char *);
         |               ^~~~~~


vim +4508 drivers/platform/x86/asus-wmi.c

  4491	
  4492	/* Set up the min/max and defaults for ROG tunables */
  4493	static void init_rog_tunables(struct asus_wmi *asus)
  4494	{
  4495		const char *product;
  4496		u32 max_boost = NVIDIA_BOOST_MAX;
  4497		u32 cpu_default = PPT_CPU_LIMIT_DEFAULT;
  4498		u32 cpu_max = PPT_CPU_LIMIT_MAX;
  4499		u32 platform_default = PPT_PLATFORM_DEFAULT;
  4500		u32 platform_max = PPT_PLATFORM_MAX;
  4501	
  4502		/*
  4503		 * ASUS product_name contains everything required, e.g,
  4504		 * "ROG Flow X16 GV601VV_GV601VV_00185149B"
  4505		 */
  4506		product = dmi_get_system_info(DMI_PRODUCT_NAME);
  4507	
> 4508		if (strstr(product, "GA402R")) {
  4509			cpu_default = 125;
  4510		} else if (strstr(product, "13QY")) {
  4511			cpu_max = 250;
  4512		} else if (strstr(product, "X13")) {
  4513			cpu_max = 75;
  4514			cpu_default = 50;
  4515		} else if (strstr(product, "RC71")) {
  4516			cpu_max = 50;
  4517			cpu_default = 30;
  4518		} else if (strstr(product, "G814")
  4519			|| strstr(product, "G614")
  4520			|| strstr(product, "G834")
  4521			|| strstr(product, "G634")) {
  4522			cpu_max = 175;
  4523		} else if (strstr(product, "GA402X")
  4524			|| strstr(product, "GA403")
  4525			|| strstr(product, "FA507N")
  4526			|| strstr(product, "FA507X")
  4527			|| strstr(product, "FA707N")
  4528			|| strstr(product, "FA707X")) {
  4529			cpu_max = 90;
  4530		}
  4531	
  4532		if (strstr(product, "GZ301ZE"))
  4533			max_boost = 5;
  4534		else if (strstr(product, "FX507ZC4"))
  4535			max_boost = 15;
  4536		else if (strstr(product, "GU605"))
  4537			max_boost = 20;
  4538	
  4539		/* ensure defaults for tunables */
  4540		asus->rog_tunables.cpu_default = cpu_default;
  4541		asus->rog_tunables.cpu_max = cpu_max;
  4542	
  4543		asus->rog_tunables.platform_default = platform_default;
  4544		asus->rog_tunables.platform_max = platform_max;
  4545	
  4546		asus->rog_tunables.ppt_pl1_spl = cpu_default;
  4547		asus->rog_tunables.ppt_pl2_sppt = cpu_default;
  4548		asus->rog_tunables.ppt_apu_sppt = cpu_default;
  4549	
  4550		asus->rog_tunables.ppt_platform_sppt = platform_default;
  4551		asus->rog_tunables.ppt_fppt = platform_default;
  4552	
  4553		asus->rog_tunables.nv_boost_default = NVIDIA_BOOST_MAX;
  4554		asus->rog_tunables.nv_boost_max = max_boost;
  4555		asus->rog_tunables.nv_dynamic_boost = NVIDIA_BOOST_MIN;
  4556	
  4557		asus->rog_tunables.nv_temp_default = NVIDIA_TEMP_MAX;
  4558		asus->rog_tunables.nv_temp_max = NVIDIA_TEMP_MAX;
  4559		asus->rog_tunables.nv_temp_target = NVIDIA_TEMP_MIN;
  4560	

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

  parent reply	other threads:[~2024-06-04  5:15 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-28  1:36 [PATCH 0/9] platform-x86-asus-wmi: multiple fixes, improvements, features Luke D. Jones
2024-05-28  1:36 ` [PATCH 1/9] platform/x86: asus-wmi: add debug print in more key places Luke D. Jones
2024-05-28  1:36 ` [PATCH 2/9] platform/x86: asus-wmi: don't fail if platform_profile already registered Luke D. Jones
2024-05-28  1:36 ` [PATCH 3/9] platform/x86: asus-wmi: add macros and expose min/max sysfs for ppt tunables Luke D. Jones
2024-05-28  8:50   ` Ilpo Järvinen
2024-06-04  5:14   ` kernel test robot [this message]
2024-05-28  1:36 ` [PATCH 4/9] platform/x86: asus-wmi: reduce code duplication with macros Luke D. Jones
2024-05-28  8:55   ` Ilpo Järvinen
2024-05-28  9:03   ` Ilpo Järvinen
2024-05-28  1:36 ` [PATCH 5/9] platform/x86: asus-wmi: use WMI_SIMPLE_SHOW in more places Luke D. Jones
2024-05-28  9:06   ` Ilpo Järvinen
2024-05-28  1:36 ` [PATCH 6/9] platform/x86: asus-wmi: add panel-fhd functionality Luke D. Jones
2024-05-28  9:18   ` Ilpo Järvinen
2024-05-28  1:36 ` [PATCH 7/9] platform/x86: asus-wmi: add enable/disable CPU cores Luke D. Jones
2024-05-28  9:27   ` Ilpo Järvinen
2024-05-28 21:37     ` Luke Jones
2024-05-28  1:36 ` [PATCH 8/9] platform/x86: asus-wmi: add apu_mem setting Luke D. Jones
2024-05-28  2:19   ` Limonciello, Mario
2024-05-28  2:40     ` Luke Jones
2024-05-28 13:27       ` Mario Limonciello
2024-05-28 21:04         ` Luke Jones
2024-05-28 21:16           ` Mario Limonciello
2024-05-28 21:34             ` Luke Jones
2024-05-28 21:36               ` Mario Limonciello
2024-05-28 21:37               ` Mario Limonciello
2024-05-28  1:36 ` [PATCH 9/9] platform/x86: asus-wmi: add setting dGPU TGP Luke D. Jones

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=202406041330.25g44UcT-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=corentin.chary@gmail.com \
    --cc=hdegoede@redhat.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luke@ljones.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=platform-driver-x86@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox