Commit 3e0103a3 authored by George McCollister's avatar George McCollister Committed by David S. Miller

net: dsa: xrs700x: fix unused warning for of_device_id

Fix unused variable warning that occurs when CONFIG_OF isn't defined by
adding __maybe_unused.

>> drivers/net/dsa/xrs700x/xrs700x_i2c.c:127:34: warning: unused
variable 'xrs700x_i2c_dt_ids' [-Wunused-const-variable]
   static const struct of_device_id xrs700x_i2c_dt_ids[] = {
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarGeorge McCollister <george.mccollister@gmail.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a926b0e
......@@ -121,7 +121,7 @@ static const struct i2c_device_id xrs700x_i2c_id[] = {
MODULE_DEVICE_TABLE(i2c, xrs700x_i2c_id);
static const struct of_device_id xrs700x_i2c_dt_ids[] = {
static const struct of_device_id __maybe_unused xrs700x_i2c_dt_ids[] = {
{ .compatible = "arrow,xrs7003e", .data = &xrs7003e_info },
{ .compatible = "arrow,xrs7003f", .data = &xrs7003f_info },
{ .compatible = "arrow,xrs7004e", .data = &xrs7004e_info },
......
......@@ -138,7 +138,7 @@ static void xrs700x_mdio_remove(struct mdio_device *mdiodev)
xrs700x_switch_remove(priv);
}
static const struct of_device_id xrs700x_mdio_dt_ids[] = {
static const struct of_device_id __maybe_unused xrs700x_mdio_dt_ids[] = {
{ .compatible = "arrow,xrs7003e", .data = &xrs7003e_info },
{ .compatible = "arrow,xrs7003f", .data = &xrs7003f_info },
{ .compatible = "arrow,xrs7004e", .data = &xrs7004e_info },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment