Skip to contentSkip to conversation

hid-debug.c: make local symbols static

PATCH Applied H Hartley Sweeten 2 participants 2 messages Jan 15, 2010 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hid-debug.c: make local symbols static

hid-debug.c: make local symbols static

The symbols hid_resolv_event and hid_dump_input_mapping are only used locally in this file. Make them static to prevent the following sparse warnings:

warning: symbol 'hid_resolv_event' was not declared. Should it be static?
warning: symbol 'hid_dump_input_mapping' was not declared. Should it be static?

---

drivers/hid/hid-debug.c +3 -3
index 6abd036..cd4ece6 100644
@@ -864,13 +864,13 @@ static const char **names[EV_MAX + 1] = {
 	[EV_SND] = sounds,			[EV_REP] = repeats,
 };
 
-void hid_resolv_event(__u8 type, __u16 code, struct seq_file *f) {
-
+static void hid_resolv_event(__u8 type, __u16 code, struct seq_file *f)
+{
 	seq_printf(f, "%s.%s", events[type] ? events[type] : "?",
 		names[type] ? (names[type][code] ? names[type][code] : "?") : "?");
 }
 
-void hid_dump_input_mapping(struct hid_device *hid, struct seq_file *f)
+static void hid_dump_input_mapping(struct hid_device *hid, struct seq_file *f)
 {
 	int i, j, k;
 	struct hid_report *report;
Applied
#1 lore raw
Quoted 25 lines · H Hartley Sweeten

hid-debug.c: make local symbols static

The symbols hid_resolv_event and hid_dump_input_mapping are only used locally in this file. Make them static to prevent the following sparse warnings:

warning: symbol 'hid_resolv_event' was not declared. Should it be static?
warning: symbol 'hid_dump_input_mapping' was not declared. Should it be static?

---

drivers/hid/hid-debug.c +1 -2
index 6abd036..cd4ece6 100644
@@ -864,13 +864,13 @@ static const char **names[EV_MAX + 1] = {
 	[EV_SND] = sounds,			[EV_REP] = repeats,
 };
 
-void hid_resolv_event(__u8 type, __u16 code, struct seq_file *f) {
-
+static void hid_resolv_event(__u8 type, __u16 code, struct seq_file *f)

drivers/hid/hid-debug.c static const char **names[EV_MAX + 1] = { · line 876

Quoted 10 lines
drivers/hid/hid-debug.c +2 -1
+{
 	seq_printf(f, "%s.%s", events[type] ? events[type] : "?",
 		names[type] ? (names[type][code] ? names[type][code] : "?") : "?");
 }
 
-void hid_dump_input_mapping(struct hid_device *hid, struct seq_file *f)
+static void hid_dump_input_mapping(struct hid_device *hid, struct seq_file *f)
 {
 	int i, j, k;
 	struct hid_report *report;

Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs, Novell Inc.