Bug 27846 - txgbe驱动clang编译warnning
Summary: txgbe驱动clang编译warnning
Status: NEW
Alias: None
Product: ANCK 6.6 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: unspecified
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: GuixinLiu
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-09 17:29 UTC by DuanqiangWen
Modified: 2025-12-09 17:29 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DuanqiangWen 2025-12-09 17:29:19 UTC
Description of problem:
drivers/net/ethernet/wangxun/txgbe/txgbe_e56.c:3456:4: error: variable 'adapter' is uninitialized when used here [-Werror,-Wuninitialized]
2025-12-03T13:09:39.6234459Z 3456 | e_info(drv, "ERROR: Wait E56PHY_CTRL_FSM_RX_STAT_0_ADDR Timeout!!!\n");
2025-12-03T13:09:39.6236172Z | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2025-12-03T13:09:39.6238948Z drivers/net/ethernet/wangxun/txgbe/txgbe.h:1293:30: note: expanded from macro 'e_info'
2025-12-03T13:09:39.6240441Z 1293 | netif_info(adapter, msglvl, adapter->netdev, format, ## arg)
2025-12-03T13:09:39.6241326Z | ^~~~~~~
2025-12-03T13:09:39.6242281Z ./include/net/net_debug.h:109:32: note: expanded from macro 'netif_info'
2025-12-03T13:09:39.6243315Z 109 | netif_level(info, priv, type, dev, fmt, ##args)
2025-12-03T13:09:39.6244078Z | ^~~
2025-12-03T13:09:39.6245068Z ./include/net/net_debug.h:93:18: note: expanded from macro 'netif_level'
2025-12-03T13:09:39.6246069Z 93 | netdev_##level(dev, fmt, ##args);
2025-12-03T13:09:39.6246851Z | ^~~
2025-12-03T13:09:39.6248270Z drivers/net/ethernet/wangxun/txgbe/txgbe_e56.c:3299:31: note: initialize the variable 'adapter' to silence this warning
2025-12-03T13:09:39.6250366Z 3299 | struct txgbe_adapter *adapter;
2025-12-03T13:09:39.6251078Z | ^
2025-12-03T13:09:39.6251744Z | = NULL
2025-12-03T13:09:39.6264454Z CC [M] sound/soc/codecs/max98520.o
2025-12-03T13:09:39.6315702Z CC [M] drivers/mtd/maps/intel_vr_nor.o
2025-12-03T13:09:39.6338434Z 1 error generated.
2025-12-03T13:09:39.6545077Z make[7]: *** [scripts/Makefile.build:243:drivers/net/ethernet/wangxun/txgbe/txgbe_e56.o] 错误 1

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
make CC=clang

Actual results:
make failed

Expected results:
make pass.

Additional info: