All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ixgbe: constify ixgbe_mbx_operations structure
@ 2016-01-03  6:55 ` Julia Lawall
  0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2016-01-03  6:55 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: kernel-janitors, Jesse Brandeburg, Shannon Nelson,
	Carolyn Wyborny, Don Skidmore, Bruce Allan, John Ronciak,
	Mitch Williams, intel-wired-lan, netdev, linux-kernel

This ixgbe_mbx_operations structure is never modified, so declare it as
const.  The other structure of this type is already const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c  |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h  |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c
index 9993a47..4a769db 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c
@@ -446,7 +446,7 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
 }
 #endif /* CONFIG_PCI_IOV */
 
-struct ixgbe_mbx_operations mbx_ops_generic = {
+const struct ixgbe_mbx_operations mbx_ops_generic = {
 	.read                   = ixgbe_read_mbx_pf,
 	.write                  = ixgbe_write_mbx_pf,
 	.read_posted            = ixgbe_read_posted_mbx,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
index 8daa95f..9119cb8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
@@ -123,6 +123,6 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *, u16);
 void ixgbe_init_mbx_params_pf(struct ixgbe_hw *);
 #endif /* CONFIG_PCI_IOV */
 
-extern struct ixgbe_mbx_operations mbx_ops_generic;
+extern const struct ixgbe_mbx_operations mbx_ops_generic;
 
 #endif /* _IXGBE_MBX_H_ */
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 5f53cc6..0edc2c2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -3477,7 +3477,7 @@ struct ixgbe_info {
 	struct ixgbe_mac_operations	*mac_ops;
 	struct ixgbe_eeprom_operations	*eeprom_ops;
 	struct ixgbe_phy_operations	*phy_ops;
-	struct ixgbe_mbx_operations	*mbx_ops;
+	const struct ixgbe_mbx_operations *mbx_ops;
 	const u32			*mvals;
 };
 


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

* [PATCH] ixgbe: constify ixgbe_mbx_operations structure
@ 2016-01-03  6:55 ` Julia Lawall
  0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2016-01-03  6:55 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: kernel-janitors, Jesse Brandeburg, Shannon Nelson,
	Carolyn Wyborny, Don Skidmore, Bruce Allan, John Ronciak,
	Mitch Williams, intel-wired-lan, netdev, linux-kernel

This ixgbe_mbx_operations structure is never modified, so declare it as
const.  The other structure of this type is already const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c  |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h  |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c
index 9993a47..4a769db 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c
@@ -446,7 +446,7 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
 }
 #endif /* CONFIG_PCI_IOV */
 
