All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static
  2022-05-03 11:27 [pdx86-platform-drivers-x86:review-hans 30/32] drivers/platform/x86/thinkpad_acpi.c:317:20: sparse: sparse: symbol 'quirk_btusb_bug' was not declared. Should it be static? kernel test robot
@ 2022-05-03 11:18 ` kernel test robot
  2022-05-03 13:07   ` Limonciello, Mario
  2022-05-03 13:07   ` Limonciello, Mario
  0 siblings, 2 replies; 8+ messages in thread
From: kernel test robot @ 2022-05-03 11:18 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: kbuild-all, Andy Shevchenko, Hans de Goede, linux-kernel

drivers/platform/x86/thinkpad_acpi.c:317:20: warning: symbol 'quirk_btusb_bug' was not declared. Should it be static?

Fixes: 25eecc2ff6cc ("platform/x86: thinkpad_acpi: Convert btusb DMI list to quirks")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
 drivers/platform/x86/thinkpad_acpi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index aed17d32ed84b..eefa22e86ae10 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -314,7 +314,7 @@ struct quirk_entry {
 	bool btusb_bug;
 };
 
-struct quirk_entry quirk_btusb_bug = {
+static struct quirk_entry quirk_btusb_bug = {
 	.btusb_bug = true,
 };
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [pdx86-platform-drivers-x86:review-hans 30/32] drivers/platform/x86/thinkpad_acpi.c:317:20: sparse: sparse: symbol 'quirk_btusb_bug' was not declared. Should it be static?
@ 2022-05-03 11:27 kernel test robot
  2022-05-03 11:18 ` [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static kernel test robot
  0 siblings, 1 reply; 8+ messages in thread
From: kernel test robot @ 2022-05-03 11:27 UTC (permalink / raw)
  To: Mario Limonciello
  Cc: kbuild-all, Andy Shevchenko, Hans de Goede, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git review-hans
head:   acbb6b34258ea867c21d47ab53934ef9dbc442a0
commit: 25eecc2ff6ccf1115b348983a6c306517727b67a [30/32] platform/x86: thinkpad_acpi: Convert btusb DMI list to quirks
config: x86_64-rhel-8.3-kselftests (https://download.01.org/0day-ci/archive/20220503/202205031944.EP1ElC1B-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.4-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/commit/?id=25eecc2ff6ccf1115b348983a6c306517727b67a
        git remote add pdx86-platform-drivers-x86 https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git
        git fetch --no-tags pdx86-platform-drivers-x86 review-hans
        git checkout 25eecc2ff6ccf1115b348983a6c306517727b67a
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/platform/x86/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/platform/x86/thinkpad_acpi.c:317:20: sparse: sparse: symbol 'quirk_btusb_bug' was not declared. Should it be static?

Please review and possibly fold the followup patch.

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static
  2022-05-03 11:18 ` [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static kernel test robot
  2022-05-03 13:07   ` Limonciello, Mario
@ 2022-05-03 13:07   ` Limonciello, Mario
  2022-05-06 10:09       ` Hans de Goede
  1 sibling, 1 reply; 8+ messages in thread
From: Limonciello, Mario @ 2022-05-03 13:07 UTC (permalink / raw)
  To: kernel test robot
  Cc: kbuild-all, Andy Shevchenko, Hans de Goede, linux-kernel

[Public]



> -----Original Message-----
> From: kernel test robot <lkp@intel.com>
> Sent: Tuesday, May 3, 2022 06:18
> To: Limonciello, Mario <Mario.Limonciello@amd.com>
> Cc: kbuild-all@lists.01.org; Andy Shevchenko
> <andriy.shevchenko@linux.intel.com>; Hans de Goede
> <hdegoede@redhat.com>; linux-kernel@vger.kernel.org
> Subject: [RFC PATCH pdx86-platform-drivers-x86] platform/x86:
> thinkpad_acpi: quirk_btusb_bug can be static
> 
> drivers/platform/x86/thinkpad_acpi.c:317:20: warning: symbol
> 'quirk_btusb_bug' was not declared. Should it be static?
> 
> Fixes: 25eecc2ff6cc ("platform/x86: thinkpad_acpi: Convert btusb DMI list to
> quirks")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

> ---
>  drivers/platform/x86/thinkpad_acpi.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c
> b/drivers/platform/x86/thinkpad_acpi.c
> index aed17d32ed84b..eefa22e86ae10 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -314,7 +314,7 @@ struct quirk_entry {
>  	bool btusb_bug;
>  };
> 
> -struct quirk_entry quirk_btusb_bug = {
> +static struct quirk_entry quirk_btusb_bug = {
>  	.btusb_bug = true,
>  };
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static
  2022-05-03 11:18 ` [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static kernel test robot
@ 2022-05-03 13:07   ` Limonciello, Mario
  2022-05-03 13:07   ` Limonciello, Mario
  1 sibling, 0 replies; 8+ messages in thread
From: Limonciello, Mario @ 2022-05-03 13:07 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1389 bytes --]

[Public]



> -----Original Message-----
> From: kernel test robot <lkp@intel.com>
> Sent: Tuesday, May 3, 2022 06:18
> To: Limonciello, Mario <Mario.Limonciello@amd.com>
> Cc: kbuild-all(a)lists.01.org; Andy Shevchenko
> <andriy.shevchenko@linux.intel.com>; Hans de Goede
> <hdegoede@redhat.com>; linux-kernel(a)vger.kernel.org
> Subject: [RFC PATCH pdx86-platform-drivers-x86] platform/x86:
> thinkpad_acpi: quirk_btusb_bug can be static
> 
> drivers/platform/x86/thinkpad_acpi.c:317:20: warning: symbol
> 'quirk_btusb_bug' was not declared. Should it be static?
> 
> Fixes: 25eecc2ff6cc ("platform/x86: thinkpad_acpi: Convert btusb DMI list to
> quirks")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: kernel test robot <lkp@intel.com>

Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

> ---
>  drivers/platform/x86/thinkpad_acpi.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/platform/x86/thinkpad_acpi.c
> b/drivers/platform/x86/thinkpad_acpi.c
> index aed17d32ed84b..eefa22e86ae10 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -314,7 +314,7 @@ struct quirk_entry {
>  	bool btusb_bug;
>  };
> 
> -struct quirk_entry quirk_btusb_bug = {
> +static struct quirk_entry quirk_btusb_bug = {
>  	.btusb_bug = true,
>  };
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static
  2022-05-03 13:07   ` Limonciello, Mario
@ 2022-05-06 10:09       ` Hans de Goede
  0 siblings, 0 replies; 8+ messages in thread
From: Hans de Goede @ 2022-05-06 10:09 UTC (permalink / raw)
  To: Limonciello, Mario, kernel test robot
  Cc: kbuild-all, Andy Shevchenko, linux-kernel

Hi,

On 5/3/22 15:07, Limonciello, Mario wrote:
> [Public]
> 
> 
> 
>> -----Original Message-----
>> From: kernel test robot <lkp@intel.com>
>> Sent: Tuesday, May 3, 2022 06:18
>> To: Limonciello, Mario <Mario.Limonciello@amd.com>
>> Cc: kbuild-all@lists.01.org; Andy Shevchenko
>> <andriy.shevchenko@linux.intel.com>; Hans de Goede
>> <hdegoede@redhat.com>; linux-kernel@vger.kernel.org
>> Subject: [RFC PATCH pdx86-platform-drivers-x86] platform/x86:
>> thinkpad_acpi: quirk_btusb_bug can be static
>>
>> drivers/platform/x86/thinkpad_acpi.c:317:20: warning: symbol
>> 'quirk_btusb_bug' was not declared. Should it be static?
>>
>> Fixes: 25eecc2ff6cc ("platform/x86: thinkpad_acpi: Convert btusb DMI list to
>> quirks")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: kernel test robot <lkp@intel.com>
> 
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

Thanks, since the original patch was still in my review-hans
branch (and not yet in for-next) I've squashed this fix into
the original patch.

Regards,

Hans





> 
>> ---
>>  drivers/platform/x86/thinkpad_acpi.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/platform/x86/thinkpad_acpi.c
>> b/drivers/platform/x86/thinkpad_acpi.c
>> index aed17d32ed84b..eefa22e86ae10 100644
>> --- a/drivers/platform/x86/thinkpad_acpi.c
>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>> @@ -314,7 +314,7 @@ struct quirk_entry {
>>  	bool btusb_bug;
>>  };
>>
>> -struct quirk_entry quirk_btusb_bug = {
>> +static struct quirk_entry quirk_btusb_bug = {
>>  	.btusb_bug = true,
>>  };
>>
> 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static
@ 2022-05-06 10:09       ` Hans de Goede
  0 siblings, 0 replies; 8+ messages in thread
From: Hans de Goede @ 2022-05-06 10:09 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]

Hi,

On 5/3/22 15:07, Limonciello, Mario wrote:
> [Public]
> 
> 
> 
>> -----Original Message-----
>> From: kernel test robot <lkp@intel.com>
>> Sent: Tuesday, May 3, 2022 06:18
>> To: Limonciello, Mario <Mario.Limonciello@amd.com>
>> Cc: kbuild-all(a)lists.01.org; Andy Shevchenko
>> <andriy.shevchenko@linux.intel.com>; Hans de Goede
>> <hdegoede@redhat.com>; linux-kernel(a)vger.kernel.org
>> Subject: [RFC PATCH pdx86-platform-drivers-x86] platform/x86:
>> thinkpad_acpi: quirk_btusb_bug can be static
>>
>> drivers/platform/x86/thinkpad_acpi.c:317:20: warning: symbol
>> 'quirk_btusb_bug' was not declared. Should it be static?
>>
>> Fixes: 25eecc2ff6cc ("platform/x86: thinkpad_acpi: Convert btusb DMI list to
>> quirks")
>> Reported-by: kernel test robot <lkp@intel.com>
>> Signed-off-by: kernel test robot <lkp@intel.com>
> 
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>

Thanks, since the original patch was still in my review-hans
branch (and not yet in for-next) I've squashed this fix into
the original patch.

Regards,

Hans





> 
>> ---
>>  drivers/platform/x86/thinkpad_acpi.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/platform/x86/thinkpad_acpi.c
>> b/drivers/platform/x86/thinkpad_acpi.c
>> index aed17d32ed84b..eefa22e86ae10 100644
>> --- a/drivers/platform/x86/thinkpad_acpi.c
>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>> @@ -314,7 +314,7 @@ struct quirk_entry {
>>  	bool btusb_bug;
>>  };
>>
>> -struct quirk_entry quirk_btusb_bug = {
>> +static struct quirk_entry quirk_btusb_bug = {
>>  	.btusb_bug = true,
>>  };
>>
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static
  2022-05-06 10:09       ` Hans de Goede
@ 2022-05-06 11:07         ` Hans de Goede
  -1 siblings, 0 replies; 8+ messages in thread
From: Hans de Goede @ 2022-05-06 11:07 UTC (permalink / raw)
  To: Limonciello, Mario, kernel test robot
  Cc: kbuild-all, Andy Shevchenko, linux-kernel

Hi,

On 5/6/22 12:09, Hans de Goede wrote:
> Hi,
> 
> On 5/3/22 15:07, Limonciello, Mario wrote:
>> [Public]
>>
>>
>>
>>> -----Original Message-----
>>> From: kernel test robot <lkp@intel.com>
>>> Sent: Tuesday, May 3, 2022 06:18
>>> To: Limonciello, Mario <Mario.Limonciello@amd.com>
>>> Cc: kbuild-all@lists.01.org; Andy Shevchenko
>>> <andriy.shevchenko@linux.intel.com>; Hans de Goede
>>> <hdegoede@redhat.com>; linux-kernel@vger.kernel.org
>>> Subject: [RFC PATCH pdx86-platform-drivers-x86] platform/x86:
>>> thinkpad_acpi: quirk_btusb_bug can be static
>>>
>>> drivers/platform/x86/thinkpad_acpi.c:317:20: warning: symbol
>>> 'quirk_btusb_bug' was not declared. Should it be static?
>>>
>>> Fixes: 25eecc2ff6cc ("platform/x86: thinkpad_acpi: Convert btusb DMI list to
>>> quirks")
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Signed-off-by: kernel test robot <lkp@intel.com>
>>
>> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> 
> Thanks, since the original patch was still in my review-hans
> branch (and not yet in for-next) I've squashed this fix into
> the original patch.

I've just realized there is another issue with this
("platform/x86: thinkpad_acpi: Convert btusb DMI list to quirks")

Patch, it only sets tp_features.quirks after bluetooth_init()
has already run, so the:

	if (tp_features.quirks && tp_features.quirks->btusb_bug && ...

check will never be true since tp_features.quirks is being set
too late.

I'll squash in a change moving the:

        dmi_id = dmi_first_match(fwbug_list);
        if (dmi_id)
                tp_features.quirks = dmi_id->driver_data;

to higher inside thinkpad_acpi_module_init() to fix this,
while keeping the:

#ifdef CONFIG_SUSPEND
       if (tp_features.quirks && tp_features.quirks->s2idle_bug_mmio) {
               if (!acpi_register_lps0_dev(&thinkpad_acpi_s2idle_dev_ops))
                       pr_info("Using s2idle quirk to avoid %s platform firmware bug\n",
                               (dmi_id && dmi_id->ident) ? dmi_id->ident : "");
       }
#endif

block at then end of thinkpad_acpi_module_init() so as to not change
the ordering wrt registering the lps0_dev.

Regards,

Hans





> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> 
>>
>>> ---
>>>  drivers/platform/x86/thinkpad_acpi.c |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/platform/x86/thinkpad_acpi.c
>>> b/drivers/platform/x86/thinkpad_acpi.c
>>> index aed17d32ed84b..eefa22e86ae10 100644
>>> --- a/drivers/platform/x86/thinkpad_acpi.c
>>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>>> @@ -314,7 +314,7 @@ struct quirk_entry {
>>>  	bool btusb_bug;
>>>  };
>>>
>>> -struct quirk_entry quirk_btusb_bug = {
>>> +static struct quirk_entry quirk_btusb_bug = {
>>>  	.btusb_bug = true,
>>>  };
>>>
>>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static
@ 2022-05-06 11:07         ` Hans de Goede
  0 siblings, 0 replies; 8+ messages in thread
From: Hans de Goede @ 2022-05-06 11:07 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2897 bytes --]

Hi,

On 5/6/22 12:09, Hans de Goede wrote:
> Hi,
> 
> On 5/3/22 15:07, Limonciello, Mario wrote:
>> [Public]
>>
>>
>>
>>> -----Original Message-----
>>> From: kernel test robot <lkp@intel.com>
>>> Sent: Tuesday, May 3, 2022 06:18
>>> To: Limonciello, Mario <Mario.Limonciello@amd.com>
>>> Cc: kbuild-all(a)lists.01.org; Andy Shevchenko
>>> <andriy.shevchenko@linux.intel.com>; Hans de Goede
>>> <hdegoede@redhat.com>; linux-kernel(a)vger.kernel.org
>>> Subject: [RFC PATCH pdx86-platform-drivers-x86] platform/x86:
>>> thinkpad_acpi: quirk_btusb_bug can be static
>>>
>>> drivers/platform/x86/thinkpad_acpi.c:317:20: warning: symbol
>>> 'quirk_btusb_bug' was not declared. Should it be static?
>>>
>>> Fixes: 25eecc2ff6cc ("platform/x86: thinkpad_acpi: Convert btusb DMI list to
>>> quirks")
>>> Reported-by: kernel test robot <lkp@intel.com>
>>> Signed-off-by: kernel test robot <lkp@intel.com>
>>
>> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
> 
> Thanks, since the original patch was still in my review-hans
> branch (and not yet in for-next) I've squashed this fix into
> the original patch.

I've just realized there is another issue with this
("platform/x86: thinkpad_acpi: Convert btusb DMI list to quirks")

Patch, it only sets tp_features.quirks after bluetooth_init()
has already run, so the:

	if (tp_features.quirks && tp_features.quirks->btusb_bug && ...

check will never be true since tp_features.quirks is being set
too late.

I'll squash in a change moving the:

        dmi_id = dmi_first_match(fwbug_list);
        if (dmi_id)
                tp_features.quirks = dmi_id->driver_data;

to higher inside thinkpad_acpi_module_init() to fix this,
while keeping the:

#ifdef CONFIG_SUSPEND
       if (tp_features.quirks && tp_features.quirks->s2idle_bug_mmio) {
               if (!acpi_register_lps0_dev(&thinkpad_acpi_s2idle_dev_ops))
                       pr_info("Using s2idle quirk to avoid %s platform firmware bug\n",
                               (dmi_id && dmi_id->ident) ? dmi_id->ident : "");
       }
#endif

block at then end of thinkpad_acpi_module_init() so as to not change
the ordering wrt registering the lps0_dev.

Regards,

Hans





> 
> Regards,
> 
> Hans
> 
> 
> 
> 
> 
>>
>>> ---
>>>  drivers/platform/x86/thinkpad_acpi.c |    2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/platform/x86/thinkpad_acpi.c
>>> b/drivers/platform/x86/thinkpad_acpi.c
>>> index aed17d32ed84b..eefa22e86ae10 100644
>>> --- a/drivers/platform/x86/thinkpad_acpi.c
>>> +++ b/drivers/platform/x86/thinkpad_acpi.c
>>> @@ -314,7 +314,7 @@ struct quirk_entry {
>>>  	bool btusb_bug;
>>>  };
>>>
>>> -struct quirk_entry quirk_btusb_bug = {
>>> +static struct quirk_entry quirk_btusb_bug = {
>>>  	.btusb_bug = true,
>>>  };
>>>
>>

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-05-06 11:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-03 11:27 [pdx86-platform-drivers-x86:review-hans 30/32] drivers/platform/x86/thinkpad_acpi.c:317:20: sparse: sparse: symbol 'quirk_btusb_bug' was not declared. Should it be static? kernel test robot
2022-05-03 11:18 ` [RFC PATCH pdx86-platform-drivers-x86] platform/x86: thinkpad_acpi: quirk_btusb_bug can be static kernel test robot
2022-05-03 13:07   ` Limonciello, Mario
2022-05-03 13:07   ` Limonciello, Mario
2022-05-06 10:09     ` Hans de Goede
2022-05-06 10:09       ` Hans de Goede
2022-05-06 11:07       ` Hans de Goede
2022-05-06 11:07         ` Hans de Goede

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.