From patchwork Fri Apr 28 22:15:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 9705555 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE8E760225 for ; Fri, 28 Apr 2017 22:16:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A02552869B for ; Fri, 28 Apr 2017 22:16:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 94E10286A1; Fri, 28 Apr 2017 22:16:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A8792869B for ; Fri, 28 Apr 2017 22:16:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1035927AbdD1WQW (ORCPT ); Fri, 28 Apr 2017 18:16:22 -0400 Received: from mail-pf0-f176.google.com ([209.85.192.176]:36358 "EHLO mail-pf0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1035899AbdD1WP4 (ORCPT ); Fri, 28 Apr 2017 18:15:56 -0400 Received: by mail-pf0-f176.google.com with SMTP id q66so10047845pfi.3 for ; Fri, 28 Apr 2017 15:15:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=iiGm/JqaB/gT7y04/aUxvqTMs1bjAnew0GNnbTFj5zw=; b=dFvo/GNIuEUBCy/bG7IO8cp2z1B41/oM5PkEJbIyLIwdH3VBrm3y/xRMzSx2RHCUDc eNDPlzhdVOHeac40C3CyqCVBzaupmG6bjjsF0t7VaXukENWfJCCDrLn8bCvz3mjEkOSw s0zKNoYM2BrdA7IGel+4Oh/zU7qU2XiJtMSgwyXSNDaiT2Pt1gaR7BO1+G0wAVgC4OYi 1yWGl3TtWg1fPs6XAYowSWiM1XFhvJ2n9BnVfX1DgBPfVZ69fryoeFRge7HbGkw9/s7D dzpR4QUA0LyBtAqgtRxhYqdyM9yOf+M9PYl7PGuF/PXP1w9SnxYFimDnLoOjOWXHaLxf yUjg== X-Gm-Message-State: AN3rC/5ANivIggTEaaU8jHPfgVjRzRjHZX8xxXgRDEMYXMiRtUyvIVd2 n/xMqXAunTG+Nesy X-Received: by 10.84.232.205 with SMTP id x13mr18409166plm.153.1493417754271; Fri, 28 Apr 2017 15:15:54 -0700 (PDT) Received: from mka.mtv.corp.google.com ([172.22.64.162]) by smtp.gmail.com with ESMTPSA id g8sm555078pfb.56.2017.04.28.15.15.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 28 Apr 2017 15:15:53 -0700 (PDT) From: Matthias Kaehlcke To: Alexander Viro , Mark Charlebois , Behan Webster , Arnd Bergmann Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Matthias Kaehlcke Subject: [PATCH RESEND] fs: compat: Remove warning from COMPATIBLE_IOCTL Date: Fri, 28 Apr 2017 15:15:12 -0700 Message-Id: <20170428221512.47856-1-mka@chromium.org> X-Mailer: git-send-email 2.13.0.rc0.306.g87b477812d-goog Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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