From patchwork Tue Apr 4 18:07:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 9662347 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 E2187602B9 for ; Tue, 4 Apr 2017 18:08:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D7418284A3 for ; Tue, 4 Apr 2017 18:08:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC59028526; Tue, 4 Apr 2017 18:08:00 +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 856C3284A3 for ; Tue, 4 Apr 2017 18:08:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932580AbdDDSHt (ORCPT ); Tue, 4 Apr 2017 14:07:49 -0400 Received: from mail-pg0-f53.google.com ([74.125.83.53]:33449 "EHLO mail-pg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932499AbdDDSHr (ORCPT ); Tue, 4 Apr 2017 14:07:47 -0400 Received: by mail-pg0-f53.google.com with SMTP id x125so159695251pgb.0 for ; Tue, 04 Apr 2017 11:07:47 -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=KdKQAp/L59bfUThGsGueQMcRPqYmUsF2Cmq3cL+3qec=; b=tfZYkxfQILaZusbDqT3mRtp4HdNcAaV67JmyGAfv89CUAjGb9WKvyED3iW3rc8rZQE fZ6YOEoG1lWvuM6qzzonfcKFWnDsqOkDL4+h2VaQZQ/hIQasKTxXhpZZ46VWyK+KrYiS k8M2nGytgTx+F6o2iffMSyvXlkqmoJBLyBmkua9fUkAbrTzmfTHNh1t+JElHVDGVYJgQ reIVWcZTahoFOqey+d6Ba4sy9+swsTGhdmVOCjlMSOUn/HvBbqX2itmeeOZY/hjQB2NT Dogs6y9DBNi5fmVYZ0xmlaS8e4nOrjQZHbuE7Upp/n85ka98RHkTcGhzyqnG+I0gSB1i 1/cA== X-Gm-Message-State: AFeK/H2FD0MbP+eE3TzDcjqslw2QaS0lEMPCOpUk6r7J0BIbonY5zmXCHpJ9JWaWhXR+BpqB X-Received: by 10.98.27.204 with SMTP id b195mr24693190pfb.154.1491329266714; Tue, 04 Apr 2017 11:07:46 -0700 (PDT) Received: from mka.mtv.corp.google.com ([172.22.64.162]) by smtp.gmail.com with ESMTPSA id w28sm32999863pfl.115.2017.04.04.11.07.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Apr 2017 11:07:45 -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, 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-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 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