This patch marks the arguments of some functions as well as some local variables as constant.
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -113,7 +113,7 @@ struct can_tdc_const { · 112 unmodified lines | |||
| 113 | }; | 113 | }; |
| 114 | 114 | ||
| 115 | #ifdef CONFIG_CAN_CALC_BITTIMING | 115 | #ifdef CONFIG_CAN_CALC_BITTIMING |
| 116 | int can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt, | 116 | int 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 | ||
| 119 | void can_calc_tdco(struct can_tdc *tdc, const struct can_tdc_const *tdc_const, | 119 | void 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 */ |
| 123 | static inline int | 123 | static inline int |
| 124 | can_calc_bittiming(struct net_device *dev, struct can_bittiming *bt, | 124 | can_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 | ||
| 139 | int can_get_bittiming(struct net_device *dev, struct can_bittiming *bt, | 139 | int 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); |