Message ID | 20240423161356.2522636-2-gnstark@salutedevices.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | meson pwm small fixes | expand |
Hello George, On Tue, Apr 23, 2024 at 07:13:55PM +0300, George Stark wrote: > Drop checking state argument for null pointer in meson_pwm_get_state() > due to it is called only from pwm core with always valid arguments. > > Fixes: 211ed630753d ("pwm: Add support for Meson PWM Controller") > Signed-off-by: George Stark <gnstark@salutedevices.com> > Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> I'd apply this one with the following changes if you agree: - capitalize "drop" in the Subject line - s/get_state/.get_state()/ - make "null" all caps (i.e. "NULL") - swap the order of Signed-off-by lines to have yours last. Alternatively send it in a v2 together with addressing the comment in the second patch. Best regards Uwe
Hello Uwe Thanks for the review On 4/24/24 10:19, Uwe Kleine-König wrote: > Hello George, > > On Tue, Apr 23, 2024 at 07:13:55PM +0300, George Stark wrote: >> Drop checking state argument for null pointer in meson_pwm_get_state() >> due to it is called only from pwm core with always valid arguments. >> >> Fixes: 211ed630753d ("pwm: Add support for Meson PWM Controller") >> Signed-off-by: George Stark <gnstark@salutedevices.com> >> Signed-off-by: Dmitry Rokosov <ddrokosov@salutedevices.com> > > I'd apply this one with the following changes if you agree: > > - capitalize "drop" in the Subject line > - s/get_state/.get_state()/ > - make "null" all caps (i.e. "NULL") > - swap the order of Signed-off-by lines to have yours last. > > Alternatively send it in a v2 together with addressing the comment in > the second patch. I agree with the proposed changes and I'll clean it up after myself in v2 > Best regards > Uwe >
diff --git a/drivers/pwm/pwm-meson.c b/drivers/pwm/pwm-meson.c index 529a541ba7b6..ebe76298f6e2 100644 --- a/drivers/pwm/pwm-meson.c +++ b/drivers/pwm/pwm-meson.c @@ -311,9 +311,6 @@ static int meson_pwm_get_state(struct pwm_chip *chip, struct pwm_device *pwm, struct meson_pwm_channel *channel; u32 value; - if (!state) - return 0; - channel = &meson->channels[pwm->hwpwm]; channel_data = &meson_pwm_per_channel_data[pwm->hwpwm];