public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC] s390/pci: Drop unneeded reference to CONFIG_DMI
@ 2024-04-23 14:27 Jean Delvare
  2024-04-24 11:34 ` Niklas Schnelle
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2024-04-23 14:27 UTC (permalink / raw)
  To: linux-s390; +Cc: LKML, Niklas Schnelle, Gerald Schaefer

The S/390 architecture doesn't support SMBIOS, so CONFIG_DMI will
never be defined there. So we can simply omit these preprocessing
directives and speed up the build a bit.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Niklas Schnelle <schnelle@linux.ibm.com>
Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
---
Niklas, you added these preprocessing directives as part of commit
81bbf03905aa ("s390/pci: expose a PCI device's UID as its index").
I do not understand the purpose. Am I missing something?

 arch/s390/pci/pci_sysfs.c |    4 ----
 1 file changed, 4 deletions(-)

--- linux-6.8.orig/arch/s390/pci/pci_sysfs.c
+++ linux-6.8/arch/s390/pci/pci_sysfs.c
@@ -156,7 +156,6 @@ static ssize_t uid_is_unique_show(struct
 }
 static DEVICE_ATTR_RO(uid_is_unique);
 
-#ifndef CONFIG_DMI
 /* analogous to smbios index */
 static ssize_t index_show(struct device *dev,
 			  struct device_attribute *attr, char *buf)
@@ -186,7 +185,6 @@ static struct attribute_group zpci_ident
 	.attrs = zpci_ident_attrs,
 	.is_visible = zpci_index_is_visible,
 };
-#endif
 
 static struct bin_attribute *zpci_bin_attrs[] = {
 	&bin_attr_util_string,
@@ -229,8 +227,6 @@ static struct attribute_group pfip_attr_
 const struct attribute_group *zpci_attr_groups[] = {
 	&zpci_attr_group,
 	&pfip_attr_group,
-#ifndef CONFIG_DMI
 	&zpci_ident_attr_group,
-#endif
 	NULL,
 };

-- 
Jean Delvare
SUSE L3 Support

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

* Re: [PATCH RFC] s390/pci: Drop unneeded reference to CONFIG_DMI
  2024-04-23 14:27 [PATCH RFC] s390/pci: Drop unneeded reference to CONFIG_DMI Jean Delvare
@ 2024-04-24 11:34 ` Niklas Schnelle
  2024-04-24 12:05   ` Alexander Gordeev
  0 siblings, 1 reply; 5+ messages in thread
From: Niklas Schnelle @ 2024-04-24 11:34 UTC (permalink / raw)
  To: Jean Delvare, linux-s390
  Cc: LKML, Gerald Schaefer, Heiko Carstens, Vasily Gorbik,
	Alexander Gordeev

On Tue, 2024-04-23 at 16:27 +0200, Jean Delvare wrote:
> The S/390 architecture doesn't support SMBIOS, so CONFIG_DMI will
> never be defined there. So we can simply omit these preprocessing
> directives and speed up the build a bit.
> 
> Signed-off-by: Jean Delvare <jdelvare@suse.de>
> Cc: Niklas Schnelle <schnelle@linux.ibm.com>
> Cc: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
> ---
> Niklas, you added these preprocessing directives as part of commit
> 81bbf03905aa ("s390/pci: expose a PCI device's UID as its index").
> I do not understand the purpose. Am I missing something?

This was only done out of an abundance of caution for the very unlikely
case that somehow someday we end up with EFI and DMI on s390x in which
case this code would then collide with the smbios way of getting an
index from firmware. Looking back I think this is indeed not useful and
even if we ever get a collision it would probably need treatment anyway
in which case getting a compile error is probably a good thing and less
code is always good too.

> 
>  arch/s390/pci/pci_sysfs.c |    4 ----
>  1 file changed, 4 deletions(-)
> 
> --- linux-6.8.orig/arch/s390/pci/pci_sysfs.c
> +++ linux-6.8/arch/s390/pci/pci_sysfs.c
> @@ -156,7 +156,6 @@ static ssize_t uid_is_unique_show(struct
>  }
>  static DEVICE_ATTR_RO(uid_is_unique);
>  
> -#ifndef CONFIG_DMI
>  /* analogous to smbios index */
>  static ssize_t index_show(struct device *dev,
>  			  struct device_attribute *attr, char *buf)
> @@ -186,7 +185,6 @@ static struct attribute_group zpci_ident
>  	.attrs = zpci_ident_attrs,
>  	.is_visible = zpci_index_is_visible,
>  };
> -#endif
>  
>  static struct bin_attribute *zpci_bin_attrs[] = {
>  	&bin_attr_util_string,
> @@ -229,8 +227,6 @@ static struct attribute_group pfip_attr_
>  const struct attribute_group *zpci_attr_groups[] = {
>  	&zpci_attr_group,
>  	&pfip_attr_group,
> -#ifndef CONFIG_DMI
>  	&zpci_ident_attr_group,
> -#endif
>  	NULL,
>  };
> 

I'm assuming this change should go via the s390 tree? So let me add the
s390x architecture maintainers to pick this up, but from my side and
considering that you maintain the SMBIOS/DMI support:

Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>

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

* Re: [PATCH RFC] s390/pci: Drop unneeded reference to CONFIG_DMI
  2024-04-24 11:34 ` Niklas Schnelle
