Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Brian Norris
On Thu, Mar 20, 2014 at 05:44:45AM -0700, Joe Perches wrote: > On Thu, 2014-03-20 at 05:41 -0700, Brian Norris wrote: > > I also don't think that a function parameter is the right place to > > mark const like this. Function arguments are always pass-by-value, so > > this 'const' tells users (caller

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Lee Jones
> > > Good catch. That wasn't my intention. > > > > Why? > > An oversight. > > That's still not an explanation. > > Why, unless cast away by the code itself, is > const removal a good thing? > > It does serve as an indication to a reader what > the code does with the argument. > > About the onl

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Joe Perches
On Thu, 2014-03-20 at 05:41 -0700, Brian Norris wrote: > I also don't think that a function parameter is the right place to > mark const like this. Function arguments are always pass-by-value, so > this 'const' tells users (callers) nothing useful. It only provides > useless constraints on what the

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Brian Norris
On Thu, Mar 20, 2014 at 5:13 AM, Joe Perches wrote: > On Thu, 2014-03-20 at 12:03 +, Lee Jones wrote: >> > Good catch. That wasn't my intention. >> > > Why? >> An oversight. > > That's still not an explanation. > > Why, unless cast away by the code itself, is > const removal a good thing? It'

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Joe Perches
On Thu, 2014-03-20 at 12:03 +, Lee Jones wrote: > > Good catch. That wasn't my intention. > > > Why? > An oversight. That's still not an explanation. Why, unless cast away by the code itself, is const removal a good thing? It does serve as an indication to a reader what the code does with th

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Brian Norris
On Thu, Mar 20, 2014 at 5:03 AM, Lee Jones wrote: >> Signed-off-by: Brian Norris > > Patch looks good to me: > Acked-by: Lee Jones Squashed into $SUBJECT patch and pushed to l2-mtd.git. Brian -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Lee Jones
> Good catch. That wasn't my intention. +1 > > Why? An oversight. > I can let Lee speak for himself. But I'm thinking I'll squash this diff > in, if no one minds: > > Signed-off-by: Brian Norris Patch looks good to me: Acked-by: Lee Jones -- Lee Jones Linaro STMicroelectronics Landing T

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Brian Norris
On Thu, Mar 20, 2014 at 04:48:10AM -0700, Joe Perches wrote: > On Thu, 2014-03-20 at 11:41 +, Lee Jones wrote: > > On Thu, 20 Mar 2014, Joe Perches wrote: > > > On Thu, 2014-03-20 at 11:11 +, Lee Jones wrote: > > > > Reported-by: Brian Norris > > > > Signed-off-by: Lee Jones > > > > > >

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Joe Perches
On Thu, 2014-03-20 at 11:41 +, Lee Jones wrote: > On Thu, 20 Mar 2014, Joe Perches wrote: > > > On Thu, 2014-03-20 at 11:11 +, Lee Jones wrote: > > > Reported-by: Brian Norris > > > Signed-off-by: Lee Jones > > > > Why are these useless? > > > > Even if the object code produced is the

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Lee Jones
On Thu, 20 Mar 2014, Joe Perches wrote: > On Thu, 2014-03-20 at 11:11 +, Lee Jones wrote: > > Reported-by: Brian Norris > > Signed-off-by: Lee Jones > > Why are these useless? > > Even if the object code produced is the same, > these serve as information to the human reader > about how the

Re: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Joe Perches
On Thu, 2014-03-20 at 11:11 +, Lee Jones wrote: > Reported-by: Brian Norris > Signed-off-by: Lee Jones Why are these useless? Even if the object code produced is the same, these serve as information to the human reader about how the arguments are used. -- To unsubscribe from this list: se

[PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments

2014-03-20 Thread Lee Jones
Reported-by: Brian Norris Signed-off-by: Lee Jones --- drivers/mtd/devices/st_spi_fsm.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/mtd/devices/st_spi_fsm.c b/drivers/mtd/devices/st_spi_fsm.c index aefd48d..dcc1dc3 100644 --- a/drivers/mtd/devices/st_