linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] qla2xxx: don't include <generated/utsrelease.h>
@ 2017-06-21 11:40 Johannes Berg
  2017-06-21 11:43 ` Johannes Thumshirn
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Johannes Berg @ 2017-06-21 11:40 UTC (permalink / raw)
  To: linux-scsi; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

There's no need to use the static UTS_RELEASE string, since
utsname()->release contains the same.

This avoids rebuilding this file for every change of the
release string.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
index 7443e4efa3ae..9195e00261f6 100644
--- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
+++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
@@ -25,7 +25,6 @@
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <generated/utsrelease.h>
 #include <linux/utsname.h>
 #include <linux/vmalloc.h>
 #include <linux/init.h>
@@ -1870,9 +1869,9 @@ static ssize_t tcm_qla2xxx_wwn_version_show(struct config_item *item,
 		char *page)
 {
 	return sprintf(page,
-	    "TCM QLOGIC QLA2XXX NPIV capable fabric module %s on %s/%s on "
-	    UTS_RELEASE"\n", QLA2XXX_VERSION, utsname()->sysname,
-	    utsname()->machine);
+	    "TCM QLOGIC QLA2XXX NPIV capable fabric module %s on %s/%s on %s\n",
+	    QLA2XXX_VERSION, utsname()->sysname,
+	    utsname()->machine, utsname()->release);
 }
 
 CONFIGFS_ATTR_RO(tcm_qla2xxx_wwn_, version);
@@ -1976,9 +1975,9 @@ static int tcm_qla2xxx_register_configfs(void)
 {
 	int ret;
 
-	pr_debug("TCM QLOGIC QLA2XXX fabric module %s on %s/%s on "
-	    UTS_RELEASE"\n", QLA2XXX_VERSION, utsname()->sysname,
-	    utsname()->machine);
+	pr_debug("TCM QLOGIC QLA2XXX fabric module %s on %s/%s on %s\n",
+	    QLA2XXX_VERSION, utsname()->sysname,
+	    utsname()->machine, utsname()->release);
 
 	ret = target_register_template(&tcm_qla2xxx_ops);
 	if (ret)
-- 
2.11.0

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

* Re: [PATCH] qla2xxx: don't include <generated/utsrelease.h>
  2017-06-21 11:40 [PATCH] qla2xxx: don't include <generated/utsrelease.h> Johannes Berg
@ 2017-06-21 11:43 ` Johannes Thumshirn
  2017-06-21 13:29 ` Bart Van Assche
  2017-06-26 17:06 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Johannes Thumshirn @ 2017-06-21 11:43 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-scsi, Johannes Berg

On Wed, Jun 21, 2017 at 01:40:05PM +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> There's no need to use the static UTS_RELEASE string, since
> utsname()->release contains the same.
> 
> This avoids rebuilding this file for every change of the
> release string.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

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

* Re: [PATCH] qla2xxx: don't include <generated/utsrelease.h>
  2017-06-21 11:40 [PATCH] qla2xxx: don't include <generated/utsrelease.h> Johannes Berg
  2017-06-21 11:43 ` Johannes Thumshirn
