Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757332AbbGGNoZ (ORCPT ); Tue, 7 Jul 2015 09:44:25 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:54691 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754347AbbGGNoQ (ORCPT ); Tue, 7 Jul 2015 09:44:16 -0400 From: Mauro Carvalho Chehab To: Dan Williams Cc: Mauro Carvalho Chehab , Linux Kernel Mailing List , Mauro Carvalho Chehab , Christopher Li , linux-sparse@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Ross Zwisler , Dan Carpenter Subject: [PATCH] compiler.h: Fix sparse check errors Date: Tue, 7 Jul 2015 10:43:05 -0300 Message-Id: <607087dd3321926ddf4f67762be67656501bfa25.1436276428.git.mchehab@osg.samsung.com> X-Mailer: git-send-email 2.4.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1269 Lines: 36 The #define __pmem was put at the wrong place, inside a __rcu check. The way it is, if CONFIG_SPARSE_RCU_POINTER is not defined, it will produce thousands of errors like: ./arch/x86/include/asm/io.h:251:27: error: void declaration ./arch/x86/include/asm/io.h:251:27: error: Expected ; at end of declaration ./arch/x86/include/asm/io.h:251:27: error: got * making sparse pretty much useless, due to the excess of noise. So, move the define out of the sparse RCU pointer check. Signed-off-by: Mauro Carvalho Chehab diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 7f8ad9593da7..4f85b58b7285 100644 --- a/include/linux/compiler.h +++ b/include/linux/compiler.h @@ -21,8 +21,8 @@ # define __rcu __attribute__((noderef, address_space(4))) #else # define __rcu +#endif # define __pmem __attribute__((noderef, address_space(5))) -#endif extern void __chk_user_ptr(const volatile void __user *); extern void __chk_io_ptr(const volatile void __iomem *); #else -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/