History

can: bittiming: mark function arguments and local variables as const

This patch marks the arguments of some functions as well as some local variables as constant.

Marc Kleine-Budde committed 4 years ago

Commit 5597f081 parent 5b60d332 files · +9 −9Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/can/bittiming.h+3−3
@@ -113,7 +113,7 @@ struct can_tdc_const { · 112 unmodified lines
113};113};
114 114
115#ifdef CONFIG_CAN_CALC_BITTIMING115#ifdef CONFIG_CAN_CALC_BITTIMING
116int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt,116int can_calc_bittiming(const struct net_device *dev, struct can_bittiming *bt,
117 const struct can_bittiming_const *btc);117 const struct can_bittiming_const *btc);
118 118
119void can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const,119void can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const,
@@ -121,7 +121,7 @@ void can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const, · 1 unmodified line
121 u32 *ctrlmode, u32 ctrlmode_supported);121 u32 *ctrlmode, u32 ctrlmode_supported);
122#else /* !CONFIG_CAN_CALC_BITTIMING */122#else /* !CONFIG_CAN_CALC_BITTIMING */
123static inline int123static inline int
124can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt,124can_calc_bittiming(const struct net_device *dev, struct can_bittiming *bt,
125 const struct can_bittiming_const *btc)125 const struct can_bittiming_const *btc)
126{126{
127 netdev_err(dev, "bit-timing calculation not available\n");127 netdev_err(dev, "bit-timing calculation not available\n");
@@ -136,7 +136,7 @@ can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const, · 8 unmodified lines
136}136}
137#endif /* CONFIG_CAN_CALC_BITTIMING */137#endif /* CONFIG_CAN_CALC_BITTIMING */
138 138
139int can_get_bittiming(struct net_device *dev, struct can_bittiming *bt,139int can_get_bittiming(const struct net_device *dev, struct can_bittiming *bt,
140 const struct can_bittiming_const *btc,140 const struct can_bittiming_const *btc,
141 const u32 *bitrate_const,141 const u32 *bitrate_const,
142 const unsigned int bitrate_const_cnt);142 const unsigned int bitrate_const_cnt);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t