@ 2017-06-21 13:29 ` Bart Van Assche
  2017-06-21 13:43   ` Johannes Berg
  2017-06-26 17:06 ` Martin K. Petersen
  2 siblings, 1 reply; 5+ messages in thread
From: Bart Van Assche @ 2017-06-21 13:29 UTC (permalink / raw)
  To: linux-scsi@vger.kernel.org, johannes@sipsolutions.net
  Cc: johannes.berg@intel.com

On Wed, 2017-06-21 at 13:40 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> There's no need to use the static UTS_RELEASE string, since
> utsname()->release contains the same.
> 
> This avoids rebuilding this file for every change of the
> release string.
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>  drivers/scsi/qla2xxx/tcm_qla2xxx.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> index 7443e4efa3ae..9195e00261f6 100644
> --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c
> @@ -25,7 +25,6 @@
>  
>  #include <linux/module.h>
>  #include <linux/moduleparam.h>
> -#include <generated/utsrelease.h>
>  #include <linux/utsname.h>
>  #include <linux/vmalloc.h>
>  #include <linux/init.h>
> @@ -1870,9 +1869,9 @@ static ssize_t tcm_qla2xxx_wwn_version_show(struct config_item *item,
>  		char *page)
>  {
>  	return sprintf(page,
> -	    "TCM QLOGIC QLA2XXX NPIV capable fabric module %s on %s/%s on "
> -	    UTS_RELEASE"\n", QLA2XXX_VERSION, utsname()->sysname,
> -	    utsname()->machine);
> +	    "TCM QLOGIC QLA2XXX NPIV capable fabric module %s on %s/%s on %s\n",
> +	    QLA2XXX_VERSION, utsname()->sysname,
> +	    utsname()->machine, utsname()->release);
>  }
>  
>  CONFIGFS_ATTR_RO(tcm_qla2xxx_wwn_, version);
> @@ -1976,9 +1975,9 @@ static int tcm_qla2xxx_register_configfs(void)
>  {
>  	int ret;
>  
> -	pr_debug("TCM QLOGIC QLA2XXX fabric module %s on %s/%s on "
> -	    UTS_RELEASE"\n", QLA2XXX_VERSION, utsname()->sysname,
> -	    utsname()->machine);
> +	pr_debug("TCM QLOGIC QLA2XXX fabric module %s on %s/%s on %s\n",
> +	    QLA2XXX_VERSION, utsname()->sysname,
> +	    utsname()->machine, utsname()->release);
>  
>  	ret = target_register_template(&tcm_qla2xxx_ops);
>  	if (ret)

Hello Johannes,

Although this patch looks fine to me, I think removing the UTS release information
from the output entirely would be even better. I think including that information
in the output only made sense before LIO went upstream.

Bart.

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

* Re: [PATCH] qla2xxx: don't include <generated/utsrelease.h>
  2017-06-21 13:29 ` Bart Van Assche
@ 2017-06-21 13:43   ` Johannes Berg
  0 siblings, 0 replies; 5+ messages in thread
From: Johannes Berg @ 2017-06-21 13:43 UTC (permalink / raw)
  To: Bart Van Assche, linux-scsi@vger.kernel.org

On Wed, 2017-06-21 at 13:29 +0000, Bart Van Assche wrote:
> On Wed, 2017-06-21 at 13:40 +0200, Johannes Berg wrote:
> > From: Johannes Berg <johannes.berg@intel.com>
> > 
> > There's no need to use the static UTS_RELEASE string, since
> > utsname()->release contains the same.
> > 
> > This avoids rebuilding this file for every change of the
> > release string.

> > tcm_qla2xxx_wwn_version_show(struct config_item *item,
> >  		char *page)
> >  {
> >  	return sprintf(page,
> > -	    "TCM QLOGIC QLA2XXX NPIV capable fabric module %s on
> > %s/%s on "
> > -	    UTS_RELEASE"\n", QLA2XXX_VERSION, utsname()->sysname,
> > -	    utsname()->machine);
> > +	    "TCM QLOGIC QLA2XXX NPIV capable fabric module %s on
> > %s/%s on %s\n",
> > +	    QLA2XXX_VERSION, utsname()->sysname,
> > +	    utsname()->machine, utsname()->release);
> >  }

> Although this patch looks fine to me, I think removing the UTS
> release information from the output entirely would be even better. I
> think including that information in the output only made sense before
> LIO went upstream.

Well, yeah, maybe. But at least the part I preserved in the quote above
has userspace API implications, so I really didn't want to do that as a
drive-by patch submission :)

johannes

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

* Re: [PATCH] qla2xxx: don't include <generated/utsrelease.h>
  2017-06-21 11:40 [PATCH] qla2xxx: don't include <generated/utsrelease.h> Johannes Berg
  2017-06-21 11:43 ` Johannes Thumshirn
  2017-06-21 13:29 ` Bart Van Assche
@ 2017-06-26 17:06 ` Martin K. Petersen
  2 siblings, 0 replies; 5+ messages in thread
From: Martin K. Petersen @ 2017-06-26 17:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-scsi, Johannes Berg


Johannes,

> There's no need to use the static UTS_RELEASE string, since
> utsname()->release contains the same.
>
> This avoids rebuilding this file for every change of the
> release string.

Applied to 4.13/scsi-queue, thanks!

-- 
Martin K. Petersen	Oracle Linux Engineering

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

end of thread, other threads:[~2017-06-26 17:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-21 11:40 [PATCH] qla2xxx: don't include <generated/utsrelease.h> Johannes Berg
2017-06-21 11:43 ` Johannes Thumshirn
2017-06-21 13:29 ` Bart Van Assche
2017-06-21 13:43   ` Johannes Berg
2017-06-26 17:06 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).