-struct ixgbe_mbx_operations mbx_ops_generic = {
+const struct ixgbe_mbx_operations mbx_ops_generic = {
 	.read                   = ixgbe_read_mbx_pf,
 	.write                  = ixgbe_write_mbx_pf,
 	.read_posted            = ixgbe_read_posted_mbx,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
index 8daa95f..9119cb8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
@@ -123,6 +123,6 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *, u16);
 void ixgbe_init_mbx_params_pf(struct ixgbe_hw *);
 #endif /* CONFIG_PCI_IOV */
 
-extern struct ixgbe_mbx_operations mbx_ops_generic;
+extern const struct ixgbe_mbx_operations mbx_ops_generic;
 
 #endif /* _IXGBE_MBX_H_ */
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 5f53cc6..0edc2c2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -3477,7 +3477,7 @@ struct ixgbe_info {
 	struct ixgbe_mac_operations	*mac_ops;
 	struct ixgbe_eeprom_operations	*eeprom_ops;
 	struct ixgbe_phy_operations	*phy_ops;
-	struct ixgbe_mbx_operations	*mbx_ops;
+	const struct ixgbe_mbx_operations *mbx_ops;
 	const u32			*mvals;
 };
 


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

* [Intel-wired-lan] [PATCH] ixgbe: constify ixgbe_mbx_operations structure
@ 2016-01-03  6:55 ` Julia Lawall
  0 siblings, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2016-01-03  6:55 UTC (permalink / raw)
  To: intel-wired-lan

This ixgbe_mbx_operations structure is never modified, so declare it as
const.  The other structure of this type is already const.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c  |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h  |    2 +-
 drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c
index 9993a47..4a769db 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c
@@ -446,7 +446,7 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw)
 }
 #endif /* CONFIG_PCI_IOV */
 
-struct ixgbe_mbx_operations mbx_ops_generic = {
+const struct ixgbe_mbx_operations mbx_ops_generic = {
 	.read                   = ixgbe_read_mbx_pf,
 	.write                  = ixgbe_write_mbx_pf,
 	.read_posted            = ixgbe_read_posted_mbx,
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
index 8daa95f..9119cb8 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h
@@ -123,6 +123,6 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *, u16);
 void ixgbe_init_mbx_params_pf(struct ixgbe_hw *);
 #endif /* CONFIG_PCI_IOV */
 
-extern struct ixgbe_mbx_operations mbx_ops_generic;
+extern const struct ixgbe_mbx_operations mbx_ops_generic;
 
 #endif /* _IXGBE_MBX_H_ */
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
index 5f53cc6..0edc2c2 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
@@ -3477,7 +3477,7 @@ struct ixgbe_info {
 	struct ixgbe_mac_operations	*mac_ops;
 	struct ixgbe_eeprom_operations	*eeprom_ops;
 	struct ixgbe_phy_operations	*phy_ops;
-	struct ixgbe_mbx_operations	*mbx_ops;
+	const struct ixgbe_mbx_operations *mbx_ops;
 	const u32			*mvals;
 };
 


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

* Re: [PATCH] ixgbe: constify ixgbe_mbx_operations structure
  2016-01-03  6:55 ` Julia Lawall
  (?)
@ 2016-01-08  8:25   ` Jeff Kirsher
  -1 siblings, 0 replies; 6+ messages in thread
From: Jeff Kirsher @ 2016-01-08  8:25 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Jesse Brandeburg, Shannon Nelson,
	Carolyn Wyborny, Don Skidmore, Bruce Allan, John Ronciak,
	Mitch Williams, intel-wired-lan, netdev, linux-kernel

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

On Sun, 2016-01-03 at 07:55 +0100, Julia Lawall wrote:
> This ixgbe_mbx_operations structure is never modified, so declare it
> as
> const.  The other structure of this type is already const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c  |    2 +-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h  |    2 +-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

Dropping this patch since Mark has provided a more in-depth patch to
fix the entire driver.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH] ixgbe: constify ixgbe_mbx_operations structure
@ 2016-01-08  8:25   ` Jeff Kirsher
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Kirsher @ 2016-01-08  8:25 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Jesse Brandeburg, Shannon Nelson,
	Carolyn Wyborny, Don Skidmore, Bruce Allan, John Ronciak,
	Mitch Williams, intel-wired-lan, netdev, linux-kernel

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

On Sun, 2016-01-03 at 07:55 +0100, Julia Lawall wrote:
> This ixgbe_mbx_operations structure is never modified, so declare it
> as
> const.  The other structure of this type is already const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>  drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c  |    2 +-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h  |    2 +-
>  drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |    2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

Dropping this patch since Mark has provided a more in-depth patch to
fix the entire driver.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [Intel-wired-lan] [PATCH] ixgbe: constify ixgbe_mbx_operations structure
@ 2016-01-08  8:25   ` Jeff Kirsher
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff Kirsher @ 2016-01-08  8:25 UTC (permalink / raw)
  To: intel-wired-lan

On Sun, 2016-01-03 at 07:55 +0100, Julia Lawall wrote:
> This ixgbe_mbx_operations structure is never modified, so declare it
> as
> const.? The other structure of this type is already const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
> ?drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.c? |??? 2 +-
> ?drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h? |??? 2 +-
> ?drivers/net/ethernet/intel/ixgbe/ixgbe_type.h |??? 2 +-
> ?3 files changed, 3 insertions(+), 3 deletions(-)

Dropping this patch since Mark has provided a more in-depth patch to
fix the entire driver.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20160108/ea425693/attachment-0001.asc>

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

end of thread, other threads:[~2016-01-08  8:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-03  6:55 [PATCH] ixgbe: constify ixgbe_mbx_operations structure Julia Lawall
2016-01-03  6:55 ` [Intel-wired-lan] " Julia Lawall
2016-01-03  6:55 ` Julia Lawall
2016-01-08  8:25 ` Jeff Kirsher
2016-01-08  8:25   ` [Intel-wired-lan] " Jeff Kirsher
2016-01-08  8:25   ` Jeff Kirsher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.