All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks
@ 2022-09-22 17:56 Shyam Sundar S K
  2022-09-27 13:20 ` Hans de Goede
  0 siblings, 1 reply; 5+ messages in thread
From: Shyam Sundar S K @ 2022-09-22 17:56 UTC (permalink / raw)
  To: hdegoede, markgross, Sanket.Goswami; +Cc: platform-driver-x86, Shyam Sundar S K

Since linux/debugfs.h already has the stubs for the used debugfs
functions when debugfs is not enabled, remove the #ifdef CONFIG_DEBUG_FS
checks.

Fixes: 156ec4731cb22 ("platform/x86: amd-pmc: Add AMD platform support for S2Idle")
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
---
 drivers/platform/x86/amd/pmc.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
index e47e54b095af..047e47449ff9 100644
--- a/drivers/platform/x86/amd/pmc.c
+++ b/drivers/platform/x86/amd/pmc.c
@@ -153,9 +153,7 @@ struct amd_pmc_dev {
 	struct device *dev;
 	struct pci_dev *rdev;
 	struct mutex lock; /* generic mutex lock */
-#if IS_ENABLED(CONFIG_DEBUG_FS)
 	struct dentry *dbgfs_dir;
-#endif /* CONFIG_DEBUG_FS */
 };
 
 static bool enable_stb;
@@ -429,7 +427,6 @@ static struct attribute *pmc_attrs[] = {
 };
 ATTRIBUTE_GROUPS(pmc);
 
-#ifdef CONFIG_DEBUG_FS
 static int smu_fw_info_show(struct seq_file *s, void *unused)
 {
 	struct amd_pmc_dev *dev = s->private;
@@ -544,15 +541,6 @@ static void amd_pmc_dbgfs_register(struct amd_pmc_dev *dev)
 					    &amd_pmc_stb_debugfs_fops);
 	}
 }
-#else
-static inline void amd_pmc_dbgfs_register(struct amd_pmc_dev *dev)
-{
-}
-
-static inline void amd_pmc_dbgfs_unregister(struct amd_pmc_dev *dev)
-{
-}
-#endif /* CONFIG_DEBUG_FS */
 
 static void amd_pmc_dump_registers(struct amd_pmc_dev *dev)
 {
-- 
2.25.1


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

* Re: [PATCH] platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks
  2022-09-22 17:56 Shyam Sundar S K
@ 2022-09-27 13:20 ` Hans de Goede
  0 siblings, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2022-09-27 13:20 UTC (permalink / raw)
  To: Shyam Sundar S K, markgross, Sanket.Goswami; +Cc: platform-driver-x86

Hi,

On 9/22/22 19:56, Shyam Sundar S K wrote:
> Since linux/debugfs.h already has the stubs for the used debugfs
> functions when debugfs is not enabled, remove the #ifdef CONFIG_DEBUG_FS
> checks.
> 
> Fixes: 156ec4731cb22 ("platform/x86: amd-pmc: Add AMD platform support for S2Idle")
> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

Thank you for your patch, I've applied this patch to my review-hans 
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans


> ---
>  drivers/platform/x86/amd/pmc.c | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
> index e47e54b095af..047e47449ff9 100644
> --- a/drivers/platform/x86/amd/pmc.c
> +++ b/drivers/platform/x86/amd/pmc.c
> @@ -153,9 +153,7 @@ struct amd_pmc_dev {
>  	struct device *dev;
>  	struct pci_dev *rdev;
>  	struct mutex lock; /* generic mutex lock */
> -#if IS_ENABLED(CONFIG_DEBUG_FS)
>  	struct dentry *dbgfs_dir;
> -#endif /* CONFIG_DEBUG_FS */
>  };
>  
>  static bool enable_stb;
> @@ -429,7 +427,6 @@ static struct attribute *pmc_attrs[] = {
>  };
>  ATTRIBUTE_GROUPS(pmc);
>  
> -#ifdef CONFIG_DEBUG_FS
>  static int smu_fw_info_show(struct seq_file *s, void *unused)
>  {
>  	struct amd_pmc_dev *dev = s->private;
> @@ -544,15 +541,6 @@ static void amd_pmc_dbgfs_register(struct amd_pmc_dev *dev)
>  					    &amd_pmc_stb_debugfs_fops);
>  	}
>  }
> -#else
> -static inline void amd_pmc_dbgfs_register(struct amd_pmc_dev *dev)
> -{
> -}
> -
> -static inline void amd_pmc_dbgfs_unregister(struct amd_pmc_dev *dev)
> -{
> -}
> -#endif /* CONFIG_DEBUG_FS */
>  
>  static void amd_pmc_dump_registers(struct amd_pmc_dev *dev)
>  {


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

* [PATCH] platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks
@ 2022-10-31 22:36 Nils Freydank
  2022-11-01  4:51 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Nils Freydank @ 2022-10-31 22:36 UTC (permalink / raw)
  To: stable; +Cc: Nils Freydank

commit b37fe34c83099ba5105115f8287c5546af1f0a05 upstream.

This fixes a compilation bug introduced in commit
e9847175b266f12365160e124a207907da3dbe8e (platform/x86/amd: pmc: Read SMU
version during suspend on Cezanne systems).

Signed-off-by: Nils Freydank <nils.freydank@posteo.de>
---

 Backport patch applies and compiles with linux 6.0.6.
 Feel free to use the whole patch or any parts of it at your discretion.

 drivers/platform/x86/amd/pmc.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/platform/x86/amd/pmc.c b/drivers/platform/x86/amd/pmc.c
index fc326fdf4..6ccb9b384 100644
--- a/drivers/platform/x86/amd/pmc.c
+++ b/drivers/platform/x86/amd/pmc.c
@@ -151,9 +151,7 @@ struct amd_pmc_dev {
 	struct device *dev;
 	struct pci_dev *rdev;
 	struct mutex lock; /* generic mutex lock */
-#if IS_ENABLED(CONFIG_DEBUG_FS)
 	struct dentry *dbgfs_dir;
-#endif /* CONFIG_DEBUG_FS */
 };
 
 static bool enable_stb;
@@ -369,7 +367,6 @@ static void amd_pmc_validate_deepest(struct amd_pmc_dev *pdev)
 }
 #endif
 
