* [PATCH hid-next] HID: amd_sfh: Fix build error without x86 kconfig
@ 2024-02-28 7:51 Basavaraj Natikar
2024-02-28 9:03 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Basavaraj Natikar @ 2024-02-28 7:51 UTC (permalink / raw)
To: jikos, benjamin.tissoires, linux-input
Cc: Basavaraj Natikar, Stephen Rothwell
This patch is to fix below build error while using the kconfig without
x86.
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c: In function 'amd_mp2_pci_probe':
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:413:21: error: 'boot_cpu_data'
undeclared (first use in this function); did you mean 'boot_cpu_hwid'?
413 | if (boot_cpu_data.x86 >= 0x1A)
| ^~~~~~~~~~~~~
| boot_cpu_hwid
Fixes: 6296562f30b1 ("HID: amd_sfh: Extend MP2 register access to SFH")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/all/20240228145648.41c493ec@canb.auug.org.au/
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
---
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
index 9e97c26c4482..c815f2f54321 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
@@ -410,8 +410,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
privdata->sfh1_1_ops = (const struct amd_sfh1_1_ops *)id->driver_data;
if (privdata->sfh1_1_ops) {
+#ifdef CONFIG_X86
if (boot_cpu_data.x86 >= 0x1A)
privdata->rver = 1;
+#endif
rc = devm_work_autocancel(&pdev->dev, &privdata->work, sfh1_1_init_work);
if (rc)
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH hid-next] HID: amd_sfh: Fix build error without x86 kconfig
2024-02-28 7:51 [PATCH hid-next] HID: amd_sfh: Fix build error without x86 kconfig Basavaraj Natikar
@ 2024-02-28 9:03 ` Jiri Kosina
2024-02-28 10:52 ` Basavaraj Natikar
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2024-02-28 9:03 UTC (permalink / raw)
To: Basavaraj Natikar; +Cc: benjamin.tissoires, linux-input, Stephen Rothwell
On Wed, 28 Feb 2024, Basavaraj Natikar wrote:
> This patch is to fix below build error while using the kconfig without
> x86.
>
> drivers/hid/amd-sfh-hid/amd_sfh_pcie.c: In function 'amd_mp2_pci_probe':
> drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:413:21: error: 'boot_cpu_data'
> undeclared (first use in this function); did you mean 'boot_cpu_hwid'?
> 413 | if (boot_cpu_data.x86 >= 0x1A)
> | ^~~~~~~~~~~~~
> | boot_cpu_hwid
>
> Fixes: 6296562f30b1 ("HID: amd_sfh: Extend MP2 register access to SFH")
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/all/20240228145648.41c493ec@canb.auug.org.au/
> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
> ---
> drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> index 9e97c26c4482..c815f2f54321 100644
> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> @@ -410,8 +410,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
>
> privdata->sfh1_1_ops = (const struct amd_sfh1_1_ops *)id->driver_data;
> if (privdata->sfh1_1_ops) {
> +#ifdef CONFIG_X86
> if (boot_cpu_data.x86 >= 0x1A)
> privdata->rver = 1;
> +#endif
Does it even make sense to build this driver outside of x86 architecture?
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH hid-next] HID: amd_sfh: Fix build error without x86 kconfig
2024-02-28 9:03 ` Jiri Kosina
@ 2024-02-28 10:52 ` Basavaraj Natikar
2024-02-28 10:57 ` Jiri Kosina
0 siblings, 1 reply; 5+ messages in thread
From: Basavaraj Natikar @ 2024-02-28 10:52 UTC (permalink / raw)
To: Jiri Kosina, Basavaraj Natikar
Cc: benjamin.tissoires, linux-input, Stephen Rothwell
On 2/28/2024 2:33 PM, Jiri Kosina wrote:
> On Wed, 28 Feb 2024, Basavaraj Natikar wrote:
>
>> This patch is to fix below build error while using the kconfig without
>> x86.
>>
>> drivers/hid/amd-sfh-hid/amd_sfh_pcie.c: In function 'amd_mp2_pci_probe':
>> drivers/hid/amd-sfh-hid/amd_sfh_pcie.c:413:21: error: 'boot_cpu_data'
>> undeclared (first use in this function); did you mean 'boot_cpu_hwid'?
>> 413 | if (boot_cpu_data.x86 >= 0x1A)
>> | ^~~~~~~~~~~~~
>> | boot_cpu_hwid
>>
>> Fixes: 6296562f30b1 ("HID: amd_sfh: Extend MP2 register access to SFH")
>> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
>> Closes: https://lore.kernel.org/all/20240228145648.41c493ec@canb.auug.org.au/
>> Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
>> ---
>> drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
>> index 9e97c26c4482..c815f2f54321 100644
>> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
>> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
>> @@ -410,8 +410,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
>>
>> privdata->sfh1_1_ops = (const struct amd_sfh1_1_ops *)id->driver_data;
>> if (privdata->sfh1_1_ops) {
>> +#ifdef CONFIG_X86
>> if (boot_cpu_data.x86 >= 0x1A)
>> privdata->rver = 1;
>> +#endif
> Does it even make sense to build this driver outside of x86 architecture?
Do you mean to say just add depends on X86 like below ?
"
config AMD_SFH_HID
tristate "AMD Sensor Fusion Hub"
depends on HID
+ depends on X86
help
If you say yes to this option, support will be included for the
AMD Sensor Fusion Hub.
"
Thanks,
--
Basavaraj
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH hid-next] HID: amd_sfh: Fix build error without x86 kconfig
2024-02-28 10:52 ` Basavaraj Natikar
@ 2024-02-28 10:57 ` Jiri Kosina
2024-02-28 10:59 ` Basavaraj Natikar
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2024-02-28 10:57 UTC (permalink / raw)
To: Basavaraj Natikar
Cc: Basavaraj Natikar, benjamin.tissoires, linux-input,
Stephen Rothwell
On Wed, 28 Feb 2024, Basavaraj Natikar wrote:
> >> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> >> index 9e97c26c4482..c815f2f54321 100644
> >> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> >> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
> >> @@ -410,8 +410,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
> >>
> >> privdata->sfh1_1_ops = (const struct amd_sfh1_1_ops *)id->driver_data;
> >> if (privdata->sfh1_1_ops) {
> >> +#ifdef CONFIG_X86
> >> if (boot_cpu_data.x86 >= 0x1A)
> >> privdata->rver = 1;
> >> +#endif
> > Does it even make sense to build this driver outside of x86 architecture?
>
> Do you mean to say just add depends on X86 like below ?
> "
> config AMD_SFH_HID
> tristate "AMD Sensor Fusion Hub"
> depends on HID
> + depends on X86
> help
> If you say yes to this option, support will be included for the
> AMD Sensor Fusion Hub.
> "
Yeah, that was my idea; as far as I understand, there is no way this
driver would ever have any use outside of x86 architecture, right?
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH hid-next] HID: amd_sfh: Fix build error without x86 kconfig
2024-02-28 10:57 ` Jiri Kosina
@ 2024-02-28 10:59 ` Basavaraj Natikar
0 siblings, 0 replies; 5+ messages in thread
From: Basavaraj Natikar @ 2024-02-28 10:59 UTC (permalink / raw)
To: Jiri Kosina
Cc: Basavaraj Natikar, benjamin.tissoires, linux-input,
Stephen Rothwell
On 2/28/2024 4:27 PM, Jiri Kosina wrote:
> On Wed, 28 Feb 2024, Basavaraj Natikar wrote:
>
>>>> diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
>>>> index 9e97c26c4482..c815f2f54321 100644
>>>> --- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
>>>> +++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.c
>>>> @@ -410,8 +410,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
>>>>
>>>> privdata->sfh1_1_ops = (const struct amd_sfh1_1_ops *)id->driver_data;
>>>> if (privdata->sfh1_1_ops) {
>>>> +#ifdef CONFIG_X86
>>>> if (boot_cpu_data.x86 >= 0x1A)
>>>> privdata->rver = 1;
>>>> +#endif
>>> Does it even make sense to build this driver outside of x86 architecture?
>> Do you mean to say just add depends on X86 like below ?
>> "
>> config AMD_SFH_HID
>> tristate "AMD Sensor Fusion Hub"
>> depends on HID
>> + depends on X86
>> help
>> If you say yes to this option, support will be included for the
>> AMD Sensor Fusion Hub.
>> "
> Yeah, that was my idea; as far as I understand, there is no way this
> driver would ever have any use outside of x86 architecture, right?
Yes that correct this driver is only for x86, I will send V2 with this change.
Thanks,
--
BAsavaraj
>
> Thanks,
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-02-28 10:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-28 7:51 [PATCH hid-next] HID: amd_sfh: Fix build error without x86 kconfig Basavaraj Natikar
2024-02-28 9:03 ` Jiri Kosina
2024-02-28 10:52 ` Basavaraj Natikar
2024-02-28 10:57 ` Jiri Kosina
2024-02-28 10:59 ` Basavaraj Natikar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox