All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] pwm: ensure pwm_apply_state() doesn't modify the state argument
@ 2019-03-12  8:35 Uwe Kleine-König
       [not found] ` <20190312083537.23748-1-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Uwe Kleine-König @ 2019-03-12  8:35 UTC (permalink / raw)
  To: Thierry Reding, Heiko Stuebner
  Cc: linux-pwm-u79uwXL29TY76Z2rM5mHXA, kernel-bIcnvbaLZ9MEGnE8C9+IrQ,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Hello,

this series is a followup to my mail claiming that changing the state
argument for a caller of pwm_apply_state() is a bad idea. See the commit
log for the second patch for the reasoning.

The only driver that actually modified the argument is the rockchip
driver which howver didn't ensure that struct pwm_device::state is
updated accordingly which made pwm_get_state() return the old state. The
first patch addresses this by dropping the modification.

Best regards
Uwe

Uwe Kleine-König (2):
  pwm: rockchip: Don't update the state for the caller of
    pwm_apply_state()
  pwm: ensure pwm_apply_state() doesn't modify the state argument

 drivers/pwm/core.c            |  2 +-
 drivers/pwm/pwm-atmel-hlcdc.c |  2 +-
 drivers/pwm/pwm-atmel.c       |  2 +-
 drivers/pwm/pwm-bcm-iproc.c   |  2 +-
 drivers/pwm/pwm-cros-ec.c     |  2 +-
 drivers/pwm/pwm-hibvt.c       |  2 +-
 drivers/pwm/pwm-imx27.c       |  2 +-
 drivers/pwm/pwm-lpss.c        |  2 +-
 drivers/pwm/pwm-meson.c       |  2 +-
 drivers/pwm/pwm-rcar.c        |  2 +-
 drivers/pwm/pwm-rockchip.c    | 10 ++--------
 drivers/pwm/pwm-stm32-lp.c    |  2 +-
 drivers/pwm/pwm-sun4i.c       | 10 ++--------
 drivers/pwm/pwm-zx.c          |  2 +-
 include/linux/pwm.h           |  4 ++--
 15 files changed, 18 insertions(+), 30 deletions(-)

-- 
2.20.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-03-12 12:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12  8:35 [PATCH 0/2] pwm: ensure pwm_apply_state() doesn't modify the state argument Uwe Kleine-König
     [not found] ` <20190312083537.23748-1-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-03-12  8:35   ` [PATCH 1/2] pwm: rockchip: Don't update the state for the caller of pwm_apply_state() Uwe Kleine-König
2019-03-12  8:35   ` [PATCH 2/2] pwm: ensure pwm_apply_state() doesn't modify the state argument Uwe Kleine-König
     [not found]     ` <20190312083537.23748-3-u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2019-03-12 11:42       ` Thierry Reding
2019-03-12 12:59         ` Uwe Kleine-König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.