aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-17 02:20:45 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-11-17 03:49:14 -0500
commit29cd54b9bfaccd8e1291e100a1cc9e42b7ff717e (patch)
treecc32814e204873f5742d241882a9b9530060af4e
parent2d6dde29ae144cd87879963477cdedb96be542c7 (diff)
mac802154: remove const for non pointer in driver-ops
This patches removes the const keyword in variables which are non pointers. There is no sense to declare call by value parameters as const. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Reported-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--net/mac802154/driver-ops.h46
1 files changed, 21 insertions, 25 deletions
diff --git a/net/mac802154/driver-ops.h b/net/mac802154/driver-ops.h
index dfd29ffb8fee..f21e864613d0 100644
--- a/net/mac802154/driver-ops.h
+++ b/net/mac802154/driver-ops.h
@@ -50,16 +50,15 @@ static inline void drv_stop(struct ieee802154_local *local)
50 local->started = false; 50 local->started = false;
51} 51}
52 52
53static inline int drv_set_channel(struct ieee802154_local *local, 53static inline int
54 const u8 page, const u8 channel) 54drv_set_channel(struct ieee802154_local *local, u8 page, u8 channel)
55{ 55{
56 might_sleep(); 56 might_sleep();
57 57
58 return local->ops->set_channel(&local->hw, page, channel); 58 return local->ops->set_channel(&local->hw, page, channel);
59} 59}
60 60
61static inline int drv_set_tx_power(struct ieee802154_local *local, 61static inline int drv_set_tx_power(struct ieee802154_local *local, s8 dbm)
62 const s8 dbm)
63{ 62{
64 might_sleep(); 63 might_sleep();
65 64
@@ -71,8 +70,7 @@ static inline int drv_set_tx_power(struct ieee802154_local *local,
71 return local->ops->set_txpower(&local->hw, dbm); 70 return local->ops->set_txpower(&local->hw, dbm);
72} 71}
73 72
74static inline int drv_set_cca_mode(struct ieee802154_local *local, 73static inline int drv_set_cca_mode(struct ieee802154_local *local, u8 cca_mode)
75 const u8 cca_mode)
76{ 74{
77 might_sleep(); 75 might_sleep();
78 76
@@ -84,8 +82,7 @@ static inline int drv_set_cca_mode(struct ieee802154_local *local,
84 return local->ops->set_cca_mode(&local->hw, cca_mode); 82 return local->ops->set_cca_mode(&local->hw, cca_mode);
85} 83}
86 84
87static inline int drv_set_lbt_mode(struct ieee802154_local *local, 85static inline int drv_set_lbt_mode(struct ieee802154_local *local, bool mode)
88 const bool mode)
89{ 86{
90 might_sleep(); 87 might_sleep();
91 88
@@ -97,8 +94,8 @@ static inline int drv_set_lbt_mode(struct ieee802154_local *local,
97 return local->ops->set_lbt(&local->hw, mode); 94 return local->ops->set_lbt(&local->hw, mode);
98} 95}
99 96
100static inline int drv_set_cca_ed_level(struct ieee802154_local *local, 97static inline int
101 const s32 ed_level) 98drv_set_cca_ed_level(struct ieee802154_local *local, s32 ed_level)
102{ 99{
103 might_sleep(); 100 might_sleep();
104 101
@@ -110,8 +107,7 @@ static inline int drv_set_cca_ed_level(struct ieee802154_local *local,
110 return local->ops->set_cca_ed_level(&local->hw, ed_level); 107 return local->ops->set_cca_ed_level(&local->hw, ed_level);
111} 108}
112 109
113static inline int drv_set_pan_id(struct ieee802154_local *local, 110static inline int drv_set_pan_id(struct ieee802154_local *local, __le16 pan_id)
114 const __le16 pan_id)
115{ 111{
116 struct ieee802154_hw_addr_filt filt; 112 struct ieee802154_hw_addr_filt filt;
117 113
@@ -128,8 +124,8 @@ static inline int drv_set_pan_id(struct ieee802154_local *local,
128 IEEE802154_AFILT_PANID_CHANGED); 124 IEEE802154_AFILT_PANID_CHANGED);
129} 125}
130 126
131static inline int drv_set_extended_addr(struct ieee802154_local *local, 127static inline int
132 const __le64 extended_addr) 128drv_set_extended_addr(struct ieee802154_local *local, __le64 extended_addr)
133{ 129{
134 struct ieee802154_hw_addr_filt filt; 130 struct ieee802154_hw_addr_filt filt;
135 131
@@ -146,8 +142,8 @@ static inline int drv_set_extended_addr(struct ieee802154_local *local,
146 IEEE802154_AFILT_IEEEADDR_CHANGED); 142 IEEE802154_AFILT_IEEEADDR_CHANGED);
147} 143}
148 144
149static inline int drv_set_short_addr(struct ieee802154_local *local, 145static inline int
150 const __le16 short_addr) 146drv_set_short_addr(struct ieee802154_local *local, __le16 short_addr)
151{ 147{
152 struct ieee802154_hw_addr_filt filt; 148 struct ieee802154_hw_addr_filt filt;
153 149
@@ -164,8 +160,8 @@ static inline int drv_set_short_addr(struct ieee802154_local *local,
164 IEEE802154_AFILT_SADDR_CHANGED); 160 IEEE802154_AFILT_SADDR_CHANGED);
165} 161}
166 162
167static inline int drv_set_pan_coord(struct ieee802154_local *local, 163static inline int
168 const bool is_coord) 164drv_set_pan_coord(struct ieee802154_local *local, bool is_coord)
169{ 165{
170 struct ieee802154_hw_addr_filt filt; 166 struct ieee802154_hw_addr_filt filt;
171 167
@@ -182,9 +178,9 @@ static inline int drv_set_pan_coord(struct ieee802154_local *local,
182 IEEE802154_AFILT_PANC_CHANGED); 178 IEEE802154_AFILT_PANC_CHANGED);
183} 179}
184 180
185static inline int drv_set_csma_params(struct ieee802154_local *local, 181static inline int
186 u8 min_be, u8 max_be, 182drv_set_csma_params(struct ieee802154_local *local, u8 min_be, u8 max_be,
187 u8 max_csma_backoffs) 183 u8 max_csma_backoffs)
188{ 184{
189 might_sleep(); 185 might_sleep();
190 186
@@ -197,8 +193,8 @@ static inline int drv_set_csma_params(struct ieee802154_local *local,
197 max_csma_backoffs); 193 max_csma_backoffs);
198} 194}
199 195
200static inline int drv_set_max_frame_retries(struct ieee802154_local *local, 196static inline int
201 s8 max_frame_retries) 197drv_set_max_frame_retries(struct ieee802154_local *local, s8 max_frame_retries)
202{ 198{
203 might_sleep(); 199 might_sleep();
204 200
@@ -210,8 +206,8 @@ static inline int drv_set_max_frame_retries(struct ieee802154_local *local,
210 return local->ops->set_frame_retries(&local->hw, max_frame_retries); 206 return local->ops->set_frame_retries(&local->hw, max_frame_retries);
211} 207}
212 208
213static inline int drv_set_promiscuous_mode(struct ieee802154_local *local, 209static inline int
214 const bool on) 210drv_set_promiscuous_mode(struct ieee802154_local *local, bool on)
215{ 211{
216 might_sleep(); 212 might_sleep();
217 213