From patchwork Wed Aug 26 22:56:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 261877 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6617C433DF for ; Wed, 26 Aug 2020 22:57:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B09112074A for ; Wed, 26 Aug 2020 22:57:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BVXtUQ3+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727772AbgHZW5Z (ORCPT ); Wed, 26 Aug 2020 18:57:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726186AbgHZW4l (ORCPT ); Wed, 26 Aug 2020 18:56:41 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6EC48C061756; Wed, 26 Aug 2020 15:56:41 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id r13so833518ljm.0; Wed, 26 Aug 2020 15:56:41 -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 :mime-version:content-transfer-encoding; bh=hgAI8q2j0AZh1tvmkKar6IJHXC6blIHNOlRoGq8CQhg=; b=BVXtUQ3+S7vWfJMKiRXenJgRm8IQbPOYDE1d4+ncKZ+ng0sOlYNqlR2OPvSvkEQuIf EdjWcmRLkQ09egztT44e2+/B/+qSqCmgxTV3/TVx7Wge99hpudsLwYcNjl2LV5MVLruu gsT8zuItxYTs5v016vwxwkgQErLrBtAgYaD6Xput1JCekN6AxIVuIbdv+6LOUzAfGhQd GqLoEVE0yKQlk2jIUEgjTgtQ4qkfQnUYTZO8nX7szugrw9eTOvte/9tuV6hKNQ+gxLGN KQvk7jpYglX7GA2Wg7k1ws+ocOD/RSOvmXX7f3jZL+G5Ufjrv3+zAm05/BqvAQpmpIE5 fD6w== 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:mime-version:content-transfer-encoding; bh=hgAI8q2j0AZh1tvmkKar6IJHXC6blIHNOlRoGq8CQhg=; b=o0tvyPM7sO8Jmuvyvpw2Wo0q2U+m0xWdvtfzIFeD//9slM5oh4KWlLz+DWOhgfy2Gd B8xN6Y+Zu016BDJKpiVAeUVC69hLiIbCElRuWKVYZ5bD+oNshDflDPFTmvPnuA00Bu7d SPiodmpj/LfZKGtVt7FyB8niAHmFRhoYU93+5h/DVbn9x/sK5QlK9OEHRPmkYdRq9Nm5 3MTONaSvXsc4rUtc2PXf+N4/c2LeyfdlGZKGZA/HXBRdqaGjdUvn4RJjMlvdLyNc2CM9 4ugGSVL3J6nLuiUORvb0zn9KT2DjZC6s6TMkl8EQWgclmUarGRnSGm36xxf6/nK3GUlz ajaw== X-Gm-Message-State: AOAM531PAZDz5D2sbAaVQ2wm7B0TPYSK23q0GEaG5WVi9Jjen3RO6E6X Xw9ZC0E/kx84QPmYa+n/n38= X-Google-Smtp-Source: ABdhPJyQrkoC0ZxPorDSS349rPbvidPOhC6FwNRTdt7IAYrl1WtWCfeagJJEa0S0KyoiD7E6twotQA== X-Received: by 2002:a2e:6815:: with SMTP id c21mr555840lja.132.1598482599855; Wed, 26 Aug 2020 15:56:39 -0700 (PDT) Received: from localhost.localdomain (h-82-196-111-59.NA.cust.bahnhof.se. [82.196.111.59]) by smtp.gmail.com with ESMTPSA id u28sm49075ljd.39.2020.08.26.15.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 15:56:38 -0700 (PDT) From: Rikard Falkeborn To: "David S . Miller" Cc: Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Rikard Falkeborn Subject: [PATCH net-next 1/6] net: ethernet: qualcomm: constify qca_serdev_ops Date: Thu, 27 Aug 2020 00:56:03 +0200 Message-Id: <20200826225608.90299-2-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200826225608.90299-1-rikard.falkeborn@gmail.com> References: <20200826225608.90299-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The only usage of qca_serdev_ops is to pass its address to serdev_device_set_client_ops() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/net/ethernet/qualcomm/qca_uart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qualcomm/qca_uart.c b/drivers/net/ethernet/qualcomm/qca_uart.c index 375a844cd27c..362b4f5c162c 100644 --- a/drivers/net/ethernet/qualcomm/qca_uart.c +++ b/drivers/net/ethernet/qualcomm/qca_uart.c @@ -167,7 +167,7 @@ static void qca_tty_wakeup(struct serdev_device *serdev) schedule_work(&qca->tx_work); } -static struct serdev_device_ops qca_serdev_ops = { +static const struct serdev_device_ops qca_serdev_ops = { .receive_buf = qca_tty_receive, .write_wakeup = qca_tty_wakeup, }; From patchwork Wed Aug 26 22:56:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 261880 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4FA4C433E1 for ; Wed, 26 Aug 2020 22:56:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 82DAE2074A for ; Wed, 26 Aug 2020 22:56:48 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rmayaXWk" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726940AbgHZW4q (ORCPT ); Wed, 26 Aug 2020 18:56:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726880AbgHZW4n (ORCPT ); Wed, 26 Aug 2020 18:56:43 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 947B9C061574; Wed, 26 Aug 2020 15:56:42 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id v12so1860539lfo.13; Wed, 26 Aug 2020 15:56:42 -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 :mime-version:content-transfer-encoding; bh=2Dgulwv05jUoieJr+gqcUbQ6wpsVte9CAar23MNPJ7E=; b=rmayaXWkWon2jv52c0auSoGgImYxb3cXWfOnKRA4JOfzmQKy9JgRZUW5E61t2ZXFmU NDiEf5cfhEwL+1ryqaLPW4Bv8vPhk8u3mD4MP762mnfR8F4Z6KmcJwCkSGndRZ/uhz8z aey38Qfael4u/gcoPJlhChRqR5HKWa1mYMhneH/rQpc2zTUiGZl81HaOWtf5TufEpEZc r0Wt3DqSSclJZa5RjuQa+D267u4yZ2Tb/1bzM29WPiurojFaB9f8jXz5/BRAPQjKUUXc jcU/Mel3qHPZiUPzcMxUi08lh17P3PX6AU2Oi21fFvJWfEuwRnTWY3WM8ziy46/h/PSF 2VXw== 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:mime-version:content-transfer-encoding; bh=2Dgulwv05jUoieJr+gqcUbQ6wpsVte9CAar23MNPJ7E=; b=F8rMQn99Neb73xdkgb2VllQ/f/RR54yl7nF7+g+vh3y2tdxk4/8bi5qXTA6DRhnBHW kJvhRZrDaOyrie5xkPdkqsNZ4Zryue8ZkuP9umYIBQn5yhY60OwCCjhfkInp7zm/CW4g YJh4+y71md1qt+nDljbpEs71OKx40c47QeKlMz+OGnT4ZT/rkCUKqZXnaKGhEmROci1Y N67EWm9bDH8wMvrcDI0fBj8wVCkESyWAqYgKq4MpKsdb/KSxLd583XaoDkCUU3QvtWPv FZY/IEJzFiTznr2rXncJsiRExTdGubCQpCvw9i/618OlgeEqWapDawOLrr3rhpZzx/Rx 5gaA== X-Gm-Message-State: AOAM5318CEb1+Os8oCc8se8PmqV3rsniIXmzmyQygPhSZdooQihhRLfR fnuKb400r+q5hxRLd815fag= X-Google-Smtp-Source: ABdhPJxIJrPEx4P5UUrtxzsS1aOaGySDzu0RLJFkjjQOlyjUVa6SZkN+2o4/SzbCk2Fw+RtWQj4FWw== X-Received: by 2002:ac2:598f:: with SMTP id w15mr8514645lfn.216.1598482601018; Wed, 26 Aug 2020 15:56:41 -0700 (PDT) Received: from localhost.localdomain (h-82-196-111-59.NA.cust.bahnhof.se. [82.196.111.59]) by smtp.gmail.com with ESMTPSA id u28sm49075ljd.39.2020.08.26.15.56.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 15:56:40 -0700 (PDT) From: Rikard Falkeborn To: "David S . Miller" Cc: Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Rikard Falkeborn , Sergei Shtylyov , linux-renesas-soc@vger.kernel.org Subject: [PATCH net-next 2/6] net: ethernet: ravb: constify bb_ops Date: Thu, 27 Aug 2020 00:56:04 +0200 Message-Id: <20200826225608.90299-3-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200826225608.90299-1-rikard.falkeborn@gmail.com> References: <20200826225608.90299-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The only usage of bb_ops is to assign its address to the ops field in the mdiobb_ctrl struct, which is a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/net/ethernet/renesas/ravb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c index df89d09b253e..f684296df871 100644 --- a/drivers/net/ethernet/renesas/ravb_main.c +++ b/drivers/net/ethernet/renesas/ravb_main.c @@ -162,7 +162,7 @@ static int ravb_get_mdio_data(struct mdiobb_ctrl *ctrl) } /* MDIO bus control struct */ -static struct mdiobb_ops bb_ops = { +static const struct mdiobb_ops bb_ops = { .owner = THIS_MODULE, .set_mdc = ravb_set_mdc, .set_mdio_dir = ravb_set_mdio_dir, From patchwork Wed Aug 26 22:56:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rikard Falkeborn X-Patchwork-Id: 261879 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A497C433DF for ; Wed, 26 Aug 2020 22:57:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7577722B4B for ; Wed, 26 Aug 2020 22:57:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="EnWlVTpW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727042AbgHZW46 (ORCPT ); Wed, 26 Aug 2020 18:56:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726947AbgHZW4r (ORCPT ); Wed, 26 Aug 2020 18:56:47 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 230A6C061757; Wed, 26 Aug 2020 15:56:47 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id m22so4252059ljj.5; Wed, 26 Aug 2020 15:56:47 -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 :mime-version:content-transfer-encoding; bh=afC6eoAZztl3Q8Idac3immDWpySqEFxQWwnaYLkH85k=; b=EnWlVTpWzPBTdMBz89ngZhwDupx5yWCX2+sryIokHLdjAqsApZAhF6ehBHAuNMxZS/ ci/TQqwSBszsV73XX7GAVNkJX6V+VLtV/xbBzPv3a7gMXIZp/C1CMCIP5XP8D/OHJ09w Ai3l9jzOHlBBQcnJmAbu6tqSBoVwHZlPSMqxPfmkjYkFF4ZYTxxcNfx7maGtP00HfTL1 KDIEVpU/SDNLpbDHUAD/wxA9FLRK9ccEx7wR2UxCG4QSG4T/tcWXFML8VPPIAZOg9Mbi Iu8vMrDwSFQH6cb6Ks+0UPnFBGy4YUzPss1hbpRBYuYihrBZJXFYOp5AbvnYe1U1rLGk 8Apw== 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:mime-version:content-transfer-encoding; bh=afC6eoAZztl3Q8Idac3immDWpySqEFxQWwnaYLkH85k=; b=EqOa+SybYbWxWSl4pYYPgIEVR4XXD4DKoi27yhrUOuChFgyRgZM9+kaIgOh/jSkjBK hbQHvYSe8UF+EWvdevjTEw2MUchTjhSzmeQ8aS3CQl2tBu9Z7og1D46l4t/VQ3S11cvn SBXEsrIftFCNo7D4v9Crx/qhp5fXdW56w3hGcsjGhAcT0dLaSAWGODtX4ApnpG5Q7cev PLUEetiewkbL4fbdoHlF4jI79cUijFnI6hZDN3AD70mMQt0o6cburrkxUzDIgmdrA7GD L4ayHTnKhijDMb7befCBAWlltV+VjbD01QR8ahw9AHAHCdJ7EiixE4t3SQo7Em0GvT6B 12iA== X-Gm-Message-State: AOAM531RXBk7MySKuxoS9CZNLwFl/iuTkMGBB4CgD9hrOPV2NOqclEB2 yr1Ui313572NugyygPjm+ew= X-Google-Smtp-Source: ABdhPJwyQjh8FYd5hcYFWrzSRrsgrgmpsXsNdXoLfkbX3mN44hHwU9EOjmMsVfR9kqYxQ5+Ilhq2/g== X-Received: by 2002:a2e:b0c9:: with SMTP id g9mr7947765ljl.65.1598482605563; Wed, 26 Aug 2020 15:56:45 -0700 (PDT) Received: from localhost.localdomain (h-82-196-111-59.NA.cust.bahnhof.se. [82.196.111.59]) by smtp.gmail.com with ESMTPSA id u28sm49075ljd.39.2020.08.26.15.56.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Aug 2020 15:56:44 -0700 (PDT) From: Rikard Falkeborn To: "David S . Miller" Cc: Jakub Kicinski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Rikard Falkeborn , Kalle Valo , ath11k@lists.infradead.org, linux-wireless@vger.kernel.org Subject: [PATCH net-next 6/6] net: ath11k: constify ath11k_thermal_ops Date: Thu, 27 Aug 2020 00:56:08 +0200 Message-Id: <20200826225608.90299-7-rikard.falkeborn@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200826225608.90299-1-rikard.falkeborn@gmail.com> References: <20200826225608.90299-1-rikard.falkeborn@gmail.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The only usage of ath11k_thermal_ops is to pass its address to thermal_cooling_device_register() which takes a const pointer. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: Rikard Falkeborn --- drivers/net/wireless/ath/ath11k/thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath11k/thermal.c b/drivers/net/wireless/ath/ath11k/thermal.c index 5a7e150c621b..c96b26f39a25 100644 --- a/drivers/net/wireless/ath/ath11k/thermal.c +++ b/drivers/net/wireless/ath/ath11k/thermal.c @@ -53,7 +53,7 @@ ath11k_thermal_set_cur_throttle_state(struct thermal_cooling_device *cdev, return ret; } -static struct thermal_cooling_device_ops ath11k_thermal_ops = { +static const struct thermal_cooling_device_ops ath11k_thermal_ops = { .get_max_state = ath11k_thermal_get_max_throttle_state, .get_cur_state = ath11k_thermal_get_cur_throttle_state, .set_cur_state = ath11k_thermal_set_cur_throttle_state,