[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <161707636883.29267.13458445568299805895.b4-ty@oracle.com>
Date: Mon, 29 Mar 2021 23:54:31 -0400
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: "James E.J. Bottomley" <jejb@...ux.ibm.com>,
Arnd Bergmann <arnd@...nel.org>,
Jack Wang <jinpu.wang@...ud.ionos.com>
Cc: "Martin K . Petersen" <martin.petersen@...cle.com>,
Joe Perches <joe@...ches.com>,
Viswas G <Viswas.G@...rochip.com>,
Lee Jones <lee.jones@...aro.org>,
Vaibhav Gupta <vaibhavgupta40@...il.com>,
linux-kernel@...r.kernel.org, Arnd Bergmann <arnd@...db.de>,
linux-scsi@...r.kernel.org,
Ruksar Devadi <Ruksar.devadi@...rochip.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH] scsi: pm8001: avoid -Wrestrict warning
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
Powered by blists - more mailing lists