From patchwork Wed Mar 15 20:48:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 9626665 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 D05B7604A9 for ; Wed, 15 Mar 2017 20:48:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC21A283F9 for ; Wed, 15 Mar 2017 20:48:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B0C9128534; Wed, 15 Mar 2017 20:48:53 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham 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 2C99A283F9 for ; Wed, 15 Mar 2017 20:48:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751803AbdCOUsx (ORCPT ); Wed, 15 Mar 2017 16:48:53 -0400 Received: from mout.gmx.net ([212.227.15.19]:53838 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751487AbdCOUsw (ORCPT ); Wed, 15 Mar 2017 16:48:52 -0400 Received: from p100.box ([193.159.28.73]) by mail.gmx.com (mrgmx003 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MS5QA-1cdpjC3ZSk-00TFVs; Wed, 15 Mar 2017 21:48:44 +0100 Date: Wed, 15 Mar 2017 21:48:42 +0100 From: Helge Deller To: linux-parisc@vger.kernel.org, James Bottomley , John David Anglin Subject: [PATCH] parisc: Avoid compiler warnings with access_ok() Message-ID: <20170315204842.GA32075@p100.box> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:TAiy1tKnjhnPYdl6HQeyD2/JrWtcQWqDgXMrSCd7nrqUrV5zrsX Pt+om5SFiTxpmVs6KUr4eXcpAA51DOrzRx9TqjV1q8EFld+YLB5ggD/Pp5wFX1MQUc+64y5 HwqujwnvY0WS48zhhvyiixgrwxvUljqfHIfalTTjDQaXzfUFJVFLhDsFFMNfmAxdfbDkLm6 5q9YIcaB0EaV9pwDCOTyg== X-UI-Out-Filterresults: notjunk:1; V01:K0:l9o/tqUrSLU=:N8Dcqzez/b6OKMj2aSwd4s C94zc7VvMhDnsuvcJsZI6Iut7EJXPuuVd2ptYdHogq+LP8v0lkRq63hYKj7FBTpdU7cDdZr4f zUzfLfRiWRuBfE5XgzaVu43yW6jKsVAiyyVITqh90CSb1ghHpNJ/9HduubXT96QV8eSSUL3jx KJTaOkyat0Ra6SSTu3B5xnY+Mgdb4YQhoEoAzy8QOHLp5QPABnype3vBx6/qzQzYdUkD8wtLw u4fPFKvv1yVtkJCpId/r/spuMBVRXfahydgkevhf5PDMYHr1lilmKTVnsYg+qeOdVbGGdInb2 I7JpFw5xKqA34YR+q9sdM/V+TshHSOPQ48KeW6/RPHhl1hmlHMqLOMj+iHtDIpFwHYBu6uGxI x1KWSxDRXL4YOZ5S4fDYlbvsCuf/nhAI3I0sNu088aT0av1XK/P7r41nCGVsEEURL7bOS2scP BnpGA/3FqmP71LDduLdy/yjNvdDXuRIHv6ldH7ZDdcEmlwDtORmqi4ekWLBj+mzyOlTTTy42f dOS4Pips+rEAtMrMOTL8OJSKcXugHM1cbiTTzQKXLjGfgr84Pd64VQs20KEc6H7l0nO+hfp9X LR9pk5FQDWXOpBOY+4Kdo8fVvTcOrPL83hJPBeXy0tsIMP1sEaj3uMg1ctWVD5rjZLIU0b7k3 bChzgWZzN2X/S0/r9h8pkmlVIpZ6TkeFdboK0jgE6YQkiaMXND+MJEz3vSbw5aB02vVVzAcIG KRucijDTBszZuEHg596T/vMadAVfmTzVhvVb7FMb9zvmeRdeqZPbYIv8XfY= Sender: linux-parisc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 09b871ffd4d8 (parisc: Define access_ok() as macro) missed to mark uaddr as used, which then gives compiler warnings about unused variables. Fix it by comparing uaddr to uaddr which then gets optimized away by the compiler. Signed-off-by: Helge Deller Fixes: 09b871ffd4d8 ("parisc: Define access_ok() as macro") --- To unsubscribe from this list: send the line "unsubscribe linux-parisc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/parisc/include/asm/uaccess.h b/arch/parisc/include/asm/uaccess.h index fb4382c..edfbf9d 100644 --- a/arch/parisc/include/asm/uaccess.h +++ b/arch/parisc/include/asm/uaccess.h @@ -32,7 +32,8 @@ * that put_user is the same as __put_user, etc. */ -#define access_ok(type, uaddr, size) (1) +#define access_ok(type, uaddr, size) \ + ( (uaddr) == (uaddr) ) #define put_user __put_user #define get_user __get_user