lkml.org 
[lkml]   [2014]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/5] mtd: st_spi_fsm: Remove useless consts from function arguments
From
Date
On Thu, 2014-03-20 at 11:41 +0000, Lee Jones wrote:
> On Thu, 20 Mar 2014, Joe Perches wrote:
>
> > On Thu, 2014-03-20 at 11:11 +0000, Lee Jones wrote:
> > > Reported-by: Brian Norris <computersforpeace@gmail.com>
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> >
> > 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.
>
> https://lkml.org/lkml/2014/3/20/69
>

From that email:

suggestion:

const uint8_t *const buf => const uint8_t *buf
const uint32_t size => uint32_t size
const uint32_t offset => uint32_t offset

What was done:

-static int stfsm_write_fifo(struct stfsm *fsm,
- const uint32_t *buf, const uint32_t size)
+static int stfsm_write_fifo(struct stfsm *fsm, uint32_t *buf, uint32_t size)

Note the removal of the const from uint32_t *buf

Why?




\
 
 \ /
  Last update: 2014-03-20 13:21    [W:0.102 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site