Received: by 2002:a17:90a:1609:0:0:0:0 with SMTP id n9csp833105pja; Wed, 1 Apr 2020 09:31:44 -0700 (PDT) X-Google-Smtp-Source: ADFU+vu7ZiqPAuo2g82vfKnEDWEL1j9agqKK2N8xO7lLlsMo9lbsdM0KDb1zrdHnHOo/DhalPFAc X-Received: by 2002:a9d:a6b:: with SMTP id 98mr16676940otg.21.1585758704748; Wed, 01 Apr 2020 09:31:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585758704; cv=none; d=google.com; s=arc-20160816; b=K1Nl68NC5YJYgvi+CRLJVVvTF551J8tM4cpBbzoU47cO3FD+m8CD1pEzvxb/FalZt6 4+TswMc1vhVsYOXuii1NG/Tl/+e3pYEt6goBZFOR2zwbb071NeowQFO3E1m4M0VG4Tpe 7y9cAe/tOUfvZpcQ0za8ZK0yAy7+W2LHTeF7OFPO+J6U1mjywDM988dqHCFoDqqOg+x0 Cs9N1/3ebzWFgo4xt66ndOUUcNpwiPrCx90rK4iLemarf6uJRbwWK+agGfJ+Glp9jxCu kCc/9+SIQqD99cIE5zJ540QBEI1U97OcuiQQBxqwAjym4anDgUpN2coUYd9Xn0fwyoKO Szgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=elWeD2/jnMFvZcQKaMx0Y2+bQMfUiDSiFwjlDuVvRcs=; b=KL7GSdP6YpS/k0LdX9Jyigi4uOwK4HRam43jqu/nrGWR550nc8ITdI8meVMu7tgbJj 4tSu8sSwP1Zp5YHgAeRAIIVbLBduQYm3gHJqXbwTj9HYF/nqlst+mCOdGl2uaDikJBTC tlUptBvvj7iLyE+UUZwQQxtx3cvVJ5ERYdiHN0KADjZdmNYHhW3DSmWT53xJJkCvq5KZ KtTqREy7sI2OudV0PfIFdqR54eG6voTfAaSXTnCw9gbke/5Lp1pUwULe+IwS3bMwCH9T lbKOxrjW5iRssz48dJ/gRHunVMsry+PTW0ui8n5wNhPkQmr8eCMxFHPQPNUA9B+22ez/ 9yYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e9LiBT9n; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d16si1079064oti.42.2020.04.01.09.31.24; Wed, 01 Apr 2020 09:31:44 -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=@kernel.org header.s=default header.b=e9LiBT9n; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733186AbgDAQaa (ORCPT + 99 others); Wed, 1 Apr 2020 12:30:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:56358 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733156AbgDAQa2 (ORCPT ); Wed, 1 Apr 2020 12:30:28 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6F8F72137B; Wed, 1 Apr 2020 16:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585758627; bh=NAZtYmCrKrUZmtKsMs7hekbghArZfgx6xTus4UqzlRI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e9LiBT9nSdkfUQAbf5ObQHcYqYud9xbL2nr6DJYrCPjeh3yERqbXUJeTR/yWhfTt9 V5J9bs02j1wOvl1xHTfXoKnvCWBMq3ukFGyvwwVXF29SKyQSXwnRKMx1SSnidlXamM ASCYo6v8PGCC4DT0Lwnro+PJ5WVf9g+0WUyYUWyI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Masahiro Yamada , Sasha Levin Subject: [PATCH 4.4 28/91] kbuild: Disable -Wpointer-to-enum-cast Date: Wed, 1 Apr 2020 18:17:24 +0200 Message-Id: <20200401161523.154654139@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200401161512.917494101@linuxfoundation.org> References: <20200401161512.917494101@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor commit 82f2bc2fcc0160d6f82dd1ac64518ae0a4dd183f upstream. Clang's -Wpointer-to-int-cast deviates from GCC in that it warns when casting to enums. The kernel does this in certain places, such as device tree matches to set the version of the device being used, which allows the kernel to avoid using a gigantic union. https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L428 https://elixir.bootlin.com/linux/v5.5.8/source/drivers/ata/ahci_brcm.c#L402 https://elixir.bootlin.com/linux/v5.5.8/source/include/linux/mod_devicetable.h#L264 To avoid a ton of false positive warnings, disable this particular part of the warning, which has been split off into a separate diagnostic so that the entire warning does not need to be turned off for clang. It will be visible under W=1 in case people want to go about fixing these easily and enabling the warning treewide. Cc: stable@vger.kernel.org Link: https://github.com/ClangBuiltLinux/linux/issues/887 Link: https://github.com/llvm/llvm-project/commit/2a41b31fcdfcb67ab7038fc2ffb606fd50b83a84 Signed-off-by: Nathan Chancellor Signed-off-by: Masahiro Yamada Signed-off-by: Sasha Levin --- scripts/Makefile.extrawarn | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn index 93e23a73b232f..11096b2fa5cb2 100644 --- a/scripts/Makefile.extrawarn +++ b/scripts/Makefile.extrawarn @@ -67,5 +67,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, format) KBUILD_CFLAGS += $(call cc-disable-warning, sign-compare) KBUILD_CFLAGS += $(call cc-disable-warning, format-zero-length) KBUILD_CFLAGS += $(call cc-disable-warning, uninitialized) +KBUILD_CFLAGS += $(call cc-disable-warning, pointer-to-enum-cast) endif endif -- 2.20.1