未验证 提交 45462d25 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!253 [5.10] [bugfix] : fix arm32 compiler error ERROR and warning

Merge Pull Request from: @duanqiangwen 
 
This PR is to fix arm32 compiler error ERROR and warning.

1.fix arm32 compile error because 64bit div operate in txgbe_get_thermal_sensor_data function
2.fix txgbe_sysfs compile warning.

Kernel Issue:
#I5Y6RT:txgbe相关bugfix合入,保持与北京网迅科技发布的txgbe 1.2.3版本out-of-tree module同步:txgbe相关bugfix合入,保持与北京网迅科技发布的txgbe 1.2.3版本out-of-tree module同步

Compile Failed Log:
- build failed:

- <line too long ...>

srab@18007000/ports/port@5: Relying on default #address-cells value

arch/arm/boot/dts/bcm53015-meraki-mr26.dts:124.10-133.5: Warning (avoid_default_addr_size): /srab@18007000/ports/port@5: Relying on default #size-cells value

drivers/net/ethernet/netswift/txgbe/txgbe_main.c: In function ‘txgbe_configure_isb’:

drivers/net/ethernet/netswift/txgbe/txgbe_main.c:3708:49: warning: right shift count >= width of type [-Wshift-count-overflow]

  wr32(hw, TXGBE_PX_ISB_ADDR_H, adapter->isb_dma >> 32);

drivers/net/ethernet/netswift/txgbe/txgbe_sysfs.c:13:1: warning: "/*" within comment [-Wcomment]

 /* Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd. */

  

ERROR: modpost: "__aeabi_ldivmod" [drivers/net/ethernet/netswift/txgbe/txgbe.ko] undefined!

ERROR: modpost: "__aeabi_uldivmod" [drivers/net/ethernet/netswift/txgbe/txgbe.ko] undefined!

make[1]: *** [modules-only.symvers] Error 1

make[1]: *** Deleting file 'modules-only.symvers'

make: *** [modules] Error 2 
 
Link:https://gitee.com/openeuler/kernel/pulls/253 
Reviewed-by: Zheng Zengkai <zhengzengkai@huawei.com> 
Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com> 
...@@ -3217,10 +3217,10 @@ s32 txgbe_get_thermal_sensor_data(struct txgbe_hw *hw) ...@@ -3217,10 +3217,10 @@ s32 txgbe_get_thermal_sensor_data(struct txgbe_hw *hw)
tsv = tsv < 1200 ? tsv : 1200; tsv = tsv < 1200 ? tsv : 1200;
tsv = -(48380 << 8) / 1000 tsv = -(48380 << 8) / 1000
+ tsv * (31020 << 8) / 100000 + div64_s64(tsv * (31020 << 8), 100000)
- tsv * tsv * (18201 << 8) / 100000000 - div64_s64(tsv * tsv * (18201 << 8), 100000000)
+ tsv * tsv * tsv * (81542 << 8) / 1000000000000 + div64_s64(tsv * tsv * tsv * (81542 << 8), 1000000000000)
- tsv * tsv * tsv * tsv * (16743 << 8) / 1000000000000000; - div64_s64(tsv * tsv * tsv * tsv * (16743 << 8), 1000000000000000);
tsv >>= 8; tsv >>= 8;
data->sensor.temp = (s16)tsv; data->sensor.temp = (s16)tsv;
...@@ -3231,10 +3231,10 @@ s32 txgbe_get_thermal_sensor_data(struct txgbe_hw *hw) ...@@ -3231,10 +3231,10 @@ s32 txgbe_get_thermal_sensor_data(struct txgbe_hw *hw)
tsv = tsv & TXGBE_TS_ST_DATA_OUT_MASK; tsv = tsv & TXGBE_TS_ST_DATA_OUT_MASK;
tsv = tsv < 1200 ? tsv : 1200; tsv = tsv < 1200 ? tsv : 1200;
tsv = -(48380 << 8) / 1000 tsv = -(48380 << 8) / 1000
+ tsv * (31020 << 8) / 100000 + div64_s64(tsv * (31020 << 8), 100000)
- tsv * tsv * (18201 << 8) / 100000000 - div64_s64(tsv * tsv * (18201 << 8), 100000000)
+ tsv * tsv * tsv * (81542 << 8) / 1000000000000 + div64_s64(tsv * tsv * tsv * (81542 << 8), 1000000000000)
- tsv * tsv * tsv * tsv * (16743 << 8) / 1000000000000000; - div64_s64(tsv * tsv * tsv * tsv * (16743 << 8), 1000000000000000);
tsv >>= 8; tsv >>= 8;
data->sensor.temp = (s16)tsv; data->sensor.temp = (s16)tsv;
......
/*
* WangXun 10 Gigabit PCI Express Linux driver
* Copyright (c) 2015 - 2017 Beijing WangXun Technology Co., Ltd.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd. */ /* Copyright (c) 2019 - 2022 Beijing WangXun Technology Co., Ltd. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册