Re: [v3] powerpc/uaccess: fix warning/error with access_ok()

2018-12-22 Thread Michael Ellerman
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; > >

[PATCH v3] powerpc/uaccess: fix warning/error with access_ok()

2018-12-09 Thread Christophe Leroy
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/te