@@ -270,10 +270,10 @@ int pwm_round_waveform_might_sleep(struct pwm_device *pwm, struct pwm_waveform *
270
270
wf_req .duty_length_ns , wf_req .period_length_ns , wf_req .duty_offset_ns , ret_tohw );
271
271
272
272
if (IS_ENABLED (CONFIG_PWM_DEBUG ) &&
273
- ret_tohw == 0 && ! pwm_check_rounding (& wf_req , wf ))
274
- dev_err (& chip -> dev , "Wrong rounding: requested %llu/%llu [+%llu], result %llu/%llu [+%llu]\n" ,
273
+ ( ret_tohw == 0 ) != pwm_check_rounding (& wf_req , wf ))
274
+ dev_err (& chip -> dev , "Wrong rounding: requested %llu/%llu [+%llu], result %llu/%llu [+%llu], ret: %d \n" ,
275
275
wf_req .duty_length_ns , wf_req .period_length_ns , wf_req .duty_offset_ns ,
276
- wf -> duty_length_ns , wf -> period_length_ns , wf -> duty_offset_ns );
276
+ wf -> duty_length_ns , wf -> period_length_ns , wf -> duty_offset_ns , ret_tohw );
277
277
278
278
return ret_tohw ;
279
279
}
@@ -341,10 +341,10 @@ static int __pwm_set_waveform(struct pwm_device *pwm,
341
341
if (err )
342
342
return err ;
343
343
344
- if (IS_ENABLED (CONFIG_PWM_DEBUG ) && ret_tohw == 0 && ! pwm_check_rounding (wf , & wf_rounded ))
345
- dev_err (& chip -> dev , "Wrong rounding: requested %llu/%llu [+%llu], result %llu/%llu [+%llu]\n" ,
344
+ if (IS_ENABLED (CONFIG_PWM_DEBUG ) && ( ret_tohw == 0 ) != pwm_check_rounding (wf , & wf_rounded ))
345
+ dev_err (& chip -> dev , "Wrong rounding: requested %llu/%llu [+%llu], result %llu/%llu [+%llu], ret: %d \n" ,
346
346
wf -> duty_length_ns , wf -> period_length_ns , wf -> duty_offset_ns ,
347
- wf_rounded .duty_length_ns , wf_rounded .period_length_ns , wf_rounded .duty_offset_ns );
347
+ wf_rounded .duty_length_ns , wf_rounded .period_length_ns , wf_rounded .duty_offset_ns , ret_tohw );
348
348
349
349
if (exact && pwmwfcmp (wf , & wf_rounded )) {
350
350
dev_dbg (& chip -> dev , "Requested no rounding, but %llu/%llu [+%llu] -> %llu/%llu [+%llu]\n" ,
0 commit comments