Re: [PATCH] jump_label: constify jump_label_text_reserved andfriends

From: Steven Rostedt
Date: Mon Jan 07 2013 - 17:23:20 EST


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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/