netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] bna: make ethtool_ops and strings const
       [not found] <20120104230222.355802239@vyatta.com>
@ 2012-01-04 23:02 ` Stephen Hemminger
  2012-01-05 18:23   ` David Miller
  2012-01-04 23:02 ` [PATCH 2/2] bna: fix sparse warnings/errors Stephen Hemminger
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2012-01-04 23:02 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: netdev

[-- Attachment #1: bna-ethtool-ops.patch --]
[-- Type: text/plain, Size: 813 bytes --]

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/drivers/net/ethernet/brocade/bna/bnad_ethtool.c	2011-12-23 21:06:15.724436897 -0800
+++ b/drivers/net/ethernet/brocade/bna/bnad_ethtool.c	2012-01-04 14:22:02.403250833 -0800
@@ -38,7 +38,7 @@
 	sizeof(struct bnad_drv_stats) / sizeof(u64) +		\
 	offsetof(struct bfi_enet_stats, rxf_stats[0]) / sizeof(u64))
 
-static char *bnad_net_stats_strings[BNAD_ETHTOOL_STATS_NUM] = {
+static const char *bnad_net_stats_strings[BNAD_ETHTOOL_STATS_NUM] = {
 	"rx_packets",
 	"tx_packets",
 	"rx_bytes",
@@ -1072,7 +1072,7 @@ done:
 	return ret;
 }
 
-static struct ethtool_ops bnad_ethtool_ops = {
+static const struct ethtool_ops bnad_ethtool_ops = {
 	.get_settings = bnad_get_settings,
 	.set_settings = bnad_set_settings,
 	.get_drvinfo = bnad_get_drvinfo,

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

* [PATCH 2/2] bna: fix sparse warnings/errors
       [not found] <20120104230222.355802239@vyatta.com>
  2012-01-04 23:02 ` [PATCH 1/2] bna: make ethtool_ops and strings const Stephen Hemminger
@ 2012-01-04 23:02 ` Stephen Hemminger
  2012-01-05 18:23   ` David Miller
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Hemminger @ 2012-01-04 23:02 UTC (permalink / raw)
  To: Rasesh Mody; +Cc: netdev

[-- Attachment #1: bna-sparse.patch --]
[-- Type: text/plain, Size: 2579 bytes --]

This fixes a several sparse warnings.
  * the __iomem tag was being used incorrectly (needs to be a prefix)
  * several variables should have been static since local to one file
  * the firmware was not being forwared declared
    and was const one place and not the other

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
 drivers/net/ethernet/brocade/bna/bna_types.h |    6 +++---
 drivers/net/ethernet/brocade/bna/bnad.c      |    6 +++---
 drivers/net/ethernet/brocade/bna/bnad.h      |    2 +-
 drivers/net/ethernet/brocade/bna/cna_fwimg.c |    1 +
 4 files changed, 8 insertions(+), 7 deletions(-)

--- a/drivers/net/ethernet/brocade/bna/bnad.c	2011-12-23 21:06:15.720436866 -0800
+++ b/drivers/net/ethernet/brocade/bna/bnad.c	2012-01-04 14:25:57.474471816 -0800
@@ -53,9 +53,9 @@ MODULE_PARM_DESC(bna_debugfs_enable, "En
  * Global variables
  */
 u32 bnad_rxqs_per_cq = 2;
-u32 bna_id;
-struct mutex bnad_list_mutex;
-LIST_HEAD(bnad_list);
+static u32 bna_id;
+static struct mutex bnad_list_mutex;
+static LIST_HEAD(bnad_list);
 static const u8 bnad_bcast_addr[] =  {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
 /*
--- a/drivers/net/ethernet/brocade/bna/bna_types.h	2011-12-23 21:06:15.720436866 -0800
+++ b/drivers/net/ethernet/brocade/bna/bna_types.h	2012-01-04 14:46:00.232255609 -0800
@@ -427,7 +427,7 @@ struct bna_ethport {
 
 /* Doorbell structure */
 struct bna_ib_dbell {
-	void *__iomem doorbell_addr;
+	void __iomem   *doorbell_addr;
 	u32		doorbell_ack;
 };
 
@@ -463,7 +463,7 @@ struct bna_tcb {
 	u32		consumer_index;
 	volatile u32	*hw_consumer_index;
 	u32		q_depth;
-	void *__iomem q_dbell;
+	void __iomem   *q_dbell;
 	struct bna_ib_dbell *i_dbell;
 	int			page_idx;
 	int			page_count;
@@ -599,7 +599,7 @@ struct bna_rcb {
 	u32		producer_index;
 	u32		consumer_index;
 	u32		q_depth;
-	void *__iomem q_dbell;
+	void __iomem   *q_dbell;
 	int			page_idx;
 	int			page_count;
 	/* Control path */
--- a/drivers/net/ethernet/brocade/bna/bnad.h	2011-12-23 21:06:15.724436897 -0800
+++ b/drivers/net/ethernet/brocade/bna/bnad.h	2012-01-04 14:37:34.562824877 -0800
@@ -347,7 +347,7 @@ struct bnad_drvinfo {
 /*
  * EXTERN VARIABLES
  */
-extern struct firmware *bfi_fw;
+extern const struct firmware *bfi_fw;
 extern u32		bnad_rxqs_per_cq;
 
 /*
--- a/drivers/net/ethernet/brocade/bna/cna_fwimg.c	2011-12-07 10:54:18.724278422 -0800
+++ b/drivers/net/ethernet/brocade/bna/cna_fwimg.c	2012-01-04 14:30:33.165920654 -0800
@@ -16,6 +16,7 @@
  * www.brocade.com
  */
 #include <linux/firmware.h>
+#include "bnad.h"
 #include "bfi.h"
 #include "cna.h"
 

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

* Re: [PATCH 1/2] bna: make ethtool_ops and strings const
  2012-01-04 23:02 ` [PATCH 1/2] bna: make ethtool_ops and strings const Stephen Hemminger
@ 2012-01-05 18:23   ` David Miller
  2012-01-05 18:28     ` Rasesh Mody
  0 siblings, 1 reply; 5+ messages in thread
From: David Miller @ 2012-01-05 18:23 UTC (permalink / raw)
  To: shemminger; +Cc: rmody, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 04 Jan 2012 15:02:23 -0800

> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* Re: [PATCH 2/2] bna: fix sparse warnings/errors
  2012-01-04 23:02 ` [PATCH 2/2] bna: fix sparse warnings/errors Stephen Hemminger
@ 2012-01-05 18:23   ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2012-01-05 18:23 UTC (permalink / raw)
  To: shemminger; +Cc: rmody, netdev

From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 04 Jan 2012 15:02:24 -0800

> This fixes a several sparse warnings.
>   * the __iomem tag was being used incorrectly (needs to be a prefix)
>   * several variables should have been static since local to one file
>   * the firmware was not being forwared declared
>     and was const one place and not the other
> 
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

Applied.

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

* RE: [PATCH 1/2] bna: make ethtool_ops and strings const
  2012-01-05 18:23   ` David Miller
@ 2012-01-05 18:28     ` Rasesh Mody
  0 siblings, 0 replies; 5+ messages in thread
From: Rasesh Mody @ 2012-01-05 18:28 UTC (permalink / raw)
  To: David Miller, shemminger@vyatta.com; +Cc: netdev@vger.kernel.org

>From: David Miller [mailto:davem@davemloft.net]
>Sent: Thursday, January 05, 2012 10:24 AM
>
>From: Stephen Hemminger <shemminger@vyatta.com>
>Date: Wed, 04 Jan 2012 15:02:23 -0800
>
>> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
>
>Applied.

Thanks Stephen, David!
--Rasesh

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

end of thread, other threads:[~2012-01-05 18:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120104230222.355802239@vyatta.com>
2012-01-04 23:02 ` [PATCH 1/2] bna: make ethtool_ops and strings const Stephen Hemminger
2012-01-05 18:23   ` David Miller
2012-01-05 18:28     ` Rasesh Mody
2012-01-04 23:02 ` [PATCH 2/2] bna: fix sparse warnings/errors Stephen Hemminger
2012-01-05 18:23   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).