From patchwork Thu Jan 11 09:22:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiongfeng Wang X-Patchwork-Id: 124168 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp414226qgn; Thu, 11 Jan 2018 01:16:35 -0800 (PST) X-Google-Smtp-Source: ACJfBotGCHx/5iJNo/+HChIYiWsDZNG5xaSk4Pk9XFMG8wke+3oKkhYAHYxeOeFErtTwM1d4otse X-Received: by 10.98.226.24 with SMTP id a24mr379895pfi.192.1515662195007; Thu, 11 Jan 2018 01:16:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515662195; cv=none; d=google.com; s=arc-20160816; b=Ki/VfOxP3y5mOfidZC8FxzzepKYeOq2wDnG5Jl7OY4zLOtJK383sdijADikTfl2TvR +6E0aLPgJsWoNeivivnDhiCkgENVR1QTYJTUpeVnHawHo0bUULoEa4dRFquAgkZ0p7gi JL4DAIr4kO4Rd0XvMTP+PcjcuqUgHv3Sb8Ore/HzVO1dMoo9YtItf8g3bgPTh2OqnPLS AT6K0dUXnqMyBhfTuMpQchRcwi7Mn//Hm/MYC6Hi3+MptXm3M0v756r0xZCZt1Z7SY7S BDDhFBEypzcVovq3CSeKzXkcoDgVW2s0zR7oIhFPUdP7AJ310jg8RdzWPItFy7ie1g16 DjhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=dabZ59y8aLLNb/k9ZWBS4S+HmJ8W03INtX7UvGnWmE0=; b=yJK/rKnMSnaOo0maT2ZIGWupPxgWVoUxCRjPE/m28RyAyIdnbcvQt2d5Qpo0T8SDYC Jk5UKj+6hIlhDzzMpMRAS7R8CVNBjHtHGWiXWGqV6oMO77Gxim35HkWLc99P4IGNV+q9 JELiBaf7w2jPCx+wYBeakJmOvB8LnKCEoh1V/IMCOe2TQHNuocrntAGEVN3t1tzgxwoE FV/qVEe6E6EH412wcGJCUGe+rp0vhp5Vaf55dHefuI7wBgmP/FqraEadAPiW2XXp+Z9L 9nd6DUKrmlovzHZe1tJDi+qx/l95fyrd0wjHo8WtFvawXgZTFw0ENVLb67I5MMVLv0K8 rJgQ== ARC-Authentication-Results: i=1; mx.google.com; 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 j12si11805352pgq.184.2018.01.11.01.16.34; Thu, 11 Jan 2018 01:16:34 -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; 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 S1754277AbeAKJQd (ORCPT + 28 others); Thu, 11 Jan 2018 04:16:33 -0500 Received: from szxga05-in.huawei.com ([45.249.212.191]:3772 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753909AbeAKJQb (ORCPT ); Thu, 11 Jan 2018 04:16:31 -0500 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id F01DDA8AF5A87; Thu, 11 Jan 2018 17:16:09 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.361.1; Thu, 11 Jan 2018 17:16:03 +0800 From: Xiongfeng Wang To: , CC: , , , Subject: [PATCH] Kbuild: suppress packed-not-aligned warning for default setting only Date: Thu, 11 Jan 2018 17:22:29 +0800 Message-ID: <1515662549-58933-1-git-send-email-wangxiongfeng2@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(+) -- 1.8.3.1 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) + ifeq ("$(origin W)", "command line") export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) endif @@ -26,6 +28,7 @@ warning-1 += -Wold-style-definition warning-1 += $(call cc-option, -Wmissing-include-dirs) warning-1 += $(call cc-option, -Wunused-but-set-variable) warning-1 += $(call cc-option, -Wunused-const-variable) +warning-1 += $(call cc-option, -Wpacked-not-aligned) warning-1 += $(call cc-disable-warning, missing-field-initializers) warning-1 += $(call cc-disable-warning, sign-compare)