All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Smart <james.smart@emulex.com>
To: Tomas Henzl <thenzl@redhat.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 10/21] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command
Date: Mon, 16 Feb 2015 11:22:20 -0500	[thread overview]
Message-ID: <54E2193C.3020204@emulex.com> (raw)
In-Reply-To: <54D4B18D.2070306@redhat.com>

agree - nice nit.

I'll add this to the list of things to merge in the next patch update.

-- james


On 2/6/2015 7:20 AM, Tomas Henzl wrote:
> On 02/05/2015 08:24 PM, James Smart wrote:
>> ---
>>   drivers/scsi/lpfc/lpfc_ct.c | 23 ++++++++++++++++++++---
>>   1 file changed, 20 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c
>> index 61a32cd..5091184 100644
>> --- a/drivers/scsi/lpfc/lpfc_ct.c
>> +++ b/drivers/scsi/lpfc/lpfc_ct.c
>> @@ -1070,12 +1070,29 @@ lpfc_vport_symbolic_node_name(struct lpfc_vport *vport, char *symbol,
>>   	size_t size)
>>   {
>>   	char fwrev[FW_REV_STR_SIZE];
>> -	int n;
>> +	int n = 0;
> No need for this^ initialisation , as 'n' is directly set  two lines later
>
>>   
>>   	lpfc_decode_firmware_rev(vport->phba, fwrev, 0);
>>   
>> -	n = snprintf(symbol, size, "Emulex %s FV%s DV%s",
>> -		vport->phba->ModelName, fwrev, lpfc_release_version);
>> +	n = snprintf(symbol, size, "Emulex %s", vport->phba->ModelName);
>> +
>> +	if (size < n)
>> +		return n;
>> +	n += snprintf(symbol + n, size - n, " FV%s", fwrev);
>> +
>> +	if (size < n)
>> +		return n;
>> +	n += snprintf(symbol + n, size - n, " DV%s", lpfc_release_version);
>> +
>> +	if (size < n)
>> +		return n;
>> +	n += snprintf(symbol + n, size - n, " HN:%s", init_utsname()->nodename);
>> +
>> +	/* Note :- OS name is "Linux" as per requirement BZ168199. */
>> +	if (size < n)
>> +		return n;
>> +	n += snprintf(symbol + n, size - n, " OS:%s", init_utsname()->sysname);
>> +
>>   	return n;
>>   }
>>   
>
>


  reply	other threads:[~2015-02-16 16:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 19:24 [PATCH 10/21] lpfc: Fix provide host name and OS name in RSNN-NN FC-GS command James Smart
2015-02-06 12:20 ` Tomas Henzl
2015-02-16 16:22   ` James Smart [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-04-03 21:12 James Smart
2015-04-05 12:07 ` Sebastian Herbszt
2015-04-07 19:23   ` James Smart
2015-04-10  6:13 ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54E2193C.3020204@emulex.com \
    --to=james.smart@emulex.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=thenzl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.