From patchwork Wed Aug 23 09:59:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9917001 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 DC2D260327 for ; Wed, 23 Aug 2017 10:01:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CDED7287F4 for ; Wed, 23 Aug 2017 10:01:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C25602890C; Wed, 23 Aug 2017 10:01:18 +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 79817287F4 for ; Wed, 23 Aug 2017 10:01:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753834AbdHWKBD (ORCPT ); Wed, 23 Aug 2017 06:01:03 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33424 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753700AbdHWJ76 (ORCPT ); Wed, 23 Aug 2017 05:59:58 -0400 Received: by mail-pg0-f66.google.com with SMTP id u191so1137735pgc.0; Wed, 23 Aug 2017 02:59:58 -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:in-reply-to:references; bh=NPD81g+VRAjGwWXYvo8QiqJ8xdnRrjZDFAjhJ8hUVAg=; b=kITfVBZ7Al7C0cpaGNZRWnuFwyHfTdXlK0K02IoGgs4m3sA2orcAN/txG8ewyFFzQX PokJfXBnYLsfCL3X5jECYU2Mcw/Q47dZOJz0xQFp3fBIske6ZM7jUrCxoWv1to3IufAz SGffTXd03PVFXCfPHyRA0FXKWItzRVON77qFo3GzmPGSdVOO72O3O8QqzI3PCGBp/nqM XH5Wl5ApQG5OmWgYCHQo89ceCEI+6F8AubxW1BAeipdYD2mSEdFL2AF59ZBpICEcpYlT J7wsy75mq/VVMs28I0c3M/iMr9+BgWx/+NNocHkjxWlvKPAx3cH8loM/oiIzq1i59JP4 X9QA== 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:in-reply-to :references; bh=NPD81g+VRAjGwWXYvo8QiqJ8xdnRrjZDFAjhJ8hUVAg=; b=SUWvk2wtrgZq4mygEYlHdwk7EIG5SqwWbV1PgpqAQXl0gXcfWlaZDjo9Ys2jFLE8pQ cwBM/4ZfUL0Toojh2qMTDFnCbahA1PDLOnfTNT1Z3983zye3k1ZRsn1S2qA7UJQqhVY4 cxPG8e928921bG3TT1hvlKNQKvzN6musVnADKYxZgm02AGGhOd8+6+nF+d4hDDYIC1Sv /fKPcVQvPOdVCnZyOJpX2wDJ4Bez25aBLa+sWQnDAAbk1ICgJc7ap+Rtj/EqNO7UDufL u0t955AWm6+leiWrlIofRlof0MeRIp8V/c9D7L8LGcBLW/ND4aDutWIS9hUVA1BkytWZ NRQw== X-Gm-Message-State: AHYfb5iB7GQgTXi35kCGHjhXsdadFZJmhh6P7+yFSfc4gYjVn1bsBc7f cG9zp3ocZHxrHA== X-Received: by 10.84.167.2 with SMTP id c2mr2416834plb.365.1503482398035; Wed, 23 Aug 2017 02:59:58 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id k65sm2163131pfc.173.2017.08.23.02.59.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Aug 2017 02:59:57 -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 1/3] net: rtlwifi: constify rate_control_ops Date: Wed, 23 Aug 2017 15:29:33 +0530 Message-Id: <1503482375-19983-2-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-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP rate_control_ops are not supposed to change at runtime. All functions working with rate_control_ops provided by work with const rate_control_ops. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/net/wireless/realtek/rtlwifi/rc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rc.c b/drivers/net/wireless/realtek/rtlwifi/rc.c index 951d257..02811ed 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rc.c +++ b/drivers/net/wireless/realtek/rtlwifi/rc.c @@ -283,7 +283,7 @@ static void rtl_rate_free_sta(void *rtlpriv, kfree(rate_priv); } -static struct rate_control_ops rtl_rate_ops = { +static const struct rate_control_ops rtl_rate_ops = { .name = "rtl_rc", .alloc = rtl_rate_alloc, .free = rtl_rate_free,