summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2016-07-12 10:36:15 +0200
committerStefan Agner <stefan.agner@toradex.com>2016-07-14 11:19:59 -0700
commit6d13b114c8fd725ce5a1113a5c8a89e7d96b6cf0 (patch)
tree9164fcd05f7def604eb7faf463847e5c6859b8cd
parentfd913a90fa6832eecd00898b7f83088c789e8cd1 (diff)
unused variables: silence compiler warning
drivers/media/platform/mxc/capture/ov5640_mipi.c:879:18: warning: 'sclk_rdiv_map' defined but not used [-Wunused-const-variable=] static const int sclk_rdiv_map[] = {1, 2, 4, 8}; ^~~~~~~~~~~~~ drivers/net/usb/usbnet.c:84:19: warning: 'driver_name' defined but not used [-Wunused-const-variable=] static const char driver_name [] = "usbnet"; ^~~~~~~~~~~ fs/cifs/netmisc.c:133:40: warning: 'mapping_table_ERRHRD' defined but not used [-Wunused-const-variable=] static const struct smb_to_posix_error mapping_table_ERRHRD[] = { ^~~~~~~~~~~~~~~~~~~~ kernel/cgroup.c:3839:36: warning: 'cgroup_pidlist_seq_operations' defined but not used [-Wunused-const-variable=] static const struct seq_operations cgroup_pidlist_seq_operations = { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ net/core/net-sysfs.c:30:19: warning: 'fmt_long_hex' defined but not used [-Wunused-const-variable=] static const char fmt_long_hex[] = "%#lx\n"; ^~~~~~~~~~~~ net/core/rtnetlink.c:1266:32: warning: 'ifla_vf_policy' defined but not used [-Wunused-const-variable=] static const struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = { ^~~~~~~~~~~~~~ net/core/rtnetlink.c:1262:32: warning: 'ifla_vfinfo_policy' defined but not used [-Wunused-const-variable=] static const struct nla_policy ifla_vfinfo_policy[IFLA_VF_INFO_MAX+1] = { ^~~~~~~~~~~~~~~~~~ net/core/sysctl_net_core.c:26:12: warning: 'one' defined but not used [-Wunused-variable] static int one = 1; ^~~ net/ipv4/ping.c:1148:36: warning: 'ping_v4_seq_ops' defined but not used [-Wunused-const-variable=] static const struct seq_operations ping_v4_seq_ops = { ^~~~~~~~~~~~~~~ net/rfkill/rfkill-gpio.c:187:36: warning: 'rfkill_acpi_match' defined but not used [-Wunused-const-variable=] static const struct acpi_device_id rfkill_acpi_match[] = { drivers/net/wireless/rtlwifi/efuse.c:38:31: warning: 'RTL8712_SDIO_EFUSE_TABLE' defined but not used [-Wunused-const-variable=] static const struct efuse_map RTL8712_SDIO_EFUSE_TABLE[] = { ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/net/wireless/rtlwifi/efuse.c:34:17: warning: 'MAX_PGPKT_SIZE' defined but not used [-Wunused-const-variable=] static const u8 MAX_PGPKT_SIZE = 9; ^~~~~~~~~~~~~~ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Stefan Agner <stefan.agner@toradex.com>
-rw-r--r--drivers/media/platform/mxc/capture/ov5640_mipi.c2
-rw-r--r--drivers/net/usb/usbnet.c2
-rw-r--r--drivers/net/wireless/rtlwifi/efuse.c4
-rw-r--r--fs/cifs/netmisc.c2
-rw-r--r--kernel/cgroup.c2
-rw-r--r--net/core/net-sysfs.c2
-rw-r--r--net/core/rtnetlink.c5
-rw-r--r--net/core/sysctl_net_core.c2
-rw-r--r--net/ipv4/arp.c2
-rw-r--r--net/ipv4/ping.c2
-rw-r--r--net/rfkill/rfkill-gpio.c2
11 files changed, 14 insertions, 13 deletions
diff --git a/drivers/media/platform/mxc/capture/ov5640_mipi.c b/drivers/media/platform/mxc/capture/ov5640_mipi.c
index 3d77dc7..614ae35 100644
--- a/drivers/media/platform/mxc/capture/ov5640_mipi.c
+++ b/drivers/media/platform/mxc/capture/ov5640_mipi.c
@@ -876,7 +876,7 @@ static void OV5640_stream_off(void)
ov5640_write_reg(0x4202, 0x0f);
}
-static const int sclk_rdiv_map[] = {1, 2, 4, 8};
+static const int sclk_rdiv_map[] __maybe_unused = {1, 2, 4, 8};
static int OV5640_get_sysclk(void)
{
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index f9e96c4..6ffb1e5 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -81,7 +81,7 @@
// randomly generated ethernet address
static u8 node_id [ETH_ALEN];
-static const char driver_name [] = "usbnet";
+static const char driver_name [] __maybe_unused = "usbnet";
/* use ethtool to change the level for any given device */
static int msg_level = -1;
diff --git a/drivers/net/wireless/rtlwifi/efuse.c b/drivers/net/wireless/rtlwifi/efuse.c
index 2ffc729..b9de983 100644
--- a/drivers/net/wireless/rtlwifi/efuse.c
+++ b/drivers/net/wireless/rtlwifi/efuse.c
@@ -31,11 +31,11 @@
#include "wifi.h"
#include "efuse.h"
-static const u8 MAX_PGPKT_SIZE = 9;
+static const u8 MAX_PGPKT_SIZE __maybe_unused = 9;
static const u8 PGPKT_DATA_SIZE = 8;
static const int EFUSE_MAX_SIZE = 512;
-static const struct efuse_map RTL8712_SDIO_EFUSE_TABLE[] = {
+static const struct efuse_map RTL8712_SDIO_EFUSE_TABLE[] __maybe_unused = {
{0, 0, 0, 2},
{0, 1, 0, 2},
{0, 2, 0, 2},
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c
index 0498845..12220f0 100644
--- a/fs/cifs/netmisc.c
+++ b/fs/cifs/netmisc.c
@@ -130,7 +130,7 @@ static const struct smb_to_posix_error mapping_table_ERRSRV[] = {
{0, 0}
};
-static const struct smb_to_posix_error mapping_table_ERRHRD[] = {
+static const struct smb_to_posix_error mapping_table_ERRHRD[] __maybe_unused = {
{0, 0}
};
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 18711f3..4380ca0 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -3836,7 +3836,7 @@ static int cgroup_pidlist_show(struct seq_file *s, void *v)
* seq_operations functions for iterating on pidlists through seq_file -
* independent of whether it's tasks or procs
*/
-static const struct seq_operations cgroup_pidlist_seq_operations = {
+static const struct seq_operations cgroup_pidlist_seq_operations __maybe_unused = {
.start = cgroup_pidlist_start,
.stop = cgroup_pidlist_stop,
.next = cgroup_pidlist_next,
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index 9388624..abcd3c5 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -27,7 +27,7 @@
#ifdef CONFIG_SYSFS
static const char fmt_hex[] = "%#x\n";
-static const char fmt_long_hex[] = "%#lx\n";
+static const char fmt_long_hex[] __maybe_unused = "%#lx\n";
static const char fmt_dec[] = "%d\n";
static const char fmt_udec[] = "%u\n";
static const char fmt_ulong[] = "%lu\n";
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 8aadd6a..ad239f0 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -1259,11 +1259,12 @@ static const struct nla_policy ifla_info_policy[IFLA_INFO_MAX+1] = {
[IFLA_INFO_SLAVE_DATA] = { .type = NLA_NESTED },
};
-static const struct nla_policy ifla_vfinfo_policy[IFLA_VF_INFO_MAX+1] = {
+static const struct nla_policy ifla_vfinfo_policy[IFLA_VF_INFO_MAX+1]
+ __maybe_unused= {
[IFLA_VF_INFO] = { .type = NLA_NESTED },
};
-static const struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] = {
+static const struct nla_policy ifla_vf_policy[IFLA_VF_MAX+1] __maybe_unused = {
[IFLA_VF_MAC] = { .len = sizeof(struct ifla_vf_mac) },
[IFLA_VF_VLAN] = { .len = sizeof(struct ifla_vf_vlan) },
[IFLA_VF_TX_RATE] = { .len = sizeof(struct ifla_vf_tx_rate) },
diff --git a/net/core/sysctl_net_core.c b/net/core/sysctl_net_core.c
index e731c96..145b90f 100644
--- a/net/core/sysctl_net_core.c
+++ b/net/core/sysctl_net_core.c
@@ -23,7 +23,7 @@
#include <net/pkt_sched.h>
static int zero = 0;
-static int one = 1;
+static int one __maybe_unused = 1;
static int ushort_max = USHRT_MAX;
static int min_sndbuf = SOCK_MIN_SNDBUF;
static int min_rcvbuf = SOCK_MIN_RCVBUF;
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 1a9b99e..4856bb2 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -149,7 +149,7 @@ static const struct neigh_ops arp_direct_ops = {
.connected_output = neigh_direct_output,
};
-static const struct neigh_ops arp_broken_ops = {
+static const struct neigh_ops arp_broken_ops __maybe_unused = {
.family = AF_INET,
.solicit = arp_solicit,
.error_report = arp_error_report,
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 1e2e9bf..2478d8f 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -1145,7 +1145,7 @@ static int ping_v4_seq_show(struct seq_file *seq, void *v)
return 0;
}
-static const struct seq_operations ping_v4_seq_ops = {
+static const struct seq_operations ping_v4_seq_ops __maybe_unused= {
.show = ping_v4_seq_show,
.start = ping_v4_seq_start,
.next = ping_seq_next,
diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
index bd2a5b9..06adeca 100644
--- a/net/rfkill/rfkill-gpio.c
+++ b/net/rfkill/rfkill-gpio.c
@@ -184,7 +184,7 @@ static int rfkill_gpio_remove(struct platform_device *pdev)
return 0;
}
-static const struct acpi_device_id rfkill_acpi_match[] = {
+static const struct acpi_device_id rfkill_acpi_match[] __maybe_unused = {
{ "BCM4752", RFKILL_TYPE_GPS },
{ },
};