Received: by 10.223.148.5 with SMTP id 5csp6013988wrq; Wed, 17 Jan 2018 08:23:50 -0800 (PST) X-Google-Smtp-Source: ACJfBosd8v7TembchsmNy/yH/McHf4APYAx+WP9K6pXLA6H/WIxSs+96hFiD6KDXGjjRtFRyOVzG X-Received: by 10.84.211.39 with SMTP id b36mr43337417pli.217.1516206229909; Wed, 17 Jan 2018 08:23:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516206229; cv=none; d=google.com; s=arc-20160816; b=UegzHCPcXaQfqtyP7rfNKNHP20GFYP8WFH46llaDfMpCi7qDdntoK598Mh2elfY78v ykhaIOYuOv77qPnoVFejC64eaUcwbpeuL+lV3lUpuVv4hG6jOpir6hLU/LnXG+p6CA05 QU6gvjZ1l9MIBWBQbvpjcizhUQbKZvRWPotmdnitvITRt6QDYakhyDRMIZ0c+laeb5jN mK3OtlbjSJ7Q00HfjgAoXp74zTt1HdmQE8XBhtAXmmBDOy3aPmC+kgksyQGP72JyHuH7 TotbYoj7ecR0wQv2gjI1nOYoQJPML/5TXsljKF4zjP2Xr1LqC/fRlnk760IjRbdHiTuw NlIw== 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=nyvWiD7eELY1eqWHs0WPt1x8Ep0SKPqH6fo8xMlEMfI=; b=k2vDNdBhJFCWXhxMKIjx8nh0LqAo5kUIXylQjtfPfPEeiaC9YARhmE9sAH1yg+IvfQ 5FLyZG30MDZg4ULo4DHeaGE4Ry6a7CxNFDtusWoSJnjl85MFjo0TYBo/D9xTdSDVrxtA i8qKxFGNj20uctZY8K3ZdGdieRk7sHzfwMGU+8x7b3t2UGyJVNscSscBs4wHE4YGqZ8s Zwb4ddLp9qEFxlhvBgySZ1ojpa7BFSpwLTd5yjrYE8cH/jcwtvknzM+2y3VHLCmlTso5 hWV4D+YyrUglZaEC5TpesrZc4QmC3OxvhhFIpBYMMYUpzvphMleJERH4kdFs4Yl3df3k N8AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=JmotPP8h; 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 bg8si4677825plb.748.2018.01.17.08.23.35; Wed, 17 Jan 2018 08:23:49 -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=JmotPP8h; 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 S1753910AbeAQQMz (ORCPT + 99 others); Wed, 17 Jan 2018 11:12:55 -0500 Received: from conssluserg-03.nifty.com ([210.131.2.82]:64820 "EHLO conssluserg-03.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753741AbeAQQMw (ORCPT ); Wed, 17 Jan 2018 11:12:52 -0500 Received: from mail-vk0-f51.google.com (mail-vk0-f51.google.com [209.85.213.51]) (authenticated) by conssluserg-03.nifty.com with ESMTP id w0HGChlR003625; Thu, 18 Jan 2018 01:12:44 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-03.nifty.com w0HGChlR003625 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1516205564; bh=nyvWiD7eELY1eqWHs0WPt1x8Ep0SKPqH6fo8xMlEMfI=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=JmotPP8hj0LCl+IS54OVXKcsIyojcNmRg1zeGAj7x1xPlnDwySSZKJRFoIIyN5rcA YuAsANKTQh7msUoO2YL80fsU+hrKQdYPZQPkqbeFpDybYlhX2N/totz1pFLkfYeuV9 1akBQCYIvQKCEDZ3alTNqnJOld8jIrk7WusCdA7Y1Cxix0jNceXwsNX2bNjn22uZkp a/E6IqosULSh0y2YnnmZV5LD1jYlpklFbzXeQ9Yplu1+OFW6EuJ4o/4vIHy8eevHVo rkmZvC3rTApqAyewJCO6BhZ554tx3H+bMjwFZ0pCv8GTq53yFhIYiWOMrIyOQzkjAa EgWPDz3Kh3kvw== X-Nifty-SrcIP: [209.85.213.51] Received: by mail-vk0-f51.google.com with SMTP id n4so11809521vkd.6; Wed, 17 Jan 2018 08:12:44 -0800 (PST) X-Gm-Message-State: AKwxytcOX+pgvc+LUWEtNEMpkzE9Lq+Lh89Us5ExjFRU//CMNgETO9oc gjxVYS8CJ8IDRE25eP3iZdlzC4dNf+NoiNx7bX4= X-Received: by 10.31.96.206 with SMTP id u197mr2282873vkb.55.1516205563360; Wed, 17 Jan 2018 08:12:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.176.89.196 with HTTP; Wed, 17 Jan 2018 08:12:02 -0800 (PST) In-Reply-To: <1515662549-58933-1-git-send-email-wangxiongfeng2@huawei.com> References: <1515662549-58933-1-git-send-email-wangxiongfeng2@huawei.com> From: Masahiro Yamada Date: Thu, 18 Jan 2018 01:12:02 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] Kbuild: suppress packed-not-aligned warning for default setting only To: Xiongfeng Wang Cc: Michal Marek , Linux Kbuild mailing list , Linux Kernel Mailing List , Arnd Bergmann 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 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. -- Best Regards Masahiro Yamada