From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932674AbdDDSHt (ORCPT ); Tue, 4 Apr 2017 14:07:49 -0400 Received: from mail-pg0-f51.google.com ([74.125.83.51]:33449 "EHLO mail-pg0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932351AbdDDSHr (ORCPT ); Tue, 4 Apr 2017 14:07:47 -0400 From: Matthias Kaehlcke To: Alexander Viro , Mark Charlebois , Behan Webster , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Grant Grundler , Michael Davidson , Greg Hackmann , Peter Foley , Matthias Kaehlcke Subject: [PATCH] fs: compat: Remove warning from COMPATIBLE_IOCTL Date: Tue, 4 Apr 2017 11:07:20 -0700 Message-Id: <20170404180720.182336-1-mka@chromium.org> X-Mailer: git-send-email 2.12.2.715.g7642488e1d-goog Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/ 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 -- 2.12.2.715.g7642488e1d-goog