From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939872AbdDSVhc (ORCPT ); Wed, 19 Apr 2017 17:37:32 -0400 Received: from mail-io0-f173.google.com ([209.85.223.173]:32828 "EHLO mail-io0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S939856AbdDSVha (ORCPT ); Wed, 19 Apr 2017 17:37:30 -0400 Date: Wed, 19 Apr 2017 14:37:28 -0700 From: Matthias Kaehlcke To: Arnd Bergmann Cc: Alexander Viro , Mark Charlebois , Behan Webster , Linux Kernel Mailing List , Linux FS-devel Mailing List , Grant Grundler , Michael Davidson , Greg Hackmann , Peter Foley Subject: Re: [PATCH] fs: compat: Remove warning from COMPATIBLE_IOCTL Message-ID: <20170419213728.GH128305@google.com> References: <20170404180720.182336-1-mka@chromium.org> <20170419181412.GF128305@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, El Wed, Apr 19, 2017 at 10:48:47PM +0200 Arnd Bergmann ha dit: > On Wed, Apr 19, 2017 at 8:14 PM, Matthias Kaehlcke wrote: > > El Tue, Apr 04, 2017 at 11:07:20AM -0700 Matthias Kaehlcke ha dit: > > > >> From: Mark Charlebois > >> > >> cmd in COMPATIBLE_IOCTL is always a u32, so cast it so there isn't a > >> warning about an overflow in XFORM. > >> > >> From: Mark Charlebois > >> Signed-off-by: Mark Charlebois > >> Signed-off-by: Behan Webster > >> Signed-off-by: Matthias Kaehlcke > >> Acked-by: Arnd Bergmann > >> --- > >> Resending https://patchwork.kernel.org/patch/4961631/ > > The patch looks correct to me, > > Acked-by: Arnd Bergmann Thanks for the review! > >> fs/compat_ioctl.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/fs/compat_ioctl.c b/fs/compat_ioctl.c > >> index 11d087b2b28e..6116d5275a3e 100644 > >> --- a/fs/compat_ioctl.c > >> +++ b/fs/compat_ioctl.c > >> @@ -833,7 +833,7 @@ static int compat_ioctl_preallocate(struct file *file, > >> */ > >> #define XFORM(i) (((i) ^ ((i) << 27) ^ ((i) << 17)) & 0xffffffff) > >> > >> -#define COMPATIBLE_IOCTL(cmd) XFORM(cmd), > >> +#define COMPATIBLE_IOCTL(cmd) XFORM((u32)cmd), > >> /* ioctl should not be warned about even if it's not implemented. > >> Valid reasons to use this: > >> - It is implemented with ->compat_ioctl on some device, but programs > > > > Ping, any feedback on this change? > > One minor comment on the patch: when you address a warning in a patch, > it helps to put the compiler warning output into the changelog. Thanks, I added it initially and then wondered if it is too much noise. Will take it into account in the future. > Aside from that, I see that you are upstreaming a number of clang > related patches. I actually have a longer series of clang patches that > I took from llvmlinux and hacked up to the point where I could > build ARM randconfig kernels without any warnings or errors. > If you are interested, I can separate the clang patches from my normal > randconfig build tree and upload the git tree for you to look at and > cherry-pick further patches. Sure, that would be interesting, though I won't promise to take up everything :) Cheers Matthias