@@ -57,14 +57,14 @@ static ssize_t mlxsw_hwmon_temp_show(struct device *dev,
5757 struct device_attribute * attr ,
5858 char * buf )
5959{
60- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
60+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
6161 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
62- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
62+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
6363 char mtmp_pl [MLXSW_REG_MTMP_LEN ];
6464 int temp , index ;
6565 int err ;
6666
67- index = mlxsw_hwmon_get_attr_index (mlwsw_hwmon_attr -> type_index ,
67+ index = mlxsw_hwmon_get_attr_index (mlxsw_hwmon_attr -> type_index ,
6868 mlxsw_hwmon -> module_sensor_max );
6969 mlxsw_reg_mtmp_pack (mtmp_pl , index , false, false);
7070 err = mlxsw_reg_query (mlxsw_hwmon -> core , MLXSW_REG (mtmp ), mtmp_pl );
@@ -80,14 +80,14 @@ static ssize_t mlxsw_hwmon_temp_max_show(struct device *dev,
8080 struct device_attribute * attr ,
8181 char * buf )
8282{
83- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
83+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
8484 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
85- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
85+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
8686 char mtmp_pl [MLXSW_REG_MTMP_LEN ];
8787 int temp_max , index ;
8888 int err ;
8989
90- index = mlxsw_hwmon_get_attr_index (mlwsw_hwmon_attr -> type_index ,
90+ index = mlxsw_hwmon_get_attr_index (mlxsw_hwmon_attr -> type_index ,
9191 mlxsw_hwmon -> module_sensor_max );
9292 mlxsw_reg_mtmp_pack (mtmp_pl , index , false, false);
9393 err = mlxsw_reg_query (mlxsw_hwmon -> core , MLXSW_REG (mtmp ), mtmp_pl );
@@ -103,9 +103,9 @@ static ssize_t mlxsw_hwmon_temp_rst_store(struct device *dev,
103103 struct device_attribute * attr ,
104104 const char * buf , size_t len )
105105{
106- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
106+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
107107 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
108- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
108+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
109109 char mtmp_pl [MLXSW_REG_MTMP_LEN ] = {0 };
110110 unsigned long val ;
111111 int index ;
@@ -117,7 +117,7 @@ static ssize_t mlxsw_hwmon_temp_rst_store(struct device *dev,
117117 if (val != 1 )
118118 return - EINVAL ;
119119
120- index = mlxsw_hwmon_get_attr_index (mlwsw_hwmon_attr -> type_index ,
120+ index = mlxsw_hwmon_get_attr_index (mlxsw_hwmon_attr -> type_index ,
121121 mlxsw_hwmon -> module_sensor_max );
122122
123123 mlxsw_reg_mtmp_sensor_index_set (mtmp_pl , index );
@@ -138,13 +138,13 @@ static ssize_t mlxsw_hwmon_fan_rpm_show(struct device *dev,
138138 struct device_attribute * attr ,
139139 char * buf )
140140{
141- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
141+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
142142 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
143- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
143+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
144144 char mfsm_pl [MLXSW_REG_MFSM_LEN ];
145145 int err ;
146146
147- mlxsw_reg_mfsm_pack (mfsm_pl , mlwsw_hwmon_attr -> type_index );
147+ mlxsw_reg_mfsm_pack (mfsm_pl , mlxsw_hwmon_attr -> type_index );
148148 err = mlxsw_reg_query (mlxsw_hwmon -> core , MLXSW_REG (mfsm ), mfsm_pl );
149149 if (err ) {
150150 dev_err (mlxsw_hwmon -> bus_info -> dev , "Failed to query fan\n" );
@@ -157,9 +157,9 @@ static ssize_t mlxsw_hwmon_fan_fault_show(struct device *dev,
157157 struct device_attribute * attr ,
158158 char * buf )
159159{
160- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
160+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
161161 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
162- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
162+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
163163 char fore_pl [MLXSW_REG_FORE_LEN ];
164164 bool fault ;
165165 int err ;
@@ -169,7 +169,7 @@ static ssize_t mlxsw_hwmon_fan_fault_show(struct device *dev,
169169 dev_err (mlxsw_hwmon -> bus_info -> dev , "Failed to query fan\n" );
170170 return err ;
171171 }
172- mlxsw_reg_fore_unpack (fore_pl , mlwsw_hwmon_attr -> type_index , & fault );
172+ mlxsw_reg_fore_unpack (fore_pl , mlxsw_hwmon_attr -> type_index , & fault );
173173
174174 return sprintf (buf , "%u\n" , fault );
175175}
@@ -178,13 +178,13 @@ static ssize_t mlxsw_hwmon_pwm_show(struct device *dev,
178178 struct device_attribute * attr ,
179179 char * buf )
180180{
181- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
181+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
182182 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
183- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
183+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
184184 char mfsc_pl [MLXSW_REG_MFSC_LEN ];
185185 int err ;
186186
187- mlxsw_reg_mfsc_pack (mfsc_pl , mlwsw_hwmon_attr -> type_index , 0 );
187+ mlxsw_reg_mfsc_pack (mfsc_pl , mlxsw_hwmon_attr -> type_index , 0 );
188188 err = mlxsw_reg_query (mlxsw_hwmon -> core , MLXSW_REG (mfsc ), mfsc_pl );
189189 if (err ) {
190190 dev_err (mlxsw_hwmon -> bus_info -> dev , "Failed to query PWM\n" );
@@ -198,9 +198,9 @@ static ssize_t mlxsw_hwmon_pwm_store(struct device *dev,
198198 struct device_attribute * attr ,
199199 const char * buf , size_t len )
200200{
201- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
201+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
202202 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
203- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
203+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
204204 char mfsc_pl [MLXSW_REG_MFSC_LEN ];
205205 unsigned long val ;
206206 int err ;
@@ -211,7 +211,7 @@ static ssize_t mlxsw_hwmon_pwm_store(struct device *dev,
211211 if (val > 255 )
212212 return - EINVAL ;
213213
214- mlxsw_reg_mfsc_pack (mfsc_pl , mlwsw_hwmon_attr -> type_index , val );
214+ mlxsw_reg_mfsc_pack (mfsc_pl , mlxsw_hwmon_attr -> type_index , val );
215215 err = mlxsw_reg_write (mlxsw_hwmon -> core , MLXSW_REG (mfsc ), mfsc_pl );
216216 if (err ) {
217217 dev_err (mlxsw_hwmon -> bus_info -> dev , "Failed to write PWM\n" );
@@ -224,14 +224,14 @@ static int mlxsw_hwmon_module_temp_get(struct device *dev,
224224 struct device_attribute * attr ,
225225 int * p_temp )
226226{
227- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
227+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
228228 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
229- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
229+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
230230 char mtmp_pl [MLXSW_REG_MTMP_LEN ];
231231 u8 module ;
232232 int err ;
233233
234- module = mlwsw_hwmon_attr -> type_index - mlxsw_hwmon -> sensor_count ;
234+ module = mlxsw_hwmon_attr -> type_index - mlxsw_hwmon -> sensor_count ;
235235 mlxsw_reg_mtmp_pack (mtmp_pl , MLXSW_REG_MTMP_MODULE_INDEX_MIN + module ,
236236 false, false);
237237 err = mlxsw_reg_query (mlxsw_hwmon -> core , MLXSW_REG (mtmp ), mtmp_pl );
@@ -261,15 +261,15 @@ static ssize_t mlxsw_hwmon_module_temp_fault_show(struct device *dev,
261261 struct device_attribute * attr ,
262262 char * buf )
263263{
264- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
264+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
265265 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
266- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
266+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
267267 char mtbr_pl [MLXSW_REG_MTBR_LEN ] = {0 };
268268 u8 module , fault ;
269269 u16 temp ;
270270 int err ;
271271
272- module = mlwsw_hwmon_attr -> type_index - mlxsw_hwmon -> sensor_count ;
272+ module = mlxsw_hwmon_attr -> type_index - mlxsw_hwmon -> sensor_count ;
273273 mlxsw_reg_mtbr_pack (mtbr_pl , MLXSW_REG_MTBR_BASE_MODULE_INDEX + module ,
274274 1 );
275275 err = mlxsw_reg_query (mlxsw_hwmon -> core , MLXSW_REG (mtbr ), mtbr_pl );
@@ -303,13 +303,13 @@ static int mlxsw_hwmon_module_temp_critical_get(struct device *dev,
303303 struct device_attribute * attr ,
304304 int * p_temp )
305305{
306- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
306+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
307307 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
308- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
308+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
309309 u8 module ;
310310 int err ;
311311
312- module = mlwsw_hwmon_attr -> type_index - mlxsw_hwmon -> sensor_count ;
312+ module = mlxsw_hwmon_attr -> type_index - mlxsw_hwmon -> sensor_count ;
313313 err = mlxsw_env_module_temp_thresholds_get (mlxsw_hwmon -> core , module ,
314314 SFP_TEMP_HIGH_WARN , p_temp );
315315 if (err ) {
@@ -337,13 +337,13 @@ static int mlxsw_hwmon_module_temp_emergency_get(struct device *dev,
337337 struct device_attribute * attr ,
338338 int * p_temp )
339339{
340- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
340+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
341341 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
342- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
342+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
343343 u8 module ;
344344 int err ;
345345
346- module = mlwsw_hwmon_attr -> type_index - mlxsw_hwmon -> sensor_count ;
346+ module = mlxsw_hwmon_attr -> type_index - mlxsw_hwmon -> sensor_count ;
347347 err = mlxsw_env_module_temp_thresholds_get (mlxsw_hwmon -> core , module ,
348348 SFP_TEMP_HIGH_ALARM , p_temp );
349349 if (err ) {
@@ -373,22 +373,22 @@ mlxsw_hwmon_module_temp_label_show(struct device *dev,
373373 struct device_attribute * attr ,
374374 char * buf )
375375{
376- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
376+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
377377 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
378378
379379 return sprintf (buf , "front panel %03u\n" ,
380- mlwsw_hwmon_attr -> type_index );
380+ mlxsw_hwmon_attr -> type_index );
381381}
382382
383383static ssize_t
384384mlxsw_hwmon_gbox_temp_label_show (struct device * dev ,
385385 struct device_attribute * attr ,
386386 char * buf )
387387{
388- struct mlxsw_hwmon_attr * mlwsw_hwmon_attr =
388+ struct mlxsw_hwmon_attr * mlxsw_hwmon_attr =
389389 container_of (attr , struct mlxsw_hwmon_attr , dev_attr );
390- struct mlxsw_hwmon * mlxsw_hwmon = mlwsw_hwmon_attr -> hwmon ;
391- int index = mlwsw_hwmon_attr -> type_index -
390+ struct mlxsw_hwmon * mlxsw_hwmon = mlxsw_hwmon_attr -> hwmon ;
391+ int index = mlxsw_hwmon_attr -> type_index -
392392 mlxsw_hwmon -> module_sensor_max + 1 ;
393393
394394 return sprintf (buf , "gearbox %03u\n" , index );
0 commit comments