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