HID: amd_sfh: Fix build error without x86 kconfig
Subsystems (2)
Basavaraj Natikar
maintainerPATCH 1/1 HID: amd_sfh: Fix build error without x86 kconfig
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--- drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +2 -0
@@ -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)
Signature · 1 line
2.25.1
Jiri Kosina
maintainerQuoted 23 lines · Basavaraj Natikar
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_hwidFixes 6296562f30b1 ("HID: amd_sfh: Extend MP2 register access to SFH")Reported-by Stephen Rothwell <[email protected]>Signed-off-by Basavaraj Natikar <[email protected]>--- drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 2 ++ 1 file changed, 2 insertions(+)drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +0
-0
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i · line 416
Quoted 7 lines
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +2
-0@@ -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?
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 26 lines · Jiri Kosina
Quoted 24 lines · Basavaraj Natikar
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_hwidFixes 6296562f30b1 ("HID: amd_sfh: Extend MP2 register access to SFH")Reported-by Stephen Rothwell <[email protected]>Signed-off-by Basavaraj Natikar <[email protected]>--- drivers/hid/amd-sfh-hid/amd_sfh_pcie.c | 2 ++ 1 file changed, 2 insertions(+)drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +0
-0@@ -410,8 +410,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
Quoted 7 lines
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i · line 416
Quoted 6 lines
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +2
-0privdata->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
Quoted 1 line
Jiri Kosina
maintainerQuoted 14 lines · Basavaraj Natikar
Quoted 6 lines
Quoted 6 lines
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +0
-0@@ -410,8 +410,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *iQuoted 7 lines
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i · line 416
Quoted 6 lines
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +2
-0privdata->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?
Quoted 10 lines
Do you mean to say just add depends on X86 like below ?
"
configAMD_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,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 25 lines · Jiri Kosina
Quoted 13 lines · Basavaraj Natikar
Quoted 6 lines
Quoted 6 lines
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +0
-0@@ -410,8 +410,10 @@ static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *iQuoted 7 lines
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c static int amd_mp2_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i · line 416
Quoted 6 lines
drivers/hid/amd-sfh-hid/amd_sfh_pcie.c +2
-0privdata->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?
Quoted 10 lines
Do you mean to say just add depends on X86 like below ?
"
configAMD_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.
"
Quoted 2 lines
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
Quoted 3 lines
Thanks,