Skip to content

Commit

Permalink
ptp: Fix dp83640 build warning when building statically
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
John Stultz committed May 23, 2011
1 parent cb646e2 commit 86ff9ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/dp83640.c
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ MODULE_LICENSE("GPL");
module_init(dp83640_init);
module_exit(dp83640_exit);

static struct mdio_device_id dp83640_tbl[] = {
static struct mdio_device_id __maybe_unused dp83640_tbl[] = {
{ DP83640_PHY_ID, 0xfffffff0 },
{ }
};
Expand Down

0 comments on commit 86ff9ba

Please sign in to comment.