From patchwork Fri Apr 21 21:39:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Kaehlcke X-Patchwork-Id: 9693823 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 DA37C601D4 for ; Fri, 21 Apr 2017 21:41:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA32128662 for ; Fri, 21 Apr 2017 21:41:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEBEB2867E; Fri, 21 Apr 2017 21:41:27 +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,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 960F828662 for ; Fri, 21 Apr 2017 21:41:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423769AbdDUVlC (ORCPT ); Fri, 21 Apr 2017 17:41:02 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:37618 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423722AbdDUVk7 (ORCPT ); Fri, 21 Apr 2017 17:40:59 -0400 Received: by mail-it0-f47.google.com with SMTP id a140so1325671ita.0 for ; Fri, 21 Apr 2017 14:40:59 -0700 (PDT) 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=HA2OizwXECk31hem61cg0/4Q7xoo/8Hfa84AmE+u3uU=; b=edpZ5xbTbqcGxpWSWNkSpkhN5rl/klCqgybmmpJn0lPu6YhOYUlCF3COXbbPdNKmEk UsuVw3jgCo2HfYxTAT7pUWL7baQFmEADU7N0Km8ciPqBvMEBqHQ1hpEnZettdSScoTbR fq0OJ3IlLRhoy97I7p6MOdecXPklQSInjDqLSiy0cAhOJ4XguElfZr74kYTRU8xOFFZk zMp+pK1+6UdlE+HYQt2lrSZB3H/T58H/e0rwggFhsX2qFJcT2qoXVZ8L/R0JDOCVWPhQ pW5/TjwUHW0jwzyg4HIhKhvi/iFF0Yvuy51sg1A+UJL+l0EG+gjTbU7BTvFTutvcLv1r fd9A== X-Gm-Message-State: AN3rC/7Mf/ERFJ9VJd1gzj85+8D6PmZxlZdaJ/4CZLi6yTFSWEPvSuA0 xGKOOeH/OVZcZZES X-Received: by 10.84.236.70 with SMTP id h6mr11430723pln.145.1492810858715; Fri, 21 Apr 2017 14:40:58 -0700 (PDT) Received: from mka.mtv.corp.google.com ([172.22.64.162]) by smtp.gmail.com with ESMTPSA id u85sm6114493pfg.64.2017.04.21.14.40.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 21 Apr 2017 14:40:57 -0700 (PDT) From: Matthias Kaehlcke To: Masahiro Yamada , Michal Marek Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Grant Grundler , Greg Hackmann , Michael Davidson , Matthias Kaehlcke Subject: [PATCH 2/2] kbuild: clang: Disable the 'duplicate-decl-specifier' warning Date: Fri, 21 Apr 2017 14:39:31 -0700 Message-Id: <20170421213931.155210-3-mka@chromium.org> X-Mailer: git-send-email 2.12.2.816.g2cccc81164-goog In-Reply-To: <20170421213931.155210-1-mka@chromium.org> References: <20170421213931.155210-1-mka@chromium.org> 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 clang generates plenty of these warnings in different parts of the code. They are mostly caused by container_of() and other macros which declare a "const *" variable for their internal use which triggers a "duplicate 'const' specifier" warning if the is already const qualified. Wording-mostly-from: Michael Davidson Signed-off-by: Matthias Kaehlcke --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index df5abf346354..6cd6d428db43 100644 --- a/Makefile +++ b/Makefile @@ -704,6 +704,7 @@ KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable) KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) KBUILD_CFLAGS += $(call cc-disable-warning, gnu) KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) +KBUILD_CFLAGS += $(call cc-disable-warning, duplicate-decl-specifier) # Quiet clang warning: comparison of unsigned expression < 0 is always false KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) # CLANG uses a _MergedGlobals as optimization, but this breaks modpost, as the