]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: remove a misused pragma packed
authorHuazhong Tan <tanhuazhong@huawei.com>
Mon, 7 Dec 2020 07:20:25 +0000 (15:20 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Dec 2020 07:38:33 +0000 (23:38 -0800)
commit522e37ad533097d5e9eb6df8cc320b382c68484c
tree6cceee2c84f4704fa17ac82f8e76ec2bf49a2ab9
parent49b2a954e8db2a3766aa997099679df284702600
net: hns3: remove a misused pragma packed

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: ee2ccc76874c ("net: hns3: code optimization for debugfs related to "dump reg"")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.h