Re: [PATCH] amdgpu: fix gcc -Wrestrict warning

2021-03-24 Thread Joe Perches
On Tue, 2021-03-23 at 14:04 +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc warns about an sprintf() that uses the same buffer as source > and destination, which is undefined behavior in C99: > > drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c: In function >

Re: [PATCH] amdgpu: fix gcc -Wrestrict warning

2021-03-24 Thread Rasmus Villemoes
On 24/03/2021 14.33, Arnd Bergmann wrote: > On Tue, Mar 23, 2021 at 4:57 PM Rasmus Villemoes > wrote: >> On 23/03/2021 14.04, Arnd Bergmann wrote: >>> if (securedisplay_cmd->status == >>> TA_SECUREDISPLAY_STATUS__SUCCESS) { >>> + int pos = 0; >>>

Re: [PATCH] amdgpu: fix gcc -Wrestrict warning

2021-03-24 Thread Arnd Bergmann
On Tue, Mar 23, 2021 at 4:57 PM Rasmus Villemoes wrote: > On 23/03/2021 14.04, Arnd Bergmann wrote: > > if (securedisplay_cmd->status == > > TA_SECUREDISPLAY_STATUS__SUCCESS) { > > + int pos = 0; > >

Re: [PATCH] amdgpu: fix gcc -Wrestrict warning

2021-03-23 Thread Rasmus Villemoes
On 23/03/2021 14.04, Arnd Bergmann wrote: > From: Arnd Bergmann > > gcc warns about an sprintf() that uses the same buffer as source > and destination, which is undefined behavior in C99: > > drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c: In function > 'amdgpu_securedisplay_debugfs_write':

Re: [PATCH] amdgpu: fix gcc -Wrestrict warning

2021-03-23 Thread Alex Deucher
Applied. Thanks! Alex On Tue, Mar 23, 2021 at 9:04 AM Arnd Bergmann wrote: > > From: Arnd Bergmann > > gcc warns about an sprintf() that uses the same buffer as source > and destination, which is undefined behavior in C99: > > drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c: In function >

[PATCH] amdgpu: fix gcc -Wrestrict warning

2021-03-23 Thread Arnd Bergmann
From: Arnd Bergmann gcc warns about an sprintf() that uses the same buffer as source and destination, which is undefined behavior in C99: drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c: In function 'amdgpu_securedisplay_debugfs_write':