lkml.org 
[lkml]   [2013]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] jump_label: constify jump_label_text_reserved and friends
From
Date
On Mon, 2013-01-07 at 11:40 -0500, Jason Baron wrote:
> On Mon, Jan 07, 2013 at 08:58:09AM -0500, Sasha Levin wrote:
> > jump_label_text_reserved() doesn't modify the memory it works on, it just
> > checks whether there are any jump labels there.
> >
> > Constify the parameters of it to prevent warnings when working with it.
> >
>
> I don't see any 'const' data passed to jump_label_text_reserved()? Where is the
> warning coming from? New users?

If the data is never going to be modified, then it's a good idea to add
const regardless of users. It's good documentation.


>
> Also, does this mean 'ftrace_text_reserved()' and 'alternatives_text_reserved()'
> need to be updated as well?

Yes, change these too.

Thanks!

-- Steve




\
 
 \ /
  Last update: 2013-01-08 00:02    [W:0.064 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site