-#ifdef CONFIG_DEBUG_FS
 static int smu_fw_info_show(struct seq_file *s, void *unused)
 {
 	struct amd_pmc_dev *dev = s->private;
@@ -504,15 +501,6 @@ static void amd_pmc_dbgfs_register(struct amd_pmc_dev *dev)
 					    &amd_pmc_stb_debugfs_fops);
 	}
 }
-#else
-static inline void amd_pmc_dbgfs_register(struct amd_pmc_dev *dev)
-{
-}
-
-static inline void amd_pmc_dbgfs_unregister(struct amd_pmc_dev *dev)
-{
-}
-#endif /* CONFIG_DEBUG_FS */
 
 static void amd_pmc_dump_registers(struct amd_pmc_dev *dev)
 {
-- 
2.38.1


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

* Re: [PATCH] platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks
  2022-10-31 22:36 [PATCH] platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks Nils Freydank
@ 2022-11-01  4:51 ` Greg KH
  2022-11-01  7:36   ` Nils Freydank
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2022-11-01  4:51 UTC (permalink / raw)
  To: Nils Freydank; +Cc: stable

On Mon, Oct 31, 2022 at 10:36:53PM +0000, Nils Freydank wrote:
> commit b37fe34c83099ba5105115f8287c5546af1f0a05 upstream.
> 
> This fixes a compilation bug introduced in commit
> e9847175b266f12365160e124a207907da3dbe8e (platform/x86/amd: pmc: Read SMU
> version during suspend on Cezanne systems).
> 
> Signed-off-by: Nils Freydank <nils.freydank@posteo.de>
> ---
> 
>  Backport patch applies and compiles with linux 6.0.6.

This is already in the 6.0.y queue, but thanks for sending it again.

Next time, be sure you keep the original changelog text _AND_ authorship
and signed-off-by lines, and cc: those developers as well.  Stripping
that off is a bit rude of them, don't you think?

thanks,

greg k-h

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

* Re: [PATCH] platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks
  2022-11-01  4:51 ` Greg KH
@ 2022-11-01  7:36   ` Nils Freydank
  0 siblings, 0 replies; 5+ messages in thread
From: Nils Freydank @ 2022-11-01  7:36 UTC (permalink / raw)
  To: Greg KH; +Cc: stable

Am Dienstag, den 01.11.2022 um 05:51:21 Uhr +0100 schrieb Greg KH <greg@kroah.com>:
> On Mon, Oct 31, 2022 at 10:36:53PM +0000, Nils Freydank wrote:
> > commit b37fe34c83099ba5105115f8287c5546af1f0a05 upstream.
> > 
> > This fixes a compilation bug introduced in commit
> > e9847175b266f12365160e124a207907da3dbe8e (platform/x86/amd: pmc: Read SMU
> > version during suspend on Cezanne systems).
> > 
> > Signed-off-by: Nils Freydank <nils.freydank@posteo.de>
> > ---
> > 
> >  Backport patch applies and compiles with linux 6.0.6.
> 
> This is already in the 6.0.y queue, but thanks for sending it again.
> 
> Next time, be sure you keep the original changelog text _AND_ authorship
> and signed-off-by lines, and cc: those developers as well.  Stripping
> that off is a bit rude of them, don't you think?

Thanks for the clear instructions, I'll keep them in mind for the future.

> thanks,
> 
> greg k-h

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

end of thread, other threads:[~2022-11-01  7:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-31 22:36 [PATCH] platform/x86/amd: pmc: remove CONFIG_DEBUG_FS checks Nils Freydank
2022-11-01  4:51 ` Greg KH
2022-11-01  7:36   ` Nils Freydank
  -- strict thread matches above, loose matches on Subject: below --
2022-09-22 17:56 Shyam Sundar S K
2022-09-27 13:20 ` 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.