Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753914AbdHWKAU (ORCPT ); Wed, 23 Aug 2017 06:00:20 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36844 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753677AbdHWKAG (ORCPT ); Wed, 23 Aug 2017 06:00:06 -0400 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] net: rsi: netlink: constify genl_ops Date: Wed, 23 Aug 2017 15:29:35 +0530 Message-Id: <1503482375-19983-4-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503482375-19983-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1503482375-19983-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 782 Lines: 24 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 --- 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, -- 1.9.1