public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* usb: gadget: midi: f_midi_alloc() can be static
       [not found] <201411121904.vA8htDl2%fengguang.wu@intel.com>
@ 2014-11-12 13:28 ` Fengguang Wu
  2014-11-12 15:00   ` Felipe Balbi
  0 siblings, 1 reply; 2+ messages in thread
From: Fengguang Wu @ 2014-11-12 13:28 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: Andrzej Pietrasiewicz, LKML

drivers/usb/gadget/function/f_midi.c:1072:21: sparse: symbol 'f_midi_alloc' was not declared. Should it be static?
drivers/usb/gadget/legacy/gmidi.c:118:30: sparse: symbol 'fi_midi' was not declared. Should it be static?
drivers/usb/gadget/legacy/gmidi.c:119:21: sparse: symbol 'f_midi' was not declared. Should it be static?

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 function/f_midi.c |    2 +-
 legacy/gmidi.c    |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Index: linux/drivers/usb/gadget/function/f_midi.c
===================================================================
--- linux.orig/drivers/usb/gadget/function/f_midi.c
+++ linux/drivers/usb/gadget/function/f_midi.c
@@ -1069,7 +1069,7 @@ static void f_midi_unbind(struct usb_con
 	usb_free_all_descriptors(f);
 }
 
-struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
+static struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
 {
 	struct f_midi *midi;
 	struct f_midi_opts *opts;
Index: linux/drivers/usb/gadget/legacy/gmidi.c
===================================================================
--- linux.orig/drivers/usb/gadget/legacy/gmidi.c
+++ linux/drivers/usb/gadget/legacy/gmidi.c
@@ -115,8 +115,8 @@ static struct usb_gadget_strings *dev_st
 	NULL,
 };
 
-struct usb_function_instance *fi_midi;
-struct usb_function *f_midi;
+static struct usb_function_instance *fi_midi;
+static struct usb_function *f_midi;
 
 static int __exit midi_unbind(struct usb_composite_dev *dev)
 {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: usb: gadget: midi: f_midi_alloc() can be static
  2014-11-12 13:28 ` usb: gadget: midi: f_midi_alloc() can be static Fengguang Wu
@ 2014-11-12 15:00   ` Felipe Balbi
  0 siblings, 0 replies; 2+ messages in thread
From: Felipe Balbi @ 2014-11-12 15:00 UTC (permalink / raw)
  To: Fengguang Wu
  Cc: Felipe Balbi, Andrzej Pietrasiewicz, LKML, Linux USB Mailing List

[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]

On Wed, Nov 12, 2014 at 09:28:24PM +0800, Fengguang Wu wrote:
> drivers/usb/gadget/function/f_midi.c:1072:21: sparse: symbol 'f_midi_alloc' was not declared. Should it be static?
> drivers/usb/gadget/legacy/gmidi.c:118:30: sparse: symbol 'fi_midi' was not declared. Should it be static?
> drivers/usb/gadget/legacy/gmidi.c:119:21: sparse: symbol 'f_midi' was not declared. Should it be static?
> 
> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>

I'm taking this one, but next time please Cc linux-usb

> ---
>  function/f_midi.c |    2 +-
>  legacy/gmidi.c    |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> Index: linux/drivers/usb/gadget/function/f_midi.c
> ===================================================================
> --- linux.orig/drivers/usb/gadget/function/f_midi.c
> +++ linux/drivers/usb/gadget/function/f_midi.c
> @@ -1069,7 +1069,7 @@ static void f_midi_unbind(struct usb_con
>  	usb_free_all_descriptors(f);
>  }
>  
> -struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
> +static struct usb_function *f_midi_alloc(struct usb_function_instance *fi)
>  {
>  	struct f_midi *midi;
>  	struct f_midi_opts *opts;
> Index: linux/drivers/usb/gadget/legacy/gmidi.c
> ===================================================================
> --- linux.orig/drivers/usb/gadget/legacy/gmidi.c
> +++ linux/drivers/usb/gadget/legacy/gmidi.c
> @@ -115,8 +115,8 @@ static struct usb_gadget_strings *dev_st
>  	NULL,
>  };
>  
> -struct usb_function_instance *fi_midi;
> -struct usb_function *f_midi;
> +static struct usb_function_instance *fi_midi;
> +static struct usb_function *f_midi;
>  
>  static int __exit midi_unbind(struct usb_composite_dev *dev)
>  {

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-11-12 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <201411121904.vA8htDl2%fengguang.wu@intel.com>
2014-11-12 13:28 ` usb: gadget: midi: f_midi_alloc() can be static Fengguang Wu
2014-11-12 15:00   ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox