Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2581320imu; Sun, 23 Dec 2018 03:07:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN7MzMFb1wYYuxZ8wX4PtF2VcE/JTsjzesUP286/nstdrXyqj5sW1OXHdGe21z+f1MczWXI9 X-Received: by 2002:a5d:814d:: with SMTP id f13mr6917777ioo.90.1545563230795; Sun, 23 Dec 2018 03:07:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545563230; cv=none; d=google.com; s=arc-20160816; b=ScvaRXVQl8Tki+wjw+tZxOesQV2rU+/fpNbrZHLsKvWcD9v3K+f/a3hP6WfV5OFUjy hYSFa70YblmJMZhdgHtgEaA6JFetizRSlb9VrxT7hH6Mxse7/pJHhQl/ptq1R0wD4PdL OKu03bedRZHmogNQSR2j2cxfYrmV2uUaUjib/TABo1y20zdyb3XOQtyq3PGjMpPmC7at nJGlZInIU8kZ/0234qASXO09B+HdU0TfrTuX3Xg+SCj31k5TukUY7No5FI4++NnOI6KO nee4r5On8eQf9ouV0Sdh4i42XnM4iIXIwKomZ1MCF1Q2+IhflVbNcZq0Ba2lKHjUtYXI 4pBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:subject:cc:from:to :in-reply-to; bh=z0TtPnkfmmiB1O+UWIV84zl5Q69fMfKgMpvmDOFckf0=; b=fBPbLyACxwXsqMQUCCP/nvaKqDCAos3DOmkZqZ81zmbYHX/sgU7eB/Voc2Z3lhYscJ VrtgwbQssezpv+Kp80X70IcaJu3nMi0daQnuYbRpov9QgNZlero+WXhy/yMyipW6NWdr hftKblLVpkeNXz+6hIhtXCvpDQJJjcOndTytVveqilCcvBzmHDro2Phtn5L2M3+vqtUZ ch1U/VeSKGASYC5MP6R420ZebFQhLP2PbbboX3nDQ2F+Bw1hv2e9wSpWSgZSElDCNp5M RufMih2ilE2aSUSjsi4ToJQUPKhYq1x3j3iGIt5itzpEYY3wpA+37Vx86taUqyRewsOX M7MQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si2098788ita.133.2018.12.23.03.06.57; Sun, 23 Dec 2018 03:07:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392416AbeLVRBq (ORCPT + 99 others); Sat, 22 Dec 2018 12:01:46 -0500 Received: from ozlabs.org ([203.11.71.1]:44539 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727790AbeLVRBE (ORCPT ); Sat, 22 Dec 2018 12:01:04 -0500 Received: by ozlabs.org (Postfix, from userid 1034) id 43MLSY55RGz9sNj; Sat, 22 Dec 2018 20:54:37 +1100 (AEDT) X-powerpc-patch-notification: thanks X-powerpc-patch-commit: 05a4ab823983d9136a460b7b5e0d49ee709a6f86 X-Patchwork-Hint: ignore In-Reply-To: To: Christophe Leroy , Benjamin Herrenschmidt , Paul Mackerras From: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [v3] powerpc/uaccess: fix warning/error with access_ok() Message-Id: <43MLSY55RGz9sNj@ozlabs.org> Date: Sat, 22 Dec 2018 20:54:37 +1100 (AEDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; > > if (!access_ok(verify, ioarg, _IOC_SIZE(ioc))) { > > drivers/platform/test/dev.c: In function 'my_ioctl': > drivers/platform/test/dev.c:219:7: warning: unused variable 'verify' [-Wunused-variable] > int verify = _IOC_DIR(ioc) & _IOC_READ ? VERIFY_WRITE : VERIFY_READ; > > This patch fixes it by referencing 'type' in the macro allthough > doing nothing with it. > > Signed-off-by: Christophe Leroy Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/05a4ab823983d9136a460b7b5e0d49 cheers