@ 2024-04-24 12:05   ` Alexander Gordeev
  2024-04-24 12:08     ` Jean Delvare
  0 siblings, 1 reply; 5+ messages in thread
From: Alexander Gordeev @ 2024-04-24 12:05 UTC (permalink / raw)
  To: Niklas Schnelle, Jean Delvare
  Cc: Jean Delvare, linux-s390, LKML, Gerald Schaefer, Heiko Carstens,
	Vasily Gorbik

On Wed, Apr 24, 2024 at 01:34:49PM +0200, Niklas Schnelle wrote:
> I'm assuming this change should go via the s390 tree? So let me add the
> s390x architecture maintainers to pick this up, but from my side and
> considering that you maintain the SMBIOS/DMI support:

Hi Jean,

Whether this patch is good to go alone via s390 tree or (as Niklas
indicated) might depend on some SMBIOS/DMI update?

> Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>

Thanks!

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

* Re: [PATCH RFC] s390/pci: Drop unneeded reference to CONFIG_DMI
  2024-04-24 12:05   ` Alexander Gordeev
@ 2024-04-24 12:08     ` Jean Delvare
  2024-04-24 12:27       ` Alexander Gordeev
  0 siblings, 1 reply; 5+ messages in thread
From: Jean Delvare @ 2024-04-24 12:08 UTC (permalink / raw)
  To: Alexander Gordeev
  Cc: Niklas Schnelle, linux-s390, LKML, Gerald Schaefer,
	Heiko Carstens, Vasily Gorbik

On Wed, 24 Apr 2024 14:05:49 +0200, Alexander Gordeev wrote:
> On Wed, Apr 24, 2024 at 01:34:49PM +0200, Niklas Schnelle wrote:
> > I'm assuming this change should go via the s390 tree? So let me add the
> > s390x architecture maintainers to pick this up, but from my side and
> > considering that you maintain the SMBIOS/DMI support:  
> 
> Hi Jean,
> 
> Whether this patch is good to go alone via s390 tree or (as Niklas
> indicated) might depend on some SMBIOS/DMI update?


It's good to go through the s390 tree, it's a simple clean-up which
doesn't depend on anything else.

> > Acked-by: Niklas Schnelle <schnelle@linux.ibm.com>  

Thanks to both of you!

-- 
Jean Delvare
SUSE L3 Support

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

* Re: [PATCH RFC] s390/pci: Drop unneeded reference to CONFIG_DMI
  2024-04-24 12:08     ` Jean Delvare
@ 2024-04-24 12:27       ` Alexander Gordeev
  0 siblings, 0 replies; 5+ messages in thread
From: Alexander Gordeev @ 2024-04-24 12:27 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Niklas Schnelle, linux-s390, LKML, Gerald Schaefer,
	Heiko Carstens, Vasily Gorbik

On Wed, Apr 24, 2024 at 02:08:23PM +0200, Jean Delvare wrote:
> It's good to go through the s390 tree, it's a simple clean-up which
> doesn't depend on anything else.

Applied, thanks!

Thanks!

> Thanks to both of you!
> 
> -- 
> Jean Delvare
> SUSE L3 Support

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

end of thread, other threads:[~2024-04-24 12:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-23 14:27 [PATCH RFC] s390/pci: Drop unneeded reference to CONFIG_DMI Jean Delvare
2024-04-24 11:34 ` Niklas Schnelle
2024-04-24 12:05   ` Alexander Gordeev
2024-04-24 12:08     ` Jean Delvare
2024-04-24 12:27       ` Alexander Gordeev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox