lkml.org 
[lkml]   [2018]   [Dec]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [v3] powerpc/uaccess: fix warning/error with access_ok()
Date
On Mon, 2018-12-10 at 06:50:09 UTC, Christophe Leroy wrote:
> With the following piece of code, the following compilation warning
> is encountered:
>
> if (_IOC_DIR(ioc) != _IOC_NONE) {
> int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE : VERIFY_READ;
>
> if (!access_ok(verify, ioarg, _IOC_SIZE(ioc))) {
>
> drivers/platform/test/dev.c: In function 'my_ioctl':
> drivers/platform/test/dev.c:219:7: warning: unused variable 'verify' [-Wunused-variable]
> int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE : VERIFY_READ;
>
> This patch fixes it by referencing 'type' in the macro allthough
> doing nothing with it.
>
> Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/05a4ab823983d9136a460b7b5e0d49

cheers

\
 
 \ /
  Last update: 2018-12-22 18:02    [W:0.706 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site