Received: by 10.223.148.5 with SMTP id 5csp6283200wrq; Wed, 17 Jan 2018 11:43:10 -0800 (PST) X-Google-Smtp-Source: ACJfBovdE1+BLh370LQ6ZYTEYxWmSyy9rxNx3J7k6RSjYopzpArwjBJ55+qyc0dsfJFCy77il1ba X-Received: by 10.98.139.8 with SMTP id j8mr22638152pfe.4.1516218190029; Wed, 17 Jan 2018 11:43:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516218190; cv=none; d=google.com; s=arc-20160816; b=ZCk44c5kMxQRkzJhAZdT3OSUo8OFasSoBuSHgJm9PZ4YjVwVEBqyMrYvXmS+Ka+nAf Sq3mR/Qx5MMmlSA3q6dipt1L9rO8lz/oUfz1kYQb8qI3T6hOLPkfWMBuBdgc15ivc29+ g8ZSl2lSMqeKm8nTLRNisGaDqUEY53x0AO5hfT2SKomNAc3uXmbhfr4AQVCb1zz8q4rY 843V+gVBjHa43sjw+/x2rkEykJ7DK4K35VQa3RijUjdXMQ61msawNK24etcWGUb6xEsZ kdQMF4l+tW9sMNokh4WICfX3Eh4uf81ptwAbU+VjCpuxTm9izE0P7Uc2LJA3hCSeSXUh xG+w== 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 :arc-authentication-results; bh=LT1/nSNLfOM/MpYMZ85WAyyDymJb2CBXaPCbMzX3juk=; b=Y80rw4P0+POGgiku5WKR90T4E4OAzV+Oi3mh1IRQNBpb/VOQSVAInoEtgpM/6nMdFE 1bEk7JHC+2l0dsfFyfOGT+94eh+OhURRr6qfBVisiVrbJDCuTM59UP0GFKcs14QH/KRU LsIUx1WAleez9bsMxnG9dvMDSNcpQ78hi4An4xERAr7zEP9ywvM/NCojtzJFZ2S+fek7 r6NHbcX3AgtgwssaXPgdOggF8uusO51nyjS3KpYGFWAizWYzBi+tJHWc1EbrGnwWoocN Wsk16lBOY/0LoG/0EWkCY5KshhMLcp1Ba0p//JeB6jsxGm4zZUBtdJOnO/cl4acKmSgV ksdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Con9/jtz; 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 p19si4937708plo.199.2018.01.17.11.42.56; Wed, 17 Jan 2018 11:43:09 -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=fail header.i=@gmail.com header.s=20161025 header.b=Con9/jtz; 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 S1753565AbeAQTkm (ORCPT + 99 others); Wed, 17 Jan 2018 14:40:42 -0500 Received: from mail-ot0-f195.google.com ([74.125.82.195]:43244 "EHLO mail-ot0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753225AbeAQTkk (ORCPT ); Wed, 17 Jan 2018 14:40:40 -0500 Received: by mail-ot0-f195.google.com with SMTP id p36so9843801otd.10; Wed, 17 Jan 2018 11:40:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=LT1/nSNLfOM/MpYMZ85WAyyDymJb2CBXaPCbMzX3juk=; b=Con9/jtze03eocf3TCoOjOBsunnPIG/3COjHtVfV0TiGQvxarecY5Eh23sjdXONSlL UZ6/mLPIlkd5VRo9r9yJT3P6IOQmmF13aK4TFkOqMUdDAxQdV9Fhnq6IrvhsSWUI/njU at19PjYk1DRdUdW/SSxeuVMXYf9HFx2G//tWkvqNTs+/3p4y37SA0/iJffoKHHoEWlIX Kjh/0GcPHXUrysPbHItUPJpi5NRpJ/iS7kNtx0l3j+oMU0g1IhHJ5ma74c320OSwlTya 0GJpkdLV2biaDSa73/tlRy4Lm4Rdr/FM364L4R3OjDQgLSnc1Bg6Eocu8z2xeWmt7b1m qA3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=LT1/nSNLfOM/MpYMZ85WAyyDymJb2CBXaPCbMzX3juk=; b=sD0mwnaSngVFxCG+3TjKS1gNo1633++Y7pItnWKl7z2QiK9vjzuuGRTmD3F0p5BKiB ubYMDhCkT60VCyLm1eGdKDJnxeIHrTkOe1D3Ir0EQGDEfBpBsHsnknxpoRrc7pP7KZI2 ftPKB8lc8ir6a0VcK/khGzGfpRuquO2CDfJ7hSK6iDWnhDTT16/UxbEMr4Wi/OGkHScX +t9VlMtBNh3YMOb4sNgmIUNv+VIFycTp1I0bZDfzSuZX15aqR47M1/3UAsasniY+j+KC OSKxZajw2fL2VoOvT84Sjg36HK+jktuVWf6jT3FMI6lyi1s2MV0ptN/s2PxrF9YDCrMF ccnA== X-Gm-Message-State: AKwxytetB8RBUL9voPWN2OZC9tZqr7ozxKSWJxTpIe8m4D8dh6VJ6Vv7 MEQQozCxMHe03ekAHZTVOzyGgBVHGgWCkdrfe6I= X-Received: by 10.157.65.169 with SMTP id p38mr2010725ote.38.1516218038372; Wed, 17 Jan 2018 11:40:38 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.17.89 with HTTP; Wed, 17 Jan 2018 11:40:37 -0800 (PST) In-Reply-To: References: <1515662549-58933-1-git-send-email-wangxiongfeng2@huawei.com> From: Arnd Bergmann Date: Wed, 17 Jan 2018 20:40:37 +0100 X-Google-Sender-Auth: 3I1ximVyuMurhIGFAlgNOKZ6R3A Message-ID: Subject: Re: [PATCH] Kbuild: suppress packed-not-aligned warning for default setting only To: Masahiro Yamada 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 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. 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. For the time being, I'm happy with the packed-not-aligned disabled by default. Arnd