]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
net/phy: fix many "defined but unused" warnings
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 3 Oct 2010 23:43:32 +0000 (23:43 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Oct 2010 07:34:29 +0000 (00:34 -0700)
MODULE_DEVICE_TABLE only expands to something if it's compiled
for a module.  So when building-in support for the phys, the
mdio_device_id tables are unused.  Marking them with __maybe_unused
fixes the following warnings:

drivers/net/phy/bcm63xx.c:134: warning: 'bcm63xx_tbl' defined but not used
drivers/net/phy/broadcom.c:933: warning: 'broadcom_tbl' defined but not used
drivers/net/phy/cicada.c:162: warning: 'cicada_tbl' defined but not used
drivers/net/phy/davicom.c:222: warning: 'davicom_tbl' defined but not used
drivers/net/phy/et1011c.c:114: warning: 'et1011c_tbl' defined but not used
drivers/net/phy/icplus.c:137: warning: 'icplus_tbl' defined but not used
drivers/net/phy/lxt.c:226: warning: 'lxt_tbl' defined but not used
drivers/net/phy/marvell.c:724: warning: 'marvell_tbl' defined but not used
drivers/net/phy/micrel.c:234: warning: 'micrel_tbl' defined but not used
drivers/net/phy/national.c:154: warning: 'ns_tbl' defined but not used
drivers/net/phy/qsemi.c:141: warning: 'qs6612_tbl' defined but not used
drivers/net/phy/realtek.c:82: warning: 'realtek_tbl' defined but not used
drivers/net/phy/smsc.c:257: warning: 'smsc_tbl' defined but not used
drivers/net/phy/ste10Xp.c:135: warning: 'ste10Xp_tbl' defined but not used
drivers/net/phy/vitesse.c:195: warning: 'vitesse_tbl' defined but not used

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
15 files changed:
drivers/net/phy/bcm63xx.c
drivers/net/phy/broadcom.c
drivers/net/phy/cicada.c
drivers/net/phy/davicom.c
drivers/net/phy/et1011c.c
drivers/net/phy/icplus.c
drivers/net/phy/lxt.c
drivers/net/phy/marvell.c
drivers/net/phy/micrel.c
drivers/net/phy/national.c
drivers/net/phy/qsemi.c
drivers/net/phy/realtek.c
drivers/net/phy/smsc.c
drivers/net/phy/ste10Xp.c
drivers/net/phy/vitesse.c

index c1281567983739bdd3a5bbecd0f7c1fbf03e6ba0..e16f98cb4f04733c962aa9219d407c3066a4ef64 100644 (file)
@@ -131,7 +131,7 @@ static void __exit bcm63xx_phy_exit(void)
 module_init(bcm63xx_phy_init);
 module_exit(bcm63xx_phy_exit);
 
-static struct mdio_device_id bcm63xx_tbl[] = {
+static struct mdio_device_id __maybe_unused bcm63xx_tbl[] = {
        { 0x00406000, 0xfffffc00 },
        { 0x002bdc00, 0xfffffc00 },
        { }
index 4accd83d3dfe8152067408e4fc5dc7b454c4d95e..d84c4224dd1258ee878bb8cc2d5d60f892667790 100644 (file)
@@ -930,7 +930,7 @@ static void __exit broadcom_exit(void)
 module_init(broadcom_init);
 module_exit(broadcom_exit);
 
-static struct mdio_device_id broadcom_tbl[] = {
+static struct mdio_device_id __maybe_unused broadcom_tbl[] = {
        { PHY_ID_BCM5411, 0xfffffff0 },
        { PHY_ID_BCM5421, 0xfffffff0 },
        { PHY_ID_BCM5461, 0xfffffff0 },
index 1a325d63756b9cac7230080073fc02a2f38518ec..d28173161c215d2a02ff796a6f5ad172695d74d8 100644 (file)
@@ -159,7 +159,7 @@ static void __exit cicada_exit(void)
 module_init(cicada_init);
 module_exit(cicada_exit);
 
-static struct mdio_device_id cicada_tbl[] = {
+static struct mdio_device_id __maybe_unused cicada_tbl[] = {
        { 0x000fc410, 0x000ffff0 },
        { 0x000fc440, 0x000fffc0 },
        { }
index 29c17617a2ec22ec216ab32129313b491ccf674b..2f774acdb55192f0df5086e6d2a51ef193bf3cfc 100644 (file)
@@ -219,7 +219,7 @@ static void __exit davicom_exit(void)
 module_init(davicom_init);
 module_exit(davicom_exit);
 
-static struct mdio_device_id davicom_tbl[] = {
+static struct mdio_device_id __maybe_unused davicom_tbl[] = {
        { 0x0181b880, 0x0ffffff0 },
        { 0x0181b8a0, 0x0ffffff0 },
        { 0x00181b80, 0x0ffffff0 },
index 13995f52d6af1429c556312759ded6f010654be8..a8eb19ec3183b5606e300c27061701298aaa13bf 100644 (file)
@@ -111,7 +111,7 @@ static void __exit et1011c_exit(void)
 module_init(et1011c_init);
 module_exit(et1011c_exit);
 
-static struct mdio_device_id et1011c_tbl[] = {
+static struct mdio_device_id __maybe_unused et1011c_tbl[] = {
        { 0x0282f014, 0xfffffff0 },
        { }
 };
index 3f2583f18a39c3756c6296055a811cb1f1122f4e..c1d2d251fe8bfcef7114fd57b1018c70697006f5 100644 (file)
@@ -134,7 +134,7 @@ static void __exit ip175c_exit(void)
 module_init(ip175c_init);
 module_exit(ip175c_exit);
 
-static struct mdio_device_id icplus_tbl[] = {
+static struct mdio_device_id __maybe_unused icplus_tbl[] = {
        { 0x02430d80, 0x0ffffff0 },
        { }
 };
index 29c39ff85de56a0012ac8be5a50508aeab56e784..6f6e8b616a627d869bae3743a56b3d45f8d39868 100644 (file)
@@ -223,7 +223,7 @@ static void __exit lxt_exit(void)
 module_init(lxt_init);
 module_exit(lxt_exit);
 
-static struct mdio_device_id lxt_tbl[] = {
+static struct mdio_device_id __maybe_unused lxt_tbl[] = {
        { 0x78100000, 0xfffffff0 },
        { 0x001378e0, 0xfffffff0 },
        { 0x00137a10, 0xfffffff0 },
index 0101f2bdf400e7b28eca39d0c9b7a413e2f0d326..ed43c0016c64d0d72f2351f09eed37d57e0360ce 100644 (file)
@@ -721,7 +721,7 @@ static void __exit marvell_exit(void)
 module_init(marvell_init);
 module_exit(marvell_exit);
 
-static struct mdio_device_id marvell_tbl[] = {
+static struct mdio_device_id __maybe_unused marvell_tbl[] = {
        { 0x01410c60, 0xfffffff0 },
        { 0x01410c90, 0xfffffff0 },
        { 0x01410cc0, 0xfffffff0 },
index 8bb7db676a5cc13b0651a8970fd25a27d7a79d48..0fd1678bc5a928eac50ec9862567ed2019f5bb4b 100644 (file)
@@ -231,7 +231,7 @@ MODULE_DESCRIPTION("Micrel PHY driver");
 MODULE_AUTHOR("David J. Choi");
 MODULE_LICENSE("GPL");
 
-static struct mdio_device_id micrel_tbl[] = {
+static struct mdio_device_id __maybe_unused micrel_tbl[] = {
        { PHY_ID_KSZ9021, 0x000fff10 },
        { PHY_ID_KS8001, 0x00fffff0 },
        { PHY_ID_KS8737, 0x00fffff0 },
index a73ba0bcc0ce86f632bf8d7e5c5287e9d7e02062..0620ba963508e17096dab555ed79495749c68e70 100644 (file)
@@ -151,7 +151,7 @@ MODULE_LICENSE("GPL");
 module_init(ns_init);
 module_exit(ns_exit);
 
-static struct mdio_device_id ns_tbl[] = {
+static struct mdio_device_id __maybe_unused ns_tbl[] = {
        { DP83865_PHY_ID, 0xfffffff0 },
        { }
 };
index 6736b23f1b28a3828456fbfc80b9b88739050ecb..fe0d0a15d5e1498801b2a0d5415da1a5a1c1edeb 100644 (file)
@@ -138,7 +138,7 @@ static void __exit qs6612_exit(void)
 module_init(qs6612_init);
 module_exit(qs6612_exit);
 
-static struct mdio_device_id qs6612_tbl[] = {
+static struct mdio_device_id __maybe_unused qs6612_tbl[] = {
        { 0x00181440, 0xfffffff0 },
        { }
 };
index f567c0e1aaa1a0d745b8ca1f719b93a8d96c9577..a4eae750a4145084b0cf45e90b875f1eb2c019c3 100644 (file)
@@ -79,7 +79,7 @@ static void __exit realtek_exit(void)
 module_init(realtek_init);
 module_exit(realtek_exit);
 
-static struct mdio_device_id realtek_tbl[] = {
+static struct mdio_device_id __maybe_unused realtek_tbl[] = {
        { 0x001cc912, 0x001fffff },
        { }
 };
index 78fa988256fce4d2bd691029ca8b4ababba2789a..342505c976d652095a2eac183e6df365a4de2475 100644 (file)
@@ -254,7 +254,7 @@ MODULE_LICENSE("GPL");
 module_init(smsc_init);
 module_exit(smsc_exit);
 
-static struct mdio_device_id smsc_tbl[] = {
+static struct mdio_device_id __maybe_unused smsc_tbl[] = {
        { 0x0007c0a0, 0xfffffff0 },
        { 0x0007c0b0, 0xfffffff0 },
        { 0x0007c0c0, 0xfffffff0 },
index 72290099e5e1f01e2784629ec54e01e9a037926e..187a2fa814f27325c3da0c10e6ae258f0ad7cffe 100644 (file)
@@ -132,7 +132,7 @@ static void __exit ste10Xp_exit(void)
 module_init(ste10Xp_init);
 module_exit(ste10Xp_exit);
 
-static struct mdio_device_id ste10Xp_tbl[] = {
+static struct mdio_device_id __maybe_unused ste10Xp_tbl[] = {
        { STE101P_PHY_ID, 0xfffffff0 },
        { STE100P_PHY_ID, 0xffffffff },
        { }
index 45cce50a279992eee14fd6edf185fabb4fe1e94a..5d8f6e17bd55b1b7e2f3348a95224b4814540787 100644 (file)
@@ -192,7 +192,7 @@ static void __exit vsc82xx_exit(void)
 module_init(vsc82xx_init);
 module_exit(vsc82xx_exit);
 
-static struct mdio_device_id vitesse_tbl[] = {
+static struct mdio_device_id __maybe_unused vitesse_tbl[] = {
        { PHY_ID_VSC8244, 0x000fffc0 },
        { PHY_ID_VSC8221, 0x000ffff0 },
        { }