Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ptp: Fix dp83640 build warning when building statically

If the dp83640 driver is not built as a module, the
MODULE_DEVICE_TABLE reference to dp83640_tbl nops out.

Since the table isn't referenced elsewhere, it it causes
the following warning:
drivers/net/phy/dp83640.c:1095: warning: ‘dp83640_tbl’ defined but not used

This apparently is common with mdio_device_id table structures,
and is avoided by using __maybe_unused annotation.

Signed-off-by: John Stultz <john.stultz@linaro.org>

+1 -1
+1 -1
drivers/net/phy/dp83640.c
··· 1092 1092 module_init(dp83640_init); 1093 1093 module_exit(dp83640_exit); 1094 1094 1095 - static struct mdio_device_id dp83640_tbl[] = { 1095 + static struct mdio_device_id __maybe_unused dp83640_tbl[] = { 1096 1096 { DP83640_PHY_ID, 0xfffffff0 }, 1097 1097 { } 1098 1098 };