linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: "James E.J. Bottomley" <jejb@linux.ibm.com>,
	Arnd Bergmann <arnd@kernel.org>,
	Jack Wang <jinpu.wang@cloud.ionos.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	Joe Perches <joe@perches.com>, Viswas G <Viswas.G@microchip.com>,
	Lee Jones <lee.jones@linaro.org>,
	Vaibhav Gupta <vaibhavgupta40@gmail.com>,
	linux-kernel@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>,
	linux-scsi@vger.kernel.org,
	Ruksar Devadi <Ruksar.devadi@microchip.com>,
	Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH] scsi: pm8001: avoid -Wrestrict warning
Date: Mon, 29 Mar 2021 23:54:31 -0400	[thread overview]
Message-ID: <161707636883.29267.13458445568299805895.b4-ty@oracle.com> (raw)
In-Reply-To: <20210323125458.1825564-1-arnd@kernel.org>

On Tue, 23 Mar 2021 13:54:23 +0100, Arnd Bergmann wrote:

> On some configurations, gcc warns about overlapping source and
> destination arguments to snprintf:
> 
> drivers/scsi/pm8001/pm8001_init.c: In function 'pm8001_request_msix':
> drivers/scsi/pm8001/pm8001_init.c:977:3: error: 'snprintf' argument 4 may overlap destination object 'pm8001_ha' [-Werror=restrict]
>   977 |   snprintf(drvname, len, "%s-%d", pm8001_ha->name, i);
>       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/scsi/pm8001/pm8001_init.c:962:56: note: destination object referenced by 'restrict'-qualified argument 1 was declared here
>   962 | static u32 pm8001_request_msix(struct pm8001_hba_info *pm8001_ha)
>       |                                ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
> 
> [...]

Applied to 5.13/scsi-queue, thanks!

[1/1] scsi: pm8001: avoid -Wrestrict warning
      https://git.kernel.org/mkp/scsi/c/c2255ece2be2

-- 
Martin K. Petersen	Oracle Linux Engineering

      parent reply	other threads:[~2021-03-30  3:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 12:54 [PATCH] scsi: pm8001: avoid -Wrestrict warning Arnd Bergmann
2021-03-24 10:56 ` Jinpu Wang
2021-03-30  3:54 ` Martin K. Petersen [this message]

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=161707636883.29267.13458445568299805895.b4-ty@oracle.com \
    --to=martin.petersen@oracle.com \
    --cc=Ruksar.devadi@microchip.com \
    --cc=Viswas.G@microchip.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=christophe.jaillet@wanadoo.fr \
    --cc=jejb@linux.ibm.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=joe@perches.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=vaibhavgupta40@gmail.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;
as well as URLs for NNTP newsgroup(s).