lkml.org 
[lkml]   [2013]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/5] jump label: constify lookup functions
On 01/18/2013 04:25 PM, Steven Rostedt wrote:
> On Wed, 2013-01-09 at 18:09 -0500, Sasha Levin wrote:
>> Modify the parameters of all the lookup and the bookkeeping functions which
>> should be const to const.
>>
>> For example, jump_label_text_reserved() doesn't modify the memory it works on,
>> it just checks whether there are any jump labels there.
>
> This is dependent on the module patch, which Rusty is taking. I need to
> see that he has it before this can go in. At least see it in linux-next.
>
> Also, you should have Cc'd the linux-arch mailing list. I'll send it
> there.
>
>>
>> Note I couldn't test the non-x86 architectures, but the changes are rather
>> trivial.
>
> I ran it on 25 archs, and s390 hit:
>
> /work/autotest/nobackup/cross-linux.git/arch/s390/kernel/jump_label.c: In function 'arch_jump_label_transform':
> /work/autotest/nobackup/cross-linux.git/arch/s390/kernel/jump_label.c:58:13: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
>
> -- Steve
>
> Here's the patch:
>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
>
> diff --git a/arch/s390/kernel/jump_label.c
> b/arch/s390/kernel/jump_label.c
> index 85fa643..ef047ef 100644
> --- a/arch/s390/kernel/jump_label.c
> +++ b/arch/s390/kernel/jump_label.c
> @@ -18,7 +18,7 @@ struct insn {
> } __packed;
>
> struct insn_args {
> - struct jump_entry *entry;
> + const struct jump_entry *entry;
> enum jump_label_type type;
> };
>

Sorry about this. I didn't have the ability to build all arches over here :(

Would you like me to resend this patch with your fix?


Thanks,
Sasha



\
 
 \ /
  Last update: 2013-01-25 05:41    [W:0.088 / U:0.628 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site