From patchwork Thu Feb 15 21:07:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 10223621 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 84CD560467 for ; Thu, 15 Feb 2018 21:08:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7647428906 for ; Thu, 15 Feb 2018 21:08:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A2F228E2F; Thu, 15 Feb 2018 21:08:07 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable 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 0267B28D18 for ; Thu, 15 Feb 2018 21:08:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1167266AbeBOVIF (ORCPT ); Thu, 15 Feb 2018 16:08:05 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:52940 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1163660AbeBOVIE (ORCPT ); Thu, 15 Feb 2018 16:08:04 -0500 Received: by mail-wm0-f66.google.com with SMTP id t3so1181881wmc.2; Thu, 15 Feb 2018 13:08:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=t3u1v9gZ29yWA6Cg8oKv5J67ByU5gqAsAzL9Z6u5wu4=; b=e/w+xDEBxoRR7d1Ci4BqX+Ogf5nw4posHbY8wywb1c/H0r4gyXQACH0PPjzhv10p6v j+N1IjNOYhdrKKN25WFFoReSGdZxjFaNLQ2kVnCIgVxArrbcupDet0CTeXJkLuqLkB+8 Ew81tvh3GhD9fzyPmocA61uHTCUsmZXSIVNi/6q7JASv+oaKPhNLXOm4UUOvG49HBvEl eWT8M6Lf97fNQEI/xfSm/dA8Q5bTqdCDEfqjn2DM6orK1myln6MNNwNrPYCwwBefyZn6 QyjLJNryipfjMtFL3UdW2jxGk14knUMRJdNKjG4bzVWjju0QMM5FM9uJUoeDNgsr5GRj f8QA== 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; bh=t3u1v9gZ29yWA6Cg8oKv5J67ByU5gqAsAzL9Z6u5wu4=; b=qTp/XeFUjccPPvuAyG0iEu9bjQDpwjrf7IQIx4TWX9qhJy6ZLghIcgIa5HqI4C6ciC 2i4qR2CYA1oDx630Wr39ssJxvDyPSwt846bEvKlx7RZtfefvd7Lahbv3dFMSQ/kLF4Js z0RKPmvv3zW620cVQF5/TCLHeg7r0/MZJzKeDuncTNZjJD6Bpz6/OwTZ8LsZ9+ts89/p 9/EfvWeyHk0E+IGQkQHIYEQL46KZ/0fwt2sWZbeXvXmTonhJitzxTmz4yBJbaUrVzvbZ SfULWVJ01JLv1/qokSjyBbokmmKg/vaJuvCfPqdLujApM5if05vjCekxioZLbTXf0Q62 DGLw== X-Gm-Message-State: APf1xPCKE927yn2j8wxqu4CEciJaTPjjfj1g+Osl8uUbZcems3EV3jwj KL3wjqP7+BXDfnoC3j7LpUW2MqWz X-Google-Smtp-Source: AH8x2265/qQQ82qJe/VpAHBMDJPvn5ROlaQROtFw2FDHWt5Osuapc/iS5ctCr35+R1erpSpAiMflBw== X-Received: by 10.28.28.198 with SMTP id c189mr3385317wmc.104.1518728882692; Thu, 15 Feb 2018 13:08:02 -0800 (PST) Received: from localhost.localdomain ([2a02:a03f:40f4:c400:c004:15b5:9188:9888]) by smtp.gmail.com with ESMTPSA id x26sm11596562wmc.27.2018.02.15.13.08.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Feb 2018 13:08:01 -0800 (PST) From: Luc Van Oostenryck To: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , Linus Torvalds , Josh Triplett , Randy Dunlap , linux-sparse@vger.kernel.org, Luc Van Oostenryck Subject: [PATCH] disable sparse warnings about unknown attributes Date: Thu, 15 Feb 2018 22:07:50 +0100 Message-Id: <20180215210750.28813-1-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.16.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently, sparse issues warnings on code using an attribute it doesn't know about. One of the problem with this is that these warnings have no value for the developer, it's just noise for him. At best these warnings tell something about some deficiencies of sparse itself but not about a potential problem with code analyzed. A second problem with this is that sparse release are, alas, less frequent than new attributes are added to GCC. So, avoid the noise by asking sparse to not warn about attributes it doesn't know about. Reference: https://marc.info/?l=linux-sparse&m=151871600016790 Reference: https://marc.info/?l=linux-sparse&m=151871725417322 Signed-off-by: Luc Van Oostenryck Acked-by: Randy Dunlap Tested-by: Randy Dunlap --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 79ad2bfa2..8d9a7374c 100644 --- a/Makefile +++ b/Makefile @@ -388,7 +388,7 @@ PYTHON = python CHECK = sparse CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ - -Wbitwise -Wno-return-void $(CF) + -Wbitwise -Wno-return-void -Wno-unknown-attribute $(CF) NOSTDINC_FLAGS = CFLAGS_MODULE = AFLAGS_MODULE =