diff mbox

fpga: fix sparse warnings in fpga-mgr and fpga-bridge

Message ID 20161202212305.19475-1-dinguyen@kernel.org (mailing list archive)
State Accepted
Headers show

Commit Message

Dinh Nguyen Dec. 2, 2016, 9:23 p.m. UTC
Fix up these sparse warnings:

drivers/fpga/fpga-mgr.c:189:21: warning: symbol '__fpga_mgr_get' was not
declared. Should it be static?
drivers/fpga/fpga-bridge.c:30:12: warning: symbol 'bridge_list_lock' was
not declared. Should it be static?

Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
---
 drivers/fpga/fpga-bridge.c | 2 +-
 drivers/fpga/fpga-mgr.c    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Moritz Fischer Dec. 3, 2016, 4:41 p.m. UTC | #1
On Fri, Dec 2, 2016 at 1:23 PM, Dinh Nguyen <dinguyen@kernel.org> wrote:
> Fix up these sparse warnings:
>
> drivers/fpga/fpga-mgr.c:189:21: warning: symbol '__fpga_mgr_get' was not
> declared. Should it be static?
> drivers/fpga/fpga-bridge.c:30:12: warning: symbol 'bridge_list_lock' was
> not declared. Should it be static?
>
> Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Acked-by: Moritz Fischer <mdf@kernel.org>

> ---
>  drivers/fpga/fpga-bridge.c | 2 +-
>  drivers/fpga/fpga-mgr.c    | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c
> index 33ee83e..e04a899 100644
> --- a/drivers/fpga/fpga-bridge.c
> +++ b/drivers/fpga/fpga-bridge.c
> @@ -27,7 +27,7 @@ static DEFINE_IDA(fpga_bridge_ida);
>  static struct class *fpga_bridge_class;
>
>  /* Lock for adding/removing bridges to linked lists*/
> -spinlock_t bridge_list_lock;
> +static spinlock_t bridge_list_lock;
>
>  static int fpga_bridge_of_node_match(struct device *dev, const void *data)
>  {
> diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
> index f0a69d3..32860dd 100644
> --- a/drivers/fpga/fpga-mgr.c
> +++ b/drivers/fpga/fpga-mgr.c
> @@ -186,7 +186,7 @@ static struct attribute *fpga_mgr_attrs[] = {
>  };
>  ATTRIBUTE_GROUPS(fpga_mgr);
>
> -struct fpga_manager *__fpga_mgr_get(struct device *dev)
> +static struct fpga_manager *__fpga_mgr_get(struct device *dev)
>  {
>         struct fpga_manager *mgr;
>         int ret = -ENODEV;
> --
> 2.8.3
>

Thanks,
Moritz
--
To unsubscribe from this list: send the line "unsubscribe linux-fpga" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alan Tull Dec. 4, 2016, 1:34 a.m. UTC | #2
On Sat, 3 Dec 2016, Moritz Fischer wrote:

> On Fri, Dec 2, 2016 at 1:23 PM, Dinh Nguyen <dinguyen@kernel.org> wrote:
> > Fix up these sparse warnings:
> >
> > drivers/fpga/fpga-mgr.c:189:21: warning: symbol '__fpga_mgr_get' was not
> > declared. Should it be static?
> > drivers/fpga/fpga-bridge.c:30:12: warning: symbol 'bridge_list_lock' was
> > not declared. Should it be static?
> >
> > Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
> Acked-by: Moritz Fischer <mdf@kernel.org>

Acked-by: Alan Tull <atull@opensource.altera.com>

> 
> > ---
> >  drivers/fpga/fpga-bridge.c | 2 +-
> >  drivers/fpga/fpga-mgr.c    | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c
> > index 33ee83e..e04a899 100644
> > --- a/drivers/fpga/fpga-bridge.c
> > +++ b/drivers/fpga/fpga-bridge.c
> > @@ -27,7 +27,7 @@ static DEFINE_IDA(fpga_bridge_ida);
> >  static struct class *fpga_bridge_class;
> >
> >  /* Lock for adding/removing bridges to linked lists*/
> > -spinlock_t bridge_list_lock;
> > +static spinlock_t bridge_list_lock;
> >
> >  static int fpga_bridge_of_node_match(struct device *dev, const void *data)
> >  {
> > diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
> > index f0a69d3..32860dd 100644
> > --- a/drivers/fpga/fpga-mgr.c
> > +++ b/drivers/fpga/fpga-mgr.c
> > @@ -186,7 +186,7 @@ static struct attribute *fpga_mgr_attrs[] = {
> >  };
> >  ATTRIBUTE_GROUPS(fpga_mgr);
> >
> > -struct fpga_manager *__fpga_mgr_get(struct device *dev)
> > +static struct fpga_manager *__fpga_mgr_get(struct device *dev)
> >  {
> >         struct fpga_manager *mgr;
> >         int ret = -ENODEV;
> > --
> > 2.8.3
> >
> 
> Thanks,
> Moritz
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-fpga" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/fpga/fpga-bridge.c b/drivers/fpga/fpga-bridge.c
index 33ee83e..e04a899 100644
--- a/drivers/fpga/fpga-bridge.c
+++ b/drivers/fpga/fpga-bridge.c
@@ -27,7 +27,7 @@  static DEFINE_IDA(fpga_bridge_ida);
 static struct class *fpga_bridge_class;
 
 /* Lock for adding/removing bridges to linked lists*/
-spinlock_t bridge_list_lock;
+static spinlock_t bridge_list_lock;
 
 static int fpga_bridge_of_node_match(struct device *dev, const void *data)
 {
diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
index f0a69d3..32860dd 100644
--- a/drivers/fpga/fpga-mgr.c
+++ b/drivers/fpga/fpga-mgr.c
@@ -186,7 +186,7 @@  static struct attribute *fpga_mgr_attrs[] = {
 };
 ATTRIBUTE_GROUPS(fpga_mgr);
 
-struct fpga_manager *__fpga_mgr_get(struct device *dev)
+static struct fpga_manager *__fpga_mgr_get(struct device *dev)
 {
 	struct fpga_manager *mgr;
 	int ret = -ENODEV;