platform/x86: intel_pmc_core: fix build error without CONFIG_DEBUG_FS
PATCH 1/1 platform/x86: intel_pmc_core: fix build error without CONFIG_DEBUG_FS
If CONFIG_DEBUG_FS is n, build fails:
drivers/platform/x86/intel_pmc_core.c: In function pmc_core_resume:drivers/platform/x86/intel_pmc_core.c:1327:3: error: implicit declaration of function pmc_core_slps0_display; did you mean pmc_core_is_pc10_failed? [-Werror=implicit-function-declaration]
pmc_core_slps0_display(pmcdev, dev, NULL);
^~~~~~~~~~~~~~~~~~~~~~Function pmc_core_slps0_display() is responsible for displaying debug registers, which is under CONFIG_DEBUG_FS.
Providing the static inline stub whenever CONFIG_DEBUG_FS is disabled to fix this. Function pmc_core_lpm_display() is the same.
--- drivers/platform/x86/intel_pmc_core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
drivers/platform/x86/intel_pmc_core.c +14 -0
@@ -1117,6 +1117,20 @@ static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev) } }#else +static inline void pmc_core_slps0_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s) +{ +} + +static inline void pmc_core_lpm_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s,u32 offset, +const char *str, +const struct pmc_bit_map **maps) +{ +} +static inline void pmc_core_dbgfs_register (struct pmc_dev *pmcdev) { }
Signature · 1 line
2.7.4
Quoted 5 lines · Chen Zhou
If
CONFIG_DEBUG_FSis n, build fails:
drivers/platform/x86/intel_pmc_core.c: In functionpmc_core_resume:drivers/platform/x86/intel_pmc_core.c:1327:3: error: implicit declaration of functionpmc_core_slps0_display; did you meanpmc_core_is_pc10_failed? [-Werror=implicit-function-declaration]
Quoted 8 lines
pmc_core_slps0_display(pmcdev, dev, NULL); ^~~~~~~~~~~~~~~~~~~~~~Function
pmc_core_slps0_display()is responsible for displaying debug registers, which is underCONFIG_DEBUG_FS.Providing the static inline stub whenever
CONFIG_DEBUG_FSis disabled to fix this. Functionpmc_core_lpm_display()is the same.
Thank you for the patch, but I think it's not the right approach. Basically we need to move those functions outside of #if IS_ENABLED(CONFIG_DEBUG_FS).
(Move them upper).
Also I have noticed another issue in pmc_core_lpm_display(). It uses tgl_lpm_maps directly. It shouldn't.
Gayatri, care to fix?
Quoted 34 lines
Reported-by Hulk Robot <[email protected]>Signed-off-by Chen Zhou <[email protected]>--- drivers/platform/x86/intel_pmc_core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/platform/x86/intel_pmc_core.c +14
-1@@ -1117,6 +1117,20 @@ static void pmc_core_dbgfs_register(struct pmc_dev *pmcdev) } }#else +static inline void pmc_core_slps0_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s) +{ +} + +static inline void pmc_core_lpm_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s,u32 offset, +const char *str, +const struct pmc_bit_map **maps) +{ +} +static inline void pmc_core_dbgfs_register (struct pmc_dev *pmcdev) { } --2.7.4
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 28 lines
-----Original Message-----
From: Andy Shevchenko <[email protected]>
Sent: Tuesday, February 25, 2020 2:13 AM
To: Chen Zhou <[email protected]>; Kammela, Gayatri <[email protected]>
Cc: Rajneesh Bhardwaj <[email protected]>; Somayaji, Vishwanath <[email protected]>; Darren Hart <[email protected]>; Andy Shevchenko <[email protected]>; Platform Driver <[email protected]>; Linux Kernel Mailing List <[email protected]>
Subject: Re: [PATCH -next] platform/x86:intel_pmc_core: fix build error withoutCONFIG_DEBUG_FSQuoted 5 lines · Chen Zhou
If
CONFIG_DEBUG_FSis n, build fails:
drivers/platform/x86/intel_pmc_core.c: In functionpmc_core_resume:drivers/platform/x86/intel_pmc_core.c:1327:3: error: implicit declarationof function
pmc_core_slps0_display; did you meanpmc_core_is_pc10_failed? [-Werror=implicit-function-declaration]Quoted 6 lines
pmc_core_slps0_display(pmcdev, dev, NULL); ^~~~~~~~~~~~~~~~~~~~~~Function
pmc_core_slps0_display()is responsible for displaying debug registers, which is underCONFIG_DEBUG_FS.
Quoted 7 lines
Quoted 2 lines
Providing the static inline stub whenever
CONFIG_DEBUG_FSis disabled to fix this. Functionpmc_core_lpm_display()is the same.Thank you for the patch, but I think it's not the right approach. Basically we need to move those functions outside of #if
IS_ENABLED(CONFIG_DEBUG_FS).
(Move them upper).
Agreed
Quoted 7 lines
Also I have noticed another issue in
pmc_core_lpm_display(). It usestgl_lpm_mapsdirectly. It shouldn't.Cc Gayatri.Gayatri, care to fix?
Hi Andy, caught this bug in our internal regression too. I will send the patch shortly. Thanks!
Quoted 38 lines
drivers/platform/x86/intel_pmc_core.c static void pmc_core_dbgfs_register(struct
Quoted 13 lines
Reported-by Hulk Robot <[email protected]>Signed-off-by Chen Zhou <[email protected]>--- drivers/platform/x86/intel_pmc_core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/platform/x86/intel_pmc_core.c +0
-0@@ -1117,6 +1117,20 @@ static void pmc_core_dbgfs_register(struct
pmc_dev*pmcdev)Quoted 17 lines
drivers/platform/x86/intel_pmc_core.c +11
-1} }#else +static inline void pmc_core_slps0_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s) { } + +static inline void pmc_core_lpm_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s,u32 offset, +const char *str, +const struct pmc_bit_map +**maps) { } +static inline void pmc_core_dbgfs_register (struct pmc_dev *pmcdev) { } --Quoted 2 lines
2.7.4
--
With Best Regards,
Andy Shevchenko
Quoted 52 lines
-----Original Message-----
From: Kammela, Gayatri
Sent: Tuesday, February 25, 2020 9:11 AM
To: Andy Shevchenko <[email protected]>; Chen Zhou <[email protected]>
Cc: Rajneesh Bhardwaj <[email protected]>; Somayaji, Vishwanath <[email protected]>; Darren Hart <[email protected]>; Andy Shevchenko <[email protected]>; Platform Driver <[email protected]>; Linux Kernel Mailing List <[email protected]>
Subject: RE: [PATCH -next] platform/x86:intel_pmc_core: fix build error withoutCONFIG_DEBUG_FSQuoted 8 lines
-----Original Message-----
From: Andy Shevchenko <[email protected]>
Sent: Tuesday, February 25, 2020 2:13 AM
To: Chen Zhou <[email protected]>; Kammela, Gayatri <[email protected]>
Cc: Rajneesh Bhardwaj <[email protected]>; Somayaji, Vishwanath <[email protected]>; Darren Hart <[email protected]>; Andy Shevchenko <[email protected]>;Platform
Quoted 21 lines
Driver <[email protected]>; Linux Kernel Mailing List <[email protected]>
Subject: Re: [PATCH -next] platform/x86:intel_pmc_core: fix build error withoutCONFIG_DEBUG_FSQuoted 6 lines · Chen Zhou
If
CONFIG_DEBUG_FSis n, build fails:
drivers/platform/x86/intel_pmc_core.c: In functionpmc_core_resume:drivers/platform/x86/intel_pmc_core.c:1327:3: error: implicit declarationof function
pmc_core_slps0_display; did you meanpmc_core_is_pc10_failed? [-Werror=implicit-function-declaration]Quoted 6 lines
pmc_core_slps0_display(pmcdev, dev, NULL); ^~~~~~~~~~~~~~~~~~~~~~Function
pmc_core_slps0_display()is responsible for displaying debug registers, which is underCONFIG_DEBUG_FS.Quoted 7 lines
Quoted 2 lines
Providing the static inline stub whenever
CONFIG_DEBUG_FSis disabled to fix this. Functionpmc_core_lpm_display()is the same.Thank you for the patch, but I think it's not the right approach. Basically we need to move those functions outside of #if
IS_ENABLED(CONFIG_DEBUG_FS).
(Move them upper).Agreed
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
Also I have noticed another issue in
pmc_core_lpm_display(). It usestgl_lpm_mapsdirectly. It shouldn't.Cc Gayatri.Gayatri, care to fix?
Hi Andy, caught this bug in our internal regression too. I will send the patch shortly. Thanks!
Update: Andy, I have 4 small fixes for the patch series merged in for-next branch. I am wondering if I should send the fixup patches or if you drop the patch series from for-next branch, I can send out the new version that includes all these fixes. Please suggest. Thanks!
Quoted 38 lines
Quoted 38 lines
drivers/platform/x86/intel_pmc_core.c static void pmc_core_dbgfs_register(struct
Quoted 13 lines
Reported-by Hulk Robot <[email protected]>Signed-off-by Chen Zhou <[email protected]>--- drivers/platform/x86/intel_pmc_core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/platform/x86/intel_pmc_core.c +0
-0@@ -1117,6 +1117,20 @@ static void pmc_core_dbgfs_register(struct
pmc_dev*pmcdev)Quoted 17 lines
drivers/platform/x86/intel_pmc_core.c +11
-1} }#else +static inline void pmc_core_slps0_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s) { } + +static inline void pmc_core_lpm_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s,u32 offset, +const char *str, +const struct pmc_bit_map +**maps) { } +static inline void pmc_core_dbgfs_register (struct pmc_dev *pmcdev) { } --Quoted 2 lines
2.7.4
--
With Best Regards,
Andy Shevchenko
Quoted 55 lines · Gayatri
Quoted 55 lines
-----Original Message-----
From: Kammela, Gayatri
Sent: Tuesday, February 25, 2020 9:11 AM
To: Andy Shevchenko <[email protected]>; Chen Zhou <[email protected]>
Cc: Rajneesh Bhardwaj <[email protected]>; Somayaji, Vishwanath <[email protected]>; Darren Hart <[email protected]>; Andy Shevchenko <[email protected]>; Platform Driver <[email protected]>; Linux Kernel Mailing List <[email protected]>
Subject: RE: [PATCH -next] platform/x86:intel_pmc_core: fix build error withoutCONFIG_DEBUG_FSQuoted 8 lines
-----Original Message-----
From: Andy Shevchenko <[email protected]>
Sent: Tuesday, February 25, 2020 2:13 AM
To: Chen Zhou <[email protected]>; Kammela, Gayatri <[email protected]>
Cc: Rajneesh Bhardwaj <[email protected]>; Somayaji, Vishwanath <[email protected]>; Darren Hart <[email protected]>; Andy Shevchenko <[email protected]>;Platform
Quoted 21 lines
Driver <[email protected]>; Linux Kernel Mailing List <[email protected]>
Subject: Re: [PATCH -next] platform/x86:intel_pmc_core: fix build error withoutCONFIG_DEBUG_FSQuoted 6 lines · Chen Zhou
If
CONFIG_DEBUG_FSis n, build fails:
drivers/platform/x86/intel_pmc_core.c: In functionpmc_core_resume:drivers/platform/x86/intel_pmc_core.c:1327:3: error: implicit declarationof function
pmc_core_slps0_display; did you meanpmc_core_is_pc10_failed? [-Werror=implicit-function-declaration]Quoted 6 lines
pmc_core_slps0_display(pmcdev, dev, NULL); ^~~~~~~~~~~~~~~~~~~~~~Function
pmc_core_slps0_display()is responsible for displaying debug registers, which is underCONFIG_DEBUG_FS.Quoted 7 lines
Quoted 2 lines
Providing the static inline stub whenever
CONFIG_DEBUG_FSis disabled to fix this. Functionpmc_core_lpm_display()is the same.Thank you for the patch, but I think it's not the right approach. Basically we need to move those functions outside of #if
IS_ENABLED(CONFIG_DEBUG_FS).
(Move them upper).Agreed
Quoted 4 lines
Also I have noticed another issue in
pmc_core_lpm_display(). It usestgl_lpm_mapsdirectly. It shouldn't.
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
Cc Gayatri.Gayatri, care to fix?
Hi Andy, caught this bug in our internal regression too. I will send the patch shortly. Thanks!
Update: Andy, I have 4 small fixes for the patch series merged in for-next branch.
I don't see it in the mailing list.
Please check if you send them correctly.
There are more bug reports coming. We must fix this ASAP.
Quoted 40 lines
I am wondering if I should send the fixup patches or if you drop the patch series from for-next branch, I can send out the new version that includes all these fixes. Please suggest. Thanks!
Quoted 38 lines
Quoted 38 lines
drivers/platform/x86/intel_pmc_core.c static void pmc_core_dbgfs_register(struct
Quoted 13 lines
Reported-by Hulk Robot <[email protected]>Signed-off-by Chen Zhou <[email protected]>--- drivers/platform/x86/intel_pmc_core.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)drivers/platform/x86/intel_pmc_core.c +0
-0@@ -1117,6 +1117,20 @@ static void pmc_core_dbgfs_register(struct
pmc_dev*pmcdev)Quoted 17 lines
drivers/platform/x86/intel_pmc_core.c +11
-1} }#else +static inline void pmc_core_slps0_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s) { } + +static inline void pmc_core_lpm_display (struct pmc_dev *pmcdev, +struct device *dev, +struct seq_file *s,u32 offset, +const char *str, +const struct pmc_bit_map +**maps) { } +static inline void pmc_core_dbgfs_register (struct pmc_dev *pmcdev) { } --Quoted 2 lines
2.7.4
--
With Best Regards,
Andy Shevchenko
--
With Best Regards,
Andy Shevchenko