From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753598AbdG2JVw (ORCPT ); Sat, 29 Jul 2017 05:21:52 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:37274 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753235AbdG2JVv (ORCPT ); Sat, 29 Jul 2017 05:21:51 -0400 X-IronPort-AV: E=Sophos;i="5.40,430,1496095200"; d="scan'208";a="233113453" Date: Sat, 29 Jul 2017 11:21:46 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Florian Westphal cc: linux-decnet-user@lists.sourceforge.net, bhumirks@gmail.com, kernel-janitors@vger.kernel.org, Pablo Neira Ayuso , Jozsef Kadlecsik , "David S. Miller" , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] constify nf_hook_ops structures In-Reply-To: <20170729091618.GF28392@breakpoint.cc> Message-ID: References: <1501310455-7896-1-git-send-email-Julia.Lawall@lip6.fr> <20170729084429.GE28392@breakpoint.cc> <20170729091618.GF28392@breakpoint.cc> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 29 Jul 2017, Florian Westphal wrote: > Julia Lawall wrote: > > > > > > On Sat, 29 Jul 2017, Florian Westphal wrote: > > > > > Julia Lawall wrote: > > > > The nf_hook_ops structure is only passed as the second argument to > > > > nf_register_net_hook or nf_unregister_net_hook, both of which are > > > > declared as const. Thus the nf_hook_ops structure itself can be > > > > const. > > > > > > Right, also see > > > http://patchwork.ozlabs.org/patch/793767/ > > > > > > This series misses most of them (all arrays perhaps)? > > > > Yes, my rule doesn't look for arrays. I guess they are all done already > > anyway? > > I think so (the patch is not yet applied though). OK, just drop my patch then. > > From a quick glance I don't see why we can't e.g. constify > nf_conntrack_l3/4_proto too. It is not going to be as simple > as just placing const everywhere, but I see no requirement for > having these writeable. I will take a look. thanks, julia > -- > To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >