public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Smart <jsmart2021@gmail.com>
To: Arnd Bergmann <arnd@kernel.org>,
	James Smart <james.smart@broadcom.com>,
	Dick Kennedy <dick.kennedy@broadcom.com>,
	"James E.J. Bottomley" <jejb@linux.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Justin Tee <justin.tee@broadcom.com>
Cc: Lee Jones <lee.jones@linaro.org>,
	Gaurav Srivastava <gaurav.srivastava@broadcom.com>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: lpfc: Fix gcc -Wstringop-overread warning, again
Date: Mon, 20 Sep 2021 11:49:58 -0700	[thread overview]
Message-ID: <a4c0a2fd-8b33-8b30-ed74-e033136d496a@gmail.com> (raw)
In-Reply-To: <20210920095628.1191676-1-arnd@kernel.org>

On 9/20/2021 2:56 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> I fixed a stringop-overread warning earlier this year, now a
> second copy of the original code was added and the warning came
> back:
> 
> drivers/scsi/lpfc/lpfc_attr.c: In function 'lpfc_cmf_info_show':
> drivers/scsi/lpfc/lpfc_attr.c:289:25: error: 'strnlen' specified bound 4095 exceeds source size 24 [-Werror=stringop-overread]
>    289 |                         strnlen(LPFC_INFO_MORE_STR, PAGE_SIZE - 1),
>        |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Fix it the same way as the other copy.
> 
> Fixes: ada48ba70f6b ("scsi: lpfc: Fix gcc -Wstringop-overread warning")
> Fixes: 74a7baa2a3ee ("scsi: lpfc: Add cmf_info sysfs entry")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/scsi/lpfc/lpfc_attr.c | 7 ++-----


Thank You Arnd. Looks good.

Reviewed-by: James Smart <jsmart2021@gmail.com>

-- james

  reply	other threads:[~2021-09-21  2:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20  9:56 [PATCH] scsi: lpfc: Fix gcc -Wstringop-overread warning, again Arnd Bergmann
2021-09-20 18:49 ` James Smart [this message]
2021-09-22  4:44 ` Martin K. Petersen

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=a4c0a2fd-8b33-8b30-ed74-e033136d496a@gmail.com \
    --to=jsmart2021@gmail.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=dick.kennedy@broadcom.com \
    --cc=gaurav.srivastava@broadcom.com \
    --cc=james.smart@broadcom.com \
    --cc=jejb@linux.ibm.com \
    --cc=justin.tee@broadcom.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox