HomeFreeBSD

pwm(8): fix potential duty overflow, use unsigneds for period and duty

Description

pwm(8): fix potential duty overflow, use unsigneds for period and duty

For a long period value and the duty specified as a percentage,
there could be an overflow.
Using unsigned integers aligns the code with struct pwm_state and allows
to safely use periods up to 4 seconds where supported by drivers.

MFC after: 2 weeks

Details

Provenance
avgAuthored on
Parents
rS366143: pwm(8): do not exit with failure after successfully reading configuration
Branches
Unknown
Tags
Unknown