Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2199639pxu; Sun, 6 Dec 2020 23:23:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJxvaRMKjYmhYjSLUKJN7WAHLg2wOC+QM3ru1Qe/0SmkSXvj8jGdA43iNv0Ev/G8pOKseVpK X-Received: by 2002:a17:906:52da:: with SMTP id w26mr18201296ejn.347.1607325795032; Sun, 06 Dec 2020 23:23:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607325795; cv=none; d=google.com; s=arc-20160816; b=TJy5QzeABxc8BZ8WNvyfYcLh83+0Zn8hAfwapsSTz4Ntie0RL6CJmCD4OP/lzo1Vrc WUJYstUPWIVKFg2BUukb80gDX26TYJfCy+M4d1VzO2dBWjF8rckSF9kdIFC6tgBq4pdA GsablmALG94FKxMp9kcZ7tkhi9qmAFHt+PWgTqStFTjvuqOZkyKG7uXEsM39AqjTMdRu zr4OQnTkqRaaE3v6lB5NlKeUnXpD35h1FLs2ZFeCEbr6cEmI9RGJbFFBy6UajFy15Bwm 57K9jes+EapQ8Avq6GHg9a8nVLSFtGyjdZ5mwzP0gnSGv2WWWPTiZ0uIbx9TnNppRB8e BHWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=9HKsBTFeHGdAg/oCDMA+vn9iB/SbZRxUTznuQnx6nOA=; b=QDvWumEL+HwtyPHv8AxCSLlw+nqgmnC0bA3yGXCnSldagZAF7l5ldA8yru9fxfhg8X IOWnGu1JeZ2ga0LmMztZ/TJTIEkqjyb+pOvc6xfJfV+uQGruYPP3LD3gYRvejtBXMCIS jN9u/ocs0AkDDBlfoqxjDVf+rNHfXOljZk85zUzE8gGEFRftjyiz4ceDJl3/KTnoEMCA BE20VnAFfi6MR/mGyQQE/EdY3MmTkVhsTku2mm1LsYUaWatBC7bPOmpi5EFpNnAtwf3h 3ExWFA3014+0SWo5Po6kbtg1yEO1MaOOYvfxxbhQri8HXjTz+SHZA+FtdRZL6wSEZ8Sa VJjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si9361992edv.208.2020.12.06.23.22.52; Sun, 06 Dec 2020 23:23:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726070AbgLGHVP (ORCPT + 99 others); Mon, 7 Dec 2020 02:21:15 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:9123 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725853AbgLGHVP (ORCPT ); Mon, 7 Dec 2020 02:21:15 -0500 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CqF7k4s5Dz15YTH; Mon, 7 Dec 2020 15:20:02 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.487.0; Mon, 7 Dec 2020 15:20:23 +0800 From: Huazhong Tan To: CC: , , , , , "Huazhong Tan" Subject: [PATCH net] net: hns3: remove a misused pragma packed Date: Mon, 7 Dec 2020 15:20:25 +0800 Message-ID: <1607325625-29945-1-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hclge_dbg_reg_info[] is defined as an array of packed structure accidentally. However, this array contains pointers, which are no longer aligned naturally, and cannot be relocated on PPC64. Hence, when compile-testing this driver on PPC64 with CONFIG_RELOCATABLE=y (e.g. PowerPC allyesconfig), there will be some warnings. Since each field in structure hclge_qos_pri_map_cmd and hclge_dbg_bitmap_cmd is type u8, the pragma packed is unnecessary for these two structures as well, so remove the pragma packed in hclge_debugfs.h to fix this issue, and this increases hclge_dbg_reg_info[] by 4 bytes per entry. Fixes: a582b78dfc33 ("net: hns3: code optimization for debugfs related to "dump reg"") Reported-by: Stephen Rothwell Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h index a9066e6..ca2ab6c 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h @@ -35,8 +35,6 @@ #define HCLGE_DBG_DFX_SSU_2_OFFSET 12 -#pragma pack(1) - struct hclge_qos_pri_map_cmd { u8 pri0_tc : 4, pri1_tc : 4; @@ -85,8 +83,6 @@ struct hclge_dbg_reg_type_info { struct hclge_dbg_reg_common_msg reg_msg; }; -#pragma pack() - static const struct hclge_dbg_dfx_message hclge_dbg_bios_common_reg[] = { {false, "Reserved"}, {true, "BP_CPU_STATE"}, -- 2.7.4