From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932780AbdBIVwb (ORCPT ); Thu, 9 Feb 2017 16:52:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54046 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753938AbdBIVwa (ORCPT ); Thu, 9 Feb 2017 16:52:30 -0500 Date: Thu, 9 Feb 2017 23:40:43 +0200 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: Jason Baron , Peter Zijlstra , Steven Rostedt , Borislav Petkov , Andrew Morton , Linus Torvalds , Thomas Gleixner , Mel Gorman , Ingo Molnar Subject: Re: [PATCH] jump_label: mark __start/stop___jump_table const Message-ID: <20170209234001-mutt-send-email-mst@kernel.org> References: <1486674463-25784-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1486674463-25784-1-git-send-email-mst@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 09 Feb 2017 21:40:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 09, 2017 at 11:11:32PM +0200, Michael S. Tsirkin wrote: > Attempts to assign values through these pointers would fail. > Mark them const to make sure the failure is compile time. > > Cc: Jason Baron > Cc: Peter Zijlstra > Cc: Steven Rostedt > Cc: Borislav Petkov > Cc: Andrew Morton > Cc: Linus Torvalds > Cc: Thomas Gleixner > Cc: Mel Gorman > Cc: Ingo Molnar > Signed-off-by: Michael S. Tsirkin Hmm this produces a bunch of warnings that I managed to somehow miss. Self-Nack. Pls disregard. > --- > include/linux/jump_label.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/linux/jump_label.h b/include/linux/jump_label.h > index a0547c5..48ed83f 100644 > --- a/include/linux/jump_label.h > +++ b/include/linux/jump_label.h > @@ -132,8 +132,8 @@ static __always_inline bool static_key_true(struct static_key *key) > return !arch_static_branch(key, true); > } > > -extern struct jump_entry __start___jump_table[]; > -extern struct jump_entry __stop___jump_table[]; > +extern const struct jump_entry __start___jump_table[]; > +extern const struct jump_entry __stop___jump_table[]; > > extern void jump_label_init(void); > extern void jump_label_lock(void); > -- > MST