All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rikard Falkeborn <rikard.falkeborn@gmail.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rikard Falkeborn <rikard.falkeborn@gmail.com>
Subject: [PATCH net-next 1/6] net: ethernet: qualcomm: constify qca_serdev_ops
Date: Thu, 27 Aug 2020 00:56:03 +0200	[thread overview]
Message-ID: <20200826225608.90299-2-rikard.falkeborn@gmail.com> (raw)
In-Reply-To: <20200826225608.90299-1-rikard.falkeborn@gmail.com>

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 <rikard.falkeborn@gmail.com>
---
 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,
 };
-- 
2.28.0


  reply	other threads:[~2020-08-26 22:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-26 22:56 [PATCH net-next 0/6] drivers/net: constify static ops-variables Rikard Falkeborn
2020-08-26 22:56 ` Rikard Falkeborn
2020-08-26 22:56 ` Rikard Falkeborn [this message]
2020-08-26 22:56 ` [PATCH net-next 2/6] net: ethernet: ravb: constify bb_ops Rikard Falkeborn
2020-08-26 22:56 ` [PATCH net-next 3/6] net: renesas: sh_eth: " Rikard Falkeborn
2020-08-26 22:56 ` [PATCH net-next 4/6] net: phy: at803x: constify static regulator_ops Rikard Falkeborn
2020-08-26 22:56 ` [PATCH net-next 5/6] net: phy: mscc: macsec: constify vsc8584_macsec_ops Rikard Falkeborn
2020-08-26 22:56 ` [PATCH net-next 6/6] net: ath11k: constify ath11k_thermal_ops Rikard Falkeborn
2020-08-26 22:56   ` Rikard Falkeborn
2020-08-26 23:21 ` [PATCH net-next 0/6] drivers/net: constify static ops-variables David Miller
2020-08-26 23:21   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200826225608.90299-2-rikard.falkeborn@gmail.com \
    --to=rikard.falkeborn@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.