linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i40e: constify i40e_client_ops structure
@ 2016-05-01 12:07 Julia Lawall
  2016-05-02  6:06 ` Leon Romanovsky
  2016-05-13 16:50 ` Doug Ledford
  0 siblings, 2 replies; 6+ messages in thread
From: Julia Lawall @ 2016-05-01 12:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: kernel-janitors, linux-rdma, Hal Rosenstock, Sean Hefty,
	Doug Ledford, Tatyana Nikolova, Shiraz Saleem, Mustafa Ismail,
	Chien Tin Tung, Faisal Latif, Jeff Kirsher, Jesse Brandeburg,
	Shannon Nelson, Carolyn Wyborny, Don Skidmore, Bruce Allan,
	John Ronciak, Mitch Williams, intel-wired-lan, netdev

The i40e_client_ops structure is never modified, so declare it as const.

Done with the help of Coccinelle.

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

---
 drivers/infiniband/hw/i40iw/i40iw_main.c      |    2 +-
 drivers/net/ethernet/intel/i40e/i40e_client.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/i40iw/i40iw_main.c b/drivers/infiniband/hw/i40iw/i40iw_main.c
index 90e5af2..e41fae24 100644
--- a/drivers/infiniband/hw/i40iw/i40iw_main.c
+++ b/drivers/infiniband/hw/i40iw/i40iw_main.c
@@ -1863,7 +1863,7 @@ static enum i40iw_status_code i40iw_virtchnl_send(struct i40iw_sc_dev *dev,
 }
 
 /* client interface functions */
-static struct i40e_client_ops i40e_ops = {
+static const struct i40e_client_ops i40e_ops = {
 	.open = i40iw_open,
 	.close = i40iw_close,
 	.l2_param_change = i40iw_l2param_change,
diff --git a/drivers/net/ethernet/intel/i40e/i40e_client.h b/drivers/net/ethernet/intel/i40e/i40e_client.h
index bf6b453..a4601d9 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_client.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_client.h
@@ -217,7 +217,7 @@ struct i40e_client {
 #define I40E_CLIENT_FLAGS_LAUNCH_ON_PROBE	BIT(0)
 #define I40E_TX_FLAGS_NOTIFY_OTHER_EVENTS	BIT(2)
 	enum i40e_client_type type;
-	struct i40e_client_ops *ops;	/* client ops provided by the client */
+	const struct i40e_client_ops *ops; /* client ops provided by the client */
 };
 
 static inline bool i40e_client_is_registered(struct i40e_client *client)

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

* Re: [PATCH] i40e: constify i40e_client_ops structure
  2016-05-01 12:07 [PATCH] i40e: constify i40e_client_ops structure Julia Lawall
@ 2016-05-02  6:06 ` Leon Romanovsky
  2016-05-13 16:50 ` Doug Ledford
  1 sibling, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2016-05-02  6:06 UTC (permalink / raw)
  To: Julia Lawall
  Cc: linux-kernel, kernel-janitors, linux-rdma, Hal Rosenstock,
	Sean Hefty, Doug Ledford, Tatyana Nikolova, Shiraz Saleem,
	Mustafa Ismail, Chien Tin Tung, Faisal Latif, Jeff Kirsher,
	Jesse Brandeburg, Shannon Nelson, Carolyn Wyborny, Don Skidmore,
	Bruce Allan, John Ronciak, Mitch Williams, intel-wired-lan,
	netdev

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

On Sun, May 01, 2016 at 02:07:23PM +0200, Julia Lawall wrote:
> The i40e_client_ops structure is never modified, so declare it as const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 

Thanks Julia,

Reviewed-by: Leon Romanovsky <leonro@mellanox.com>

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

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

* Re: [PATCH] i40e: constify i40e_client_ops structure
  2016-05-01 12:07 [PATCH] i40e: constify i40e_client_ops structure Julia Lawall
  2016-05-02  6:06 ` Leon Romanovsky
@ 2016-05-13 16:50 ` Doug Ledford
  2016-05-13 19:40   ` Jeff Kirsher
  1 sibling, 1 reply; 6+ messages in thread
From: Doug Ledford @ 2016-05-13 16:50 UTC (permalink / raw)
  To: Julia Lawall, linux-kernel
  Cc: kernel-janitors, linux-rdma, Hal Rosenstock, Sean Hefty,
	Tatyana Nikolova, Shiraz Saleem, Mustafa Ismail, Chien Tin Tung,
	Faisal Latif, Jeff Kirsher, Jesse Brandeburg, Shannon Nelson,
	Carolyn Wyborny, Don Skidmore, Bruce Allan, John Ronciak,
	Mitch Williams, intel-wired-lan, netdev

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

On 05/01/2016 08:07 AM, Julia Lawall wrote:
> The i40e_client_ops structure is never modified, so declare it as const.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Thanks, applied.


-- 
Doug Ledford <dledford@redhat.com>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

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

* Re: [PATCH] i40e: constify i40e_client_ops structure
  2016-05-13 16:50 ` Doug Ledford
@ 2016-05-13 19:40   ` Jeff Kirsher
  2016-05-13 19:46     ` Julia Lawall
  2016-05-13 20:42     ` Doug Ledford
  0 siblings, 2 replies; 6+ messages in thread
From: Jeff Kirsher @ 2016-05-13 19:40 UTC (permalink / raw)
  To: Doug Ledford, Julia Lawall, linux-kernel
  Cc: kernel-janitors, linux-rdma, Hal Rosenstock, Sean Hefty,
	Tatyana Nikolova, Shiraz Saleem, Mustafa Ismail, Chien Tin Tung,
	Faisal Latif, Jesse Brandeburg, Shannon Nelson, Carolyn Wyborny,
	Don Skidmore, Bruce Allan, John Ronciak, Mitch Williams,
	intel-wired-lan, netdev

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

On Fri, 2016-05-13 at 12:50 -0400, Doug Ledford wrote:
> On 05/01/2016 08:07 AM, Julia Lawall wrote:
> > The i40e_client_ops structure is never modified, so declare it as
> const.
> > 
> > Done with the help of Coccinelle.
> > 
> > Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> Thanks, applied.

I already have this patch queued up to push through David Miller's net-next 
tree.

Julia- please do not shotgun blast several maintainers and several lists,
it causes confusion on who is *REALLY* going to accept and apply the patch.
Please use scripts/get_maintainer.pl to get the correct mailing lists and
maintainers to add to the To: and CC: lines.

[-- 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] i40e: constify i40e_client_ops structure
  2016-05-13 19:40   ` Jeff Kirsher
@ 2016-05-13 19:46     ` Julia Lawall
  2016-05-13 20:42     ` Doug Ledford
  1 sibling, 0 replies; 6+ messages in thread
From: Julia Lawall @ 2016-05-13 19:46 UTC (permalink / raw)
  To: Jeff Kirsher
  Cc: Doug Ledford, Julia Lawall, linux-kernel, kernel-janitors,
	linux-rdma, Hal Rosenstock, Sean Hefty, Tatyana Nikolova,
	Shiraz Saleem, Mustafa Ismail, Chien Tin Tung, Faisal Latif,
	Jesse Brandeburg, Shannon Nelson, Carolyn Wyborny, Don Skidmore,
	Bruce Allan, John Ronciak, Mitch Williams, intel-wired-lan,
	netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1062 bytes --]



On Fri, 13 May 2016, Jeff Kirsher wrote:

> On Fri, 2016-05-13 at 12:50 -0400, Doug Ledford wrote:
> > On 05/01/2016 08:07 AM, Julia Lawall wrote:
> > > The i40e_client_ops structure is never modified, so declare it as
> > const.
> > > 
> > > Done with the help of Coccinelle.
> > > 
> > > Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> > 
> > Thanks, applied.
> 
> I already have this patch queued up to push through David Miller's net-next 
> tree.
> 
> Julia- please do not shotgun blast several maintainers and several lists,
> it causes confusion on who is *REALLY* going to accept and apply the patch.
> Please use scripts/get_maintainer.pl to get the correct mailing lists and
> maintainers to add to the To: and CC: lines.

I do.  Probably the patch affects files maintained by different people.  
My assumption would be that everyone responsible for the code that is 
affected by the patch would want to see it.  Perhaps there would have been 
a way to separate it, but the const annotations typically have to be 
consistent everywhere.

julia

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

* Re: [PATCH] i40e: constify i40e_client_ops structure
  2016-05-13 19:40   ` Jeff Kirsher
  2016-05-13 19:46     ` Julia Lawall
@ 2016-05-13 20:42     ` Doug Ledford
  1 sibling, 0 replies; 6+ messages in thread
From: Doug Ledford @ 2016-05-13 20:42 UTC (permalink / raw)
  To: Jeff Kirsher, Julia Lawall, linux-kernel
  Cc: kernel-janitors, linux-rdma, Hal Rosenstock, Sean Hefty,
	Tatyana Nikolova, Shiraz Saleem, Mustafa Ismail, Chien Tin Tung,
	Faisal Latif, Jesse Brandeburg, Shannon Nelson, Carolyn Wyborny,
	Don Skidmore, Bruce Allan, John Ronciak, Mitch Williams,
	intel-wired-lan, netdev

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

On 05/13/2016 03:40 PM, Jeff Kirsher wrote:
> On Fri, 2016-05-13 at 12:50 -0400, Doug Ledford wrote:
>> On 05/01/2016 08:07 AM, Julia Lawall wrote:
>>> The i40e_client_ops structure is never modified, so declare it as
>> const.
>>>  
>>> Done with the help of Coccinelle.
>>>  
>>> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>>
>> Thanks, applied.
> 
> I already have this patch queued up to push through David Miller's net-next 
> tree.
> 
> Julia- please do not shotgun blast several maintainers and several lists,
> it causes confusion on who is *REALLY* going to accept and apply the patch.
> Please use scripts/get_maintainer.pl to get the correct mailing lists and
> maintainers to add to the To: and CC: lines.
> 

I've dropped it from my tree.  There won't be a conflict.

-- 
Doug Ledford <dledford@redhat.com>
              GPG KeyID: 0E572FDD



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]

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

end of thread, other threads:[~2016-05-13 20:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-01 12:07 [PATCH] i40e: constify i40e_client_ops structure Julia Lawall
2016-05-02  6:06 ` Leon Romanovsky
2016-05-13 16:50 ` Doug Ledford
2016-05-13 19:40   ` Jeff Kirsher
2016-05-13 19:46     ` Julia Lawall
2016-05-13 20:42     ` Doug Ledford

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).