From: Marc Kleine-Budde <mkl@pengutronix.de>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, kuba@kernel.org, linux-can@vger.kernel.org,
kernel@pengutronix.de,
Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
Marc Kleine-Budde <mkl@pengutronix.de>
Subject: [PATCH net 8/9] can: m_can: make custom bittiming fields const
Date: Tue, 7 Dec 2021 11:24:19 +0100 [thread overview]
Message-ID: <20211207102420.120131-9-mkl@pengutronix.de> (raw)
In-Reply-To: <20211207102420.120131-1-mkl@pengutronix.de>
From: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
The assigned timing structs will be defined a const anyway, so we can
avoid a few casts by declaring the struct fields as const as well.
Link: https://lore.kernel.org/all/4508fa4e639164b2584c49a065d90c78a91fa568.1636967198.git.matthias.schiffer@ew.tq-group.com
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/net/can/m_can/m_can.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/can/m_can/m_can.h b/drivers/net/can/m_can/m_can.h
index ad063b101411..2c5d40997168 100644
--- a/drivers/net/can/m_can/m_can.h
+++ b/drivers/net/can/m_can/m_can.h
@@ -85,8 +85,8 @@ struct m_can_classdev {
struct sk_buff *tx_skb;
struct phy *transceiver;
- struct can_bittiming_const *bit_timing;
- struct can_bittiming_const *data_timing;
+ const struct can_bittiming_const *bit_timing;
+ const struct can_bittiming_const *data_timing;
struct m_can_ops *ops;
--
2.33.0
next prev parent reply other threads:[~2021-12-07 10:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 10:24 [PATCH net 0/9] pull-request: can 2021-12-07 Marc Kleine-Budde
2021-12-07 10:24 ` [PATCH net 1/9] can: pch_can: pch_can_rx_normal: fix use after free Marc Kleine-Budde
2021-12-07 18:40 ` patchwork-bot+netdevbpf
2021-12-07 10:24 ` [PATCH net 2/9] can: sja1000: fix use after free in ems_pcmcia_add_card() Marc Kleine-Budde
2021-12-07 10:24 ` [PATCH net 3/9] can: m_can: Disable and ignore ELO interrupt Marc Kleine-Budde
2021-12-07 10:24 ` [PATCH net 4/9] can: m_can: m_can_read_fifo: fix memory leak in error branch Marc Kleine-Budde
2021-12-07 10:24 ` [PATCH net 5/9] can: m_can: pci: fix iomap_read_fifo() and iomap_write_fifo() Marc Kleine-Budde
2021-12-07 10:24 ` [PATCH net 6/9] can: m_can: pci: fix incorrect reference clock rate Marc Kleine-Budde
2021-12-07 10:24 ` [PATCH net 7/9] Revert "can: m_can: remove support for custom bit timing" Marc Kleine-Budde
2021-12-07 10:24 ` Marc Kleine-Budde [this message]
2021-12-07 10:24 ` [PATCH net 9/9] can: m_can: pci: use custom bit timings for Elkhart Lake Marc Kleine-Budde
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=20211207102420.120131-9-mkl@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=davem@davemloft.net \
--cc=kernel@pengutronix.de \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=matthias.schiffer@ew.tq-group.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox