From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mga14.intel.com ([192.55.52.115]:58531 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728458AbeHNR06 (ORCPT ); Tue, 14 Aug 2018 13:26:58 -0400 Message-ID: <72ebc0aac08fd1e82dfb09cc12a2c8321f302d49.camel@intel.com> (sfid-20180814_163933_723729_9E8F6797) Subject: Re: [Cocci] New release after 1.0.7? From: Luciano Coelho To: Julia Lawall Cc: cocci@systeme.lip6.fr, backports@vger.kernel.org Date: Tue, 14 Aug 2018 17:39:29 +0300 In-Reply-To: References: <32b52167e7dd5734ba4aa5f21aa1fddd257e6292.camel@intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: backports-owner@vger.kernel.org List-ID: On Tue, 2018-08-14 at 15:43 +0200, Julia Lawall wrote: > > I'm not sure it's a regression, but I just couldn't get the > > attributes > > to work with 1.0.6 either with and without Johannes' changes to > > upgrade > > it to the 1.0.6 syntax. > > > > This is the cocci that doesn't work (which is supposed to work with > > 1.0.6): > > > > https://git.kernel.org/pub/scm/linux/kernel/git/backports/backports.git/tree/patches/0027-genl-const/genl-const.cocci > > > > And, IIRC, this is the file that it's supposed to alter: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/wireless/nl80211.c > > With the current version, I get the diff below. Is it what you > expect? > > julia > > --- nl80211.c > +++ /tmp/cocci-output-11687-71a383-nl80211.c > @@ -48,7 +48,7 @@ enum nl80211_multicast_groups { > NL80211_MCGRP_TESTMODE /* keep last - ifdef! */ > }; > > -static const struct genl_multicast_group nl80211_mcgrps[] = { > +static __genl_const struct genl_multicast_group nl80211_mcgrps[] = { > [NL80211_MCGRP_CONFIG] = { .name = > NL80211_MULTICAST_GROUP_CONFIG }, > [NL80211_MCGRP_SCAN] = { .name = NL80211_MULTICAST_GROUP_SCAN > }, > [NL80211_MCGRP_REGULATORY] = { .name = > NL80211_MULTICAST_GROUP_REG }, > @@ -12894,7 +12894,8 @@ static int nl80211_tx_control_port(struc > NL80211_FLAG_CHECK_NETDEV_UP) > #define NL80211_FLAG_CLEAR_SKB 0x20 > > -static int nl80211_pre_doit(const struct genl_ops *ops, struct > sk_buff *skb, > +static int nl80211_pre_doit(__genl_const struct genl_ops *ops, > + struct sk_buff *skb, > struct genl_info *info) > { > struct cfg80211_registered_device *rdev; > @@ -12956,7 +12957,8 @@ static int nl80211_pre_doit(const struct > return 0; > } > > -static void nl80211_post_doit(const struct genl_ops *ops, struct > sk_buff *skb, > +static void nl80211_post_doit(__genl_const struct genl_ops *ops, > + struct sk_buff *skb, > struct genl_info *info) > { > if (info->user_ptr[1]) { > @@ -12985,7 +12987,7 @@ static void nl80211_post_doit(const stru > } > } > > -static const struct genl_ops nl80211_ops[] = { > +static __genl_const struct genl_ops nl80211_ops[] = { > { > .cmd = NL80211_CMD_GET_WIPHY, > .doit = nl80211_get_wiphy, Yes, this looks right! So it seems to be working with 1.0.8. :P Thanks a lot for checking and helping here. -- Cheers, Luca. -- To unsubscribe from this list: send the line "unsubscribe backports" in