From patchwork Tue Oct 9 15:23:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12068 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id CA7A423F6D for ; Tue, 9 Oct 2012 15:23:33 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 6C4DDA18CD7 for ; Tue, 9 Oct 2012 15:23:33 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so895782iag.11 for ; Tue, 09 Oct 2012 08:23:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=f1YO2F2dm7zc8GhAqIkgp1SqfpRQTUbCauz8G2fmyNk=; b=lQxHA3+lfYaNvDBlY0Yvl6yrnaOmfbLMTdBL2H3o6aeNgEof8A+Ya8cy4xjTcOU4HT 2V9buxUrMIwDbik34P2x9UQOYfEnkee8Dq8U7EMBT1yvZim89B35ZCvbLFGysCPU+3f/ h/+FqRD2ECkS9I20009reAY3C17nXxSwfL0y53bdQjX+e7tCWkFIAIVcApCZzea7wbjo wUNBodMa3pIOrQ2J6/2WlrgnXwRr1t3X8aohE5TzZ789IbI9dPNddQ2jxYAQ3Acv9z3G g7b6col0c9rfce121s7r0wa7u+762WnM7lDpUNW7eOH8jk7PQxG6A7acHH6+rcFej+Io 159g== Received: by 10.50.159.194 with SMTP id xe2mr2007347igb.62.1349796212887; Tue, 09 Oct 2012 08:23:32 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp73070igt; Tue, 9 Oct 2012 08:23:32 -0700 (PDT) Received: by 10.180.80.33 with SMTP id o1mr5472021wix.14.1349796211406; Tue, 09 Oct 2012 08:23:31 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.171]) by mx.google.com with ESMTPS id ce2si22182701wib.28.2012.10.09.08.23.31 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Oct 2012 08:23:31 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.171; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.171 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from klappe2.boeblingen.de.ibm.com (deibp9eh1--blueice3n2.emea.ibm.com [195.212.29.180]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0MF4A7-1TBUdI0Pmt-00FmwG; Tue, 09 Oct 2012 17:23:27 +0200 From: Arnd Bergmann To: Russell King Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 9/9] ARM: warnings in arch/arm/include/asm/uaccess.h Date: Tue, 9 Oct 2012 17:23:03 +0200 Message-Id: <1349796183-30648-10-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1349796183-30648-1-git-send-email-arnd@arndb.de> References: <1349796183-30648-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:14sXwOa1Qj/ckr9sokrMTqKYxEpNgN9Abb4SiyTh1nD npaV3bg9yhlHZWJLUhjM+dMb06MVgRkigWw0OkoYQSLlK933uQ +6U6DXWde3QarWnjsuZ1+k5P7i25LBQCJe0sfKRDT2yKTWsPF1 Mby/MwZxXERdK+tm9QZLuEX3cLBPQ9fxj75mad9YBC2hFX8M0U fE/u0VXF4I6C71vrxkH9lfvhz/ug+HeshONJtKhg7QsUh1d/yT 6/MOuJFmMPmXy4hey9Tr2U33sTSSSrOqo52sESL3lOUirgKofv +sjkDTtYuG4GLKmLvab9ztCqo7iC9SXqgH574DkjO92mo95NQM JjlJLnnyv4yGmTTnSDM8kVuVnuXzPSWAvouHB6aK1NL63QauUK cyKJCKUiaeFQXdNyf5W98dyY5SdmYtWjjM= X-Gm-Message-State: ALoCoQmnXopjx5DL5SLr+W7MmuqCIOZqhWU3uJsjzzlIRRpNynFcNUtA9qt9G4DFIYxhpZXqUDCP On NOMMU ARM, the __addr_ok() and __range_ok() macros do not evaluate their arguments, which may lead to harmless build warnings in some code where the variables are not used otherwise. Adding a cast to void gets rid of the warning and does not make any semantic changes. Without this patch, building at91x40_defconfig results in: fs/read_write.c: In function 'rw_copy_check_uvector': fs/read_write.c:684:9: warning: unused variable 'buf' [-Wunused-variable] Signed-off-by: Arnd Bergmann Acked-by: Greg Ungerer Cc: Russell King --- arch/arm/include/asm/uaccess.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h index 77bd79f..7e1f760 100644 --- a/arch/arm/include/asm/uaccess.h +++ b/arch/arm/include/asm/uaccess.h @@ -200,8 +200,8 @@ extern int __put_user_8(void *, unsigned long long); #define USER_DS KERNEL_DS #define segment_eq(a,b) (1) -#define __addr_ok(addr) (1) -#define __range_ok(addr,size) (0) +#define __addr_ok(addr) ((void)(addr),1) +#define __range_ok(addr,size) ((void)(addr),0) #define get_fs() (KERNEL_DS) static inline void set_fs(mm_segment_t fs)