* [PATCH] hid-debug.c: make local symbols static
@ 2010-01-15 2:10 H Hartley Sweeten
2010-01-15 10:36 ` Jiri Kosina
0 siblings, 1 reply; 2+ messages in thread
From: H Hartley Sweeten @ 2010-01-15 2:10 UTC (permalink / raw)
To: Linux Kernel, linux-input; +Cc: jkosina
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?
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Jiri Kosina <jkosina@suse.cz>
---
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
index 6abd036..cd4ece6 100644
--- a/drivers/hid/hid-debug.c
+++ b/drivers/hid/hid-debug.c
@@ -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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] hid-debug.c: make local symbols static
2010-01-15 2:10 [PATCH] hid-debug.c: make local symbols static H Hartley Sweeten
@ 2010-01-15 10:36 ` Jiri Kosina
0 siblings, 0 replies; 2+ messages in thread
From: Jiri Kosina @ 2010-01-15 10:36 UTC (permalink / raw)
To: H Hartley Sweeten; +Cc: Linux Kernel, linux-input
On Thu, 14 Jan 2010, H Hartley Sweeten wrote:
> 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?
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Jiri Kosina <jkosina@suse.cz>
>
> ---
>
> diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c
> index 6abd036..cd4ece6 100644
> --- a/drivers/hid/hid-debug.c
> +++ b/drivers/hid/hid-debug.c
> @@ -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, thanks.
--
Jiri Kosina
SUSE Labs, Novell Inc.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-15 10:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-15 2:10 [PATCH] hid-debug.c: make local symbols static H Hartley Sweeten
2010-01-15 10:36 ` Jiri Kosina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox