Re: [PATCH 25/26] pch_gbe: constify local structures

2016-09-12 Thread David Miller
From: Julia Lawall Date: Mon, 12 Sep 2016 11:07:15 +0200 (CEST) > So foo is protected, but its lifetime of interest is quite short. But we > can't set the ops field of the type of xxx to be const either, because it > is obviously not - the code above modifies it. You can

Re: [PATCH 25/26] pch_gbe: constify local structures

2016-09-12 Thread David Miller
From: Julia Lawall Date: Mon, 12 Sep 2016 11:07:15 +0200 (CEST) > So foo is protected, but its lifetime of interest is quite short. But we > can't set the ops field of the type of xxx to be const either, because it > is obviously not - the code above modifies it. You can definitely make it a

Re: [PATCH 25/26] pch_gbe: constify local structures

2016-09-12 Thread Julia Lawall
On Sun, 11 Sep 2016, Julia Lawall wrote: > For structure types defined in the same file or local header files, find > top-level static structure declarations that have the following > properties: > 1. Never reassigned. > 2. Address never taken > 3. Not passed to a top-level macro call > 4. No

Re: [PATCH 25/26] pch_gbe: constify local structures

2016-09-12 Thread Julia Lawall
On Sun, 11 Sep 2016, Julia Lawall wrote: > For structure types defined in the same file or local header files, find > top-level static structure declarations that have the following > properties: > 1. Never reassigned. > 2. Address never taken > 3. Not passed to a top-level macro call > 4. No

Re: [PATCH 25/26] pch_gbe: constify local structures

2016-09-12 Thread Julia Lawall
On Sun, 11 Sep 2016, David Miller wrote: > > Julia, I went over the networking driver patches in this series and > I have to say that I'd rather see these changes be more durable > and self-checking. > > By this I mean that I want you to also make the driver private pointer > that holds these

Re: [PATCH 25/26] pch_gbe: constify local structures

2016-09-12 Thread Julia Lawall
On Sun, 11 Sep 2016, David Miller wrote: > > Julia, I went over the networking driver patches in this series and > I have to say that I'd rather see these changes be more durable > and self-checking. > > By this I mean that I want you to also make the driver private pointer > that holds these

Re: [PATCH 25/26] pch_gbe: constify local structures

2016-09-11 Thread David Miller
Julia, I went over the networking driver patches in this series and I have to say that I'd rather see these changes be more durable and self-checking. By this I mean that I want you to also make the driver private pointer that holds these structures be const too. Then if there are really any

Re: [PATCH 25/26] pch_gbe: constify local structures

2016-09-11 Thread David Miller
Julia, I went over the networking driver patches in this series and I have to say that I'd rather see these changes be more durable and self-checking. By this I mean that I want you to also make the driver private pointer that holds these structures be const too. Then if there are really any

[PATCH 25/26] pch_gbe: constify local structures

2016-09-11 Thread Julia Lawall
For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored

[PATCH 25/26] pch_gbe: constify local structures

2016-09-11 Thread Julia Lawall
For structure types defined in the same file or local header files, find top-level static structure declarations that have the following properties: 1. Never reassigned. 2. Address never taken 3. Not passed to a top-level macro call 4. No pointer or array-typed field passed to a function or stored