Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp679473imm; Fri, 31 Aug 2018 10:15:55 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYk3y0BaxmXyXGkGyxPhqtjn8BFQHCogS/keX+b203TLVuX2LAlprDzpJsrLUkEhur+cKl5 X-Received: by 2002:a17:902:b7c3:: with SMTP id v3-v6mr16498745plz.238.1535735755916; Fri, 31 Aug 2018 10:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535735755; cv=none; d=google.com; s=arc-20160816; b=Nq5miTL2VuO2zxJGt/UFXRCZCEe3ECaHeK9SCTmFiiT1xoVHcrX1x/gAkek2rpB58R XTfJomCHT3zo8RI12E2A32Kgriax4cSqDntwVgzgpyYBY75P8fyL2tdZQXQhSnA9t4tQ TVqZaFFr/yS4x4HNZ5zcc8Tg08wPNcRRrfc7AkWdpDctEhQ5sv8OR4BbYUvQfdSf3U/X FEL4jGNqkCre9AuWLgTKOM3mXk9qo7/sx3NLQdqgsJN4zOsTGMgk246unslz+VtSYRjR pwXdxuRQOM8vBq9ALQp4gcnTwhViuUb/QqGfRo7/57HbPcDM7BSWRFop0HuCXO/705Bg 4UDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=fVWnnBzr0I1OKw6LtVCSpWDTlwLCxb+fZtKMlf89mRY=; b=BlOz3I0KNPG/LJNqztTJxKruPx9uHQw7lR1xX1tJatE+1ea9XMBDCYxTlZPFwVMRMr wKHmKaz3mpKItiWxD53Thj/mj1iGVqqwINome1gSuE2SMHViPhZgpJAsu/DmesEfKz6+ BqBP5KIiUC4cF+vlOZHJcFuGhXhNc05OHWYKMGRqu4xMKVGM3or3yXa7G/TDp4pp84O7 wX9ey4M38UPkH8KNQcMXZkko3RlocVtkyYyQ/HUV0NQaTfvvGkC7O1mks0I/LtriNUwA GpECK+RfXEANuHgR4PIF3Kk0ljWtOW9Pb8OZ9q/2ZZwZqchWCzbkMAFzWkznRm1D2KAh Pi0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ONd6gx8y; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h9-v6si11241076plk.461.2018.08.31.10.15.41; Fri, 31 Aug 2018 10:15:55 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ONd6gx8y; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728334AbeHaVN5 (ORCPT + 99 others); Fri, 31 Aug 2018 17:13:57 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45981 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727864AbeHaVN5 (ORCPT ); Fri, 31 Aug 2018 17:13:57 -0400 Received: by mail-wr1-f66.google.com with SMTP id 20-v6so11832730wrb.12 for ; Fri, 31 Aug 2018 10:05:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=fVWnnBzr0I1OKw6LtVCSpWDTlwLCxb+fZtKMlf89mRY=; b=ONd6gx8yQSiI4I5TSERfj26rU2n+lJb7UhpBmIBqqCrgH8/uB9bX8N1JCLYRMAvyX8 mH5trdDAAOFwhw/TWKfX/GC5Rf6+eZRuybRsNwId8fHCZgory6rdcVOkBN5s2uSAIwI8 RPCVKDbBX/tpJucO5NqIixX+zXQaasLDtDL2xfBCD2ABNa70A/0/A5ovm50b9aWwoM+j 2o+JKlTYc0vpEyF5OqqcxPLcoOUxq/o1IvQUMnjy4eHCe04w5mv+6ArtktLYH+xkmmi1 gY63ekESCArzvFaqtAyyLgW3s/atlPlfBGi3Z7w2Ouzj3LGej2CQJtqUyLTU84bpuh5G Fzog== 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:in-reply-to :references; bh=fVWnnBzr0I1OKw6LtVCSpWDTlwLCxb+fZtKMlf89mRY=; b=CEwUwiLDGCLuv7WdY3jjSY+AwKNzeu08CnPtQOA3eRnbNk0LeRoqHX7udbpp8BfBnZ swRy0neQ5/XXcJ+0raeMtD+g9/2OSM/zvG8shvzwHBq4VFisdLb5Wi4GP63pYboE2G10 N4RchzaVkPmGcAYzTF0EstB3iGmt/VCAXV0ZmLEj7C1SKY4cbvM+2lvl+oZ2yP6jO3Lf sfTJ/kz9yj1z6yuMyFKpWnSbAssQeWFkwI5mrrg6JagkBX5DfDSTinchqLm8GcABdq/o fAUBUUugz0pmKufucXQIRxbySjBB0sQYj6DykhJthP/XSw4PwXKVgbYUA1y5gxvuNcvu bTjQ== X-Gm-Message-State: APzg51Ay/NOeYWsm6BV/obM+Ms9Tfb7p4Z2R3u3FKWLsRN+MdCmNd8m4 KvBkAfrZq3RvNe7frEo5XlQ= X-Received: by 2002:a5d:6908:: with SMTP id t8-v6mr12317879wru.170.1535735131307; Fri, 31 Aug 2018 10:05:31 -0700 (PDT) Received: from localhost.localdomain (62.83.35.8.dyn.user.ono.com. [62.83.35.8]) by smtp.gmail.com with ESMTPSA id c19-v6sm11280332wre.86.2018.08.31.10.05.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 10:05:30 -0700 (PDT) From: Miguel Ojeda To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Miguel Ojeda , Eli Friedman , Christopher Li , Kees Cook , Ingo Molnar , Geert Uytterhoeven , Arnd Bergmann , Greg Kroah-Hartman , Masahiro Yamada , Joe Perches , Dominique Martinet , Nick Desaulniers Subject: [PATCH 6/7] Compiler Attributes: remove unneeded sparse (__CHECKER__) tests Date: Fri, 31 Aug 2018 19:05:13 +0200 Message-Id: <20180831170514.24665-6-miguel.ojeda.sandonis@gmail.com> In-Reply-To: <20180831170514.24665-1-miguel.ojeda.sandonis@gmail.com> References: <20180831170514.24665-1-miguel.ojeda.sandonis@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sparse knows about a few more attributes now, so we can remove the __CHECKER__ conditions from them (which, in turn, allow us to move some of them later on to compiler_attributes.h). * assume_aligned: since sparse's commit ffc860b ("sparse: ignore __assume_aligned__ attribute"), included in 0.5.1 * error: since sparse's commit 0a04210 ("sparse: Add 'error' to ignored attributes"), included in 0.5.0 * hotpatch: since sparse's commit 6043210 ("sparse/parse.c: ignore hotpatch attribute"), included in 0.5.1 * warning: since sparse's commit 977365d ("Avoid "attribute 'warning': unknown attribute" warning"), included in 0.4.2 Cc: Eli Friedman Cc: Christopher Li Cc: Kees Cook Cc: Ingo Molnar Cc: Geert Uytterhoeven Cc: Arnd Bergmann Cc: Greg Kroah-Hartman Cc: Masahiro Yamada Cc: Joe Perches Cc: Dominique Martinet Cc: Nick Desaulniers Cc: Linus Torvalds Signed-off-by: Miguel Ojeda --- include/linux/compiler-gcc.h | 6 ++---- include/linux/compiler_types.h | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index fdf2fbe6d544..32e6ce06163f 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -84,14 +84,12 @@ #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) -#ifndef __CHECKER__ #define __compiletime_warning(message) __attribute__((warning(message))) #define __compiletime_error(message) __attribute__((error(message))) -#ifdef LATENT_ENTROPY_PLUGIN +#if defined(LATENT_ENTROPY_PLUGIN) && !defined(__CHECKER__) #define __latent_entropy __attribute__((latent_entropy)) #endif -#endif /* __CHECKER__ */ /* * calling noreturn functions, __builtin_unreachable() and __builtin_trap() @@ -139,7 +137,7 @@ /* gcc version specific checks */ -#if GCC_VERSION >= 40900 && !defined(__CHECKER__) +#if GCC_VERSION >= 40900 /* * __assume_aligned(n, k): Tell the optimizer that the returned * pointer can be assumed to be k modulo n. The second argument is diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index 3662b19599fc..5dddc7e0c607 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -216,7 +216,7 @@ struct ftrace_likely_data { #define __must_check #endif -#if defined(CC_USING_HOTPATCH) && !defined(__CHECKER__) +#if defined(CC_USING_HOTPATCH) #define notrace __attribute__((hotpatch(0, 0))) #else #define notrace __attribute__((no_instrument_function)) -- 2.17.1