Received: by 10.223.148.5 with SMTP id 5csp6810604wrq; Wed, 17 Jan 2018 19:35:28 -0800 (PST) X-Google-Smtp-Source: ACJfBou9FPYrfa6kdGT2sROY8DUG5tvdoOcgpMod7BOlNBbLUmtWg2zsVQczFZrSGTrLtR+PvXiK X-Received: by 10.99.103.69 with SMTP id b66mr11001959pgc.233.1516246528598; Wed, 17 Jan 2018 19:35:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516246528; cv=none; d=google.com; s=arc-20160816; b=mQ+InOQ5KQTasP5U/D+RdtOmvzHe9g+WA4Johy+s4Bcl88ScxMTqIz97LQPAItSeyX Ob9zWjBwo0i/k1K0YGXGVCV3/89j3aDj07z85hBIO+JNmT50Fcb3Y7lfDBoN40s6kEJo eQIrG20gMIS9p8pxeRKsqR8aBEKcJMTosgzE4Gk1lsjlkctLe2OdR+D/LH9RMxOsTP6y osQq6s0dPJaPnWIzZeqdTfMXDc7sV/lhah4p0Z3ygnWGfViGilwg0vceBAC+g238VVa1 Zgmf6SRmJ3YYWbIBwqG3Sbom0RX2TaRsHmLo2pU6SEOtBltuDAD5W4HAbetw29Mdmpjg q8KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature:dkim-filter :arc-authentication-results; bh=hjTL5AgESStKcyjXW3D4NP1AfisgMawb/S//eMLkgYw=; b=hmWwMluH0RNUsrKCadrC4GUFS2I23uz8qWUMNHIJbMFIGcvK0T0gvnL7UWLqdZyPjV U+MK9UkI0AK2JNMZMF1EpqnndJGwv2GjivnSERulBBlobxEM9CpV6ODlR5xIgP6XpJC/ PKgnfj3kXujugWZiLRCgIqliJW1cuAto4qoyhL3nz8GX2dJGHAErqUHzqTkAAItk7i/h qcwfwTBQeEdtuVdRcvEKcxtB6ltldfEY/kUU+BufXfBhjtbyVt+KdctXR2InNc6TJPhO KrmkGwr1hOx0KXnfTPdaVGwyAfHuSgNP/GjRahmWNCG5yp7KTM1OaslIBGX2r9UA//cC fsSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=y+cN/lmx; 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 p11si5728349pfl.272.2018.01.17.19.35.14; Wed, 17 Jan 2018 19:35:28 -0800 (PST) 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=@nifty.com header.s=dec2015msa header.b=y+cN/lmx; 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 S1754106AbeARDeN (ORCPT + 99 others); Wed, 17 Jan 2018 22:34:13 -0500 Received: from conssluserg-06.nifty.com ([210.131.2.91]:54648 "EHLO conssluserg-06.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753054AbeARDeL (ORCPT ); Wed, 17 Jan 2018 22:34:11 -0500 Received: from mail-ua0-f178.google.com (mail-ua0-f178.google.com [209.85.217.178]) (authenticated) by conssluserg-06.nifty.com with ESMTP id w0I3Xrdt021701; Thu, 18 Jan 2018 12:33:53 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-06.nifty.com w0I3Xrdt021701 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1516246434; bh=hjTL5AgESStKcyjXW3D4NP1AfisgMawb/S//eMLkgYw=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=y+cN/lmxbxgZsTTID6rRVv8TwgLmT/mU5ucC6pUmvcbnwVf2wq5bRxZWSJBUKaSxr INidFvwiMaiujvSLr5RxSWwMm0kvvf9FCkEJWO9GeL5zWbwTHa3sbKxskuTHzu1AJZ RsBesWimjIWz6rhXUVSeXScYMOhe0FpWuDweJPu2bguoCKOEDIs2GD3xhsCYq+C+FN kW49ZzoAwA3iZ/jVx6+yNw0nLCDWWwAVzKHR8NuiC6vfhyLn1N/iTAMeHj9aIE5tPP bh33uSterwvJzYmVw96FeIjirq2zysTET4ypsg0OhSqZgWkUPi4kUecY/fnm4jq+F0 PBzI69QkTG+lw== X-Nifty-SrcIP: [209.85.217.178] Received: by mail-ua0-f178.google.com with SMTP id l35so14660224uad.4; Wed, 17 Jan 2018 19:33:53 -0800 (PST) X-Gm-Message-State: AKwxytfMHN1dbNmv3pKg+Eo3V6D6DPu4OCEmKyNCQ1YGEVI3gVhG499v NHpWNloB7qE7IiQmT2Za/c9Mfiz/22A61UCEq/o= X-Received: by 10.176.22.205 with SMTP id g13mr3806884uaf.76.1516246432702; Wed, 17 Jan 2018 19:33:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.89.196 with HTTP; Wed, 17 Jan 2018 19:33:12 -0800 (PST) In-Reply-To: References: <1515662549-58933-1-git-send-email-wangxiongfeng2@huawei.com> From: Masahiro Yamada Date: Thu, 18 Jan 2018 12:33:12 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Kbuild: suppress packed-not-aligned warning for default setting only To: Arnd Bergmann Cc: Xiongfeng Wang , Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, 2018-01-18 4:40 GMT+09:00 Arnd Bergmann : > On Wed, Jan 17, 2018 at 5:12 PM, Masahiro Yamada > wrote: >> 2018-01-11 18:22 GMT+09:00 Xiongfeng Wang : >>> From: Xiongfeng Wang >>> >>> gcc-8 reports many -Wpacked-not-aligned warnings. The below are some >>> examples. >>> >>> ./include/linux/ceph/msgr.h:67:1: warning: alignment 1 of 'struct >>> ceph_entity_addr' is less than 8 [-Wpacked-not-aligned] >>> } __attribute__ ((packed)); >>> >>> ./include/linux/ceph/msgr.h:67:1: warning: alignment 1 of 'struct >>> ceph_entity_addr' is less than 8 [-Wpacked-not-aligned] >>> } __attribute__ ((packed)); >>> >>> ./include/linux/ceph/msgr.h:67:1: warning: alignment 1 of 'struct >>> ceph_entity_addr' is less than 8 [-Wpacked-not-aligned] >>> } __attribute__ ((packed)); >>> >>> This patch suppress this kind of warnings for default setting. >>> >>> Signed-off-by: Xiongfeng Wang >>> --- >>> scripts/Makefile.extrawarn | 3 +++ >>> 1 file changed, 3 insertions(+) >>> >>> diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn >>> index c6ebf42..8d53570 100644 >>> --- a/scripts/Makefile.extrawarn >>> +++ b/scripts/Makefile.extrawarn >>> @@ -11,6 +11,8 @@ >>> # are not supported by all versions of the compiler >>> # ========================================================================== >>> >>> +KBUILD_CFLAGS += $(call cc-disable-warning, packed-not-aligned) >>> + >> >> I moved this to else case of KBUILD_ENABLE_EXTRA_GCC_CHECKS >> >> Please let me know if you see a problem. > > It means we get the warning for any argument to W=, not just W=1, but > that's probably fine. Oops, you are right. I retrace it. > I'd like to one day clean up the clang warnings > and those that we disable unconditionally in the top-level Makefile > so that each warning gets enabled at a specific level. Yup. As a loosely related item, I see some confusion for DTC extra warning checks. I have sent a patch. > For the time > being, I'm happy with the packed-not-aligned disabled by default. > > Arnd Anyway, I picked the original patch. You may move it to the top-level Makefile when you work on it. -- Best Regards Masahiro Yamada