From patchwork Wed Aug 23 10:08:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9917015 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7844D60327 for ; Wed, 23 Aug 2017 10:10:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B7FC28968 for ; Wed, 23 Aug 2017 10:10:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 56CD028943; Wed, 23 Aug 2017 10:10:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2863D28968 for ; Wed, 23 Aug 2017 10:10:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753721AbdHWKJD (ORCPT ); Wed, 23 Aug 2017 06:09:03 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36839 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753634AbdHWKJC (ORCPT ); Wed, 23 Aug 2017 06:09:02 -0400 Received: by mail-pg0-f67.google.com with SMTP id y129so1143401pgy.3; Wed, 23 Aug 2017 03:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=zdwbE7gFmjPi94OSvQISLvoez9q23YIjWVw9VVNT40I=; b=gdgIZtEtEvyHsCQ/i8Bh+ea8/uiKZQ1mD+AnPt7Bv1IMtHEvReBcwbVi5Q7LQ3ZoG+ psEvvOMqBjqaOR6Mi2ji57/zn3g3B3aSFnEdeUWPBdCG6QT5HUgTdg1Ea/iAyYv18VGP KrbazJV+nGFbzA4jpnTJ84ahYfyHWAWDXXzacL/8O3LdBQrYq+uUgiIRPACEZ8OPLIJP QgSElGRjcc6JvxhM33E2biEDKy+EIYqOOVPoloxCFk8C3aGpz1EnYfIuBezl4OT591FA 5bzvg23EUfMrjQylAr4lQZaWN6+fAsB4lsEf9YBBC43TBD1FhHlj1STQfD//8GHjyPAU 0o9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=zdwbE7gFmjPi94OSvQISLvoez9q23YIjWVw9VVNT40I=; b=dJmLJp7yqBYdZ23RQm2eXUkK8+MzQzjReTyR1QqUGbcfwi5MZfBRpFcPxFCMzt0V3P Kzv1krSGj0Gi1LrtrbhW405Ig1/gtKxOVjRD6vPovFhErbAIi7BV4jnvbqIbeTeG0qNZ yrcHRgczLeD14i1d3NLVkmngfkFfSkm+4uzjCaoVspJwi0Y+m8Fawuq8v0kB5mcXVAdK a4QTx6x3YNzUWnE1mi7HmiqAjCUuO0y7u56xzHnNlX+ISs6p0ZgQarOzLjlJOeBy0qin oL/JxhyLpJB38/EhZrUSHAXn58EcIYqail6312RytnAT3L3j468q4n0jdU+N5/v6eOBD Q0SA== X-Gm-Message-State: AHYfb5gFAeg3jTkpXKmo69M4f0GfoGYBz7VSnq5KH0DjQs7ieGHm4kAK IA3JcPa44EJuPw== X-Received: by 10.84.164.162 with SMTP id w31mr2529438pla.246.1503482941871; Wed, 23 Aug 2017 03:09:01 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id h14sm3881813pgn.34.2017.08.23.03.08.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Aug 2017 03:09:01 -0700 (PDT) From: Arvind Yadav To: davem@davemloft.net, Larry.Finger@lwfinger.net, chaoming_li@realsil.com.cn, kvalo@codeaurora.org, jon.maloy@ericsson.com, ying.xue@windriver.com Cc: linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH 3/3 v2] net: netlink: constify genl_ops Date: Wed, 23 Aug 2017 15:38:43 +0530 Message-Id: <1503482923-21640-1-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP genl_ops are not supposed to change at runtime. All functions working with genl_ops provided by work with const genl_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- Changes in v2: Patch Subject was wrong. net/tipc/netlink_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/tipc/netlink_compat.c b/net/tipc/netlink_compat.c index 750949d..e48f0b2 100644 --- a/net/tipc/netlink_compat.c +++ b/net/tipc/netlink_compat.c @@ -1217,7 +1217,7 @@ static int tipc_nl_compat_recv(struct sk_buff *skb, struct genl_info *info) return err; } -static struct genl_ops tipc_genl_compat_ops[] = { +static const struct genl_ops tipc_genl_compat_ops[] = { { .cmd = TIPC_GENL_CMD, .doit = tipc_nl_compat_recv,