linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 00/23] counter: cleanups and device lifetime fixes
@ 2021-12-29 15:44 Uwe Kleine-König
  2021-12-29 15:44 ` [PATCH v3 11/23] counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper Uwe Kleine-König
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2021-12-29 15:44 UTC (permalink / raw)
  To: William Breathitt Gray
  Cc: linux-iio, kernel, Jonathan Cameron, Greg Kroah-Hartman,
	linux-kernel, Patrick Havelange, Kamel Bouhara,
	Syed Nayyar Waris, Oleksij Rempel, Ahmad Fatoum, Jarkko Nikula,
	David Lechner, Fabrice Gasnier, Maxime Coquelin,
	Alexandre Torgue, linux-stm32, linux-arm-kernel, Jonathan Corbet

Hello,

this is v3 of my series to fix device lifetime issues in the counter
framework. This hopefully addresses all things pointed out for v2.

Note this depends on 60f07e74f86b (which is in next) now. Full diffstat
below.

Things that could be further improved:

 - 104_QUAD_8 depends on X86, but compiles fine on ARCH=arm. Maybe
   adding support for COMPILE_TEST would be a good idea.

 - 104-quad-8.c uses devm_request_irq() and (now) devm_counter_add(). On
   unbind an irq might be pending which results in quad8_irq_handler()
   calling counter_push_event() for a counter that is already
   unregistered. (The issue exists also without my changes.)

 - I think intel-qep.c makes the counter unfunctional in
   intel_qep_remove before the counter is unregistered.

 - counter_sysfs_add() allocates several small structures using
   devm_kcalloc for counter->dev. Not sure this could be optimized.
   Another ugly aspect here is, that counter->dev has no name, so the
   trace generated by the devres_log event contains several "(null)":

     sh-124     [000] d..1.   439.921733: devres_log: 40000000.timer:counter ADD f0ecfb01 devm_action_release (8 bytes)
     sh-124     [000] d..1.   439.921741: devres_log: (null) ADD 44be06af devm_kzalloc_release (64 bytes)
     sh-124     [000] d..1.   439.921750: devres_log: (null) ADD 16ad25f5 devm_kzalloc_release (8 bytes)
     sh-124     [000] d..1.   439.921755: devres_log: (null) ADD 7d22db15 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921760: devres_log: (null) ADD 34aefeea devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921764: devres_log: (null) ADD f347e9c0 devm_kzalloc_release (8 bytes)
     sh-124     [000] d..1.   439.921768: devres_log: (null) ADD 960e132d devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921772: devres_log: (null) ADD 7b4c8adc devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921776: devres_log: (null) ADD 0931ec34 devm_kzalloc_release (7 bytes)
     sh-124     [000] d..1.   439.921782: devres_log: (null) ADD c8c6c1c3 devm_kzalloc_release (15 bytes)
     sh-124     [000] d..1.   439.921788: devres_log: (null) ADD d1bb5baf devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921791: devres_log: (null) ADD 94029520 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921796: devres_log: (null) ADD 1dcc6eeb devm_kzalloc_release (25 bytes)
     sh-124     [000] d..1.   439.921801: devres_log: (null) ADD d37b87ec devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921805: devres_log: (null) ADD 660be81a devm_kzalloc_release (28 bytes)
     sh-124     [000] d..1.   439.921810: devres_log: (null) ADD e6691ecf devm_kzalloc_release (15 bytes)
     sh-124     [000] d..1.   439.921815: devres_log: (null) ADD 0b8e2064 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921818: devres_log: (null) ADD b4dd5e7f devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921827: devres_log: (null) ADD 3eaaec2a devm_kzalloc_release (25 bytes)
     sh-124     [000] d..1.   439.921834: devres_log: (null) ADD e519abf5 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921841: devres_log: (null) ADD 92663a7b devm_kzalloc_release (28 bytes)
     sh-124     [000] d..1.   439.921845: devres_log: (null) ADD 7835b138 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921849: devres_log: (null) ADD 2dfa4f94 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921853: devres_log: (null) ADD 561fde6a devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921856: devres_log: (null) ADD 6f8b5fa6 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921860: devres_log: (null) ADD 39e5a4e8 devm_kzalloc_release (19 bytes)
     sh-124     [000] d..1.   439.921865: devres_log: (null) ADD f9156a41 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921868: devres_log: (null) ADD d2d5ce75 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921872: devres_log: (null) ADD 36d78a89 devm_kzalloc_release (23 bytes)
     sh-124     [000] d..1.   439.921877: devres_log: (null) ADD 2f5c179f devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921880: devres_log: (null) ADD 72cf7389 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921885: devres_log: (null) ADD f9badaa6 devm_kzalloc_release (20 bytes)
     sh-124     [000] d..1.   439.921889: devres_log: (null) ADD 0bac4bae devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921892: devres_log: (null) ADD e25a23bb devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921896: devres_log: (null) ADD 77c03a96 devm_kzalloc_release (21 bytes)
     sh-124     [000] d..1.   439.921901: devres_log: (null) ADD fbcf25d4 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921905: devres_log: (null) ADD 430046b3 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921909: devres_log: (null) ADD cb0566d5 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921912: devres_log: (null) ADD 5ec7bdc6 devm_kzalloc_release (52 bytes)
     sh-124     [000] d..1.   439.921916: devres_log: (null) ADD a8d30cb3 devm_kzalloc_release (20 bytes)
     sh-124     [000] d..1.   439.921926: devres_log: (null) ADD 655cd641 devm_kzalloc_release (80 bytes)
     sh-124     [000] d..1.   439.921931: devres_log: (null) ADD 7211e558 devm_kzalloc_release (12 bytes)
     sh-124     [000] d..1.   439.921934: devres_log: (null) ADD 1402f677 devm_kzalloc_release (12 bytes)
     sh-124     [000] d..1.   439.921937: devres_log: (null) ADD edc5c5b1 devm_kzalloc_release (68 bytes)
     sh-124     [000] d..1.   439.921941: devres_log: (null) ADD 5c7d0a3d devm_kzalloc_release (20 bytes)
     sh-124     [000] d..1.   439.922509: devres_log: 40000000.timer:counter ADD fb446f1c devm_action_release (8 bytes)

Uwe Kleine-König (23):
  counter: Use container_of instead of drvdata to track counter_device
  counter: ftm-quaddec: Drop unused platform_set_drvdata()
  counter: microchip-tcb-capture: Drop unused platform_set_drvdata()
  counter: Provide a wrapper to access device private data
  counter: 104-quad-8: Convert to counter_priv() wrapper
  counter: interrupt-cnt: Convert to counter_priv() wrapper
  counter: microchip-tcb-capture: Convert to counter_priv() wrapper
  counter: intel-qep: Convert to counter_priv() wrapper
  counter: ftm-quaddec: Convert to counter_priv() wrapper
  counter: ti-eqep: Convert to counter_priv() wrapper
  counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper
  counter: stm32-timer-cnt: Convert to counter_priv() wrapper
  counter: Provide alternative counter registration functions
  counter: Update documentation for new counter registration functions
  counter: 104-quad-8: Convert to new counter registration
  counter: interrupt-cnt: Convert to new counter registration
  counter: intel-qep: Convert to new counter registration
  counter: ftm-quaddec: Convert to new counter registration
  counter: microchip-tcb-capture: Convert to new counter registration
  counter: stm32-timer-cnt: Convert to new counter registration
  counter: stm32-lptimer-cnt: Convert to new counter registration
  counter: ti-eqep: Convert to new counter registration
  counter: remove old and now unused registration API

 Documentation/driver-api/generic-counter.rst |  10 +-
 drivers/counter/104-quad-8.c                 |  93 +++++-----
 drivers/counter/counter-core.c               | 186 ++++++++++++++-----
 drivers/counter/ftm-quaddec.c                |  36 ++--
 drivers/counter/intel-qep.c                  |  46 ++---
 drivers/counter/interrupt-cnt.c              |  38 ++--
 drivers/counter/microchip-tcb-capture.c      |  44 ++---
 drivers/counter/stm32-lptimer-cnt.c          |  51 ++---
 drivers/counter/stm32-timer-cnt.c            |  48 ++---
 drivers/counter/ti-eqep.c                    |  31 ++--
 include/linux/counter.h                      |  15 +-
 11 files changed, 356 insertions(+), 242 deletions(-)

Range-diff against v2:
 1:  0f73d029e55f !  1:  164f6fc76500 counter: Use container_of instead of drvdata to track counter_device
    @@ Commit message
         There are no other users of drvdata, so the call to dev_set_drvdata can
         go away, too.
     
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/counter-core.c ##
 2:  b2c4b1d30034 !  2:  3808b34176ed counter: ftm-quaddec: Drop unused platform_set_drvdata()
    @@ Commit message
         The driver doesn't ever use platform_get_drvdata, so drop this unused
         call.
     
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/ftm-quaddec.c ##
 3:  ac333fe0f34e !  3:  54a846344f2f counter: microchip-tcb-capture: Drop unused platform_set_drvdata()
    @@ Commit message
         The driver doesn't ever use platform_get_drvdata, so drop this unused
         call.
     
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/microchip-tcb-capture.c ##
 4:  adef4157e314 !  4:  c57b20dbdb7d counter: Provide a wrapper to access device private data
    @@ Commit message
         individually makes fixing device lifetime issues result in easier to
         review patches.
     
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/counter-core.c ##
 5:  c428105f13b1 !  5:  a81b257613f1 counter: 104-quad-8: Convert to counter_priv() wrapper
    @@ Commit message
     
         This is a straight forward conversion to the new counter_priv() wrapper.
     
    +    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/104-quad-8.c ##
 6:  c72800db0f05 !  6:  a57ac51c8499 counter: interrupt-cnt: Convert to counter_priv() wrapper
    @@ Commit message
     
         This is a straight forward conversion to the new counter_priv() wrapper.
     
    +    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/interrupt-cnt.c ##
 7:  d9fb86250b87 !  7:  2f227060747f counter: microchip-tcb-capture: Convert to counter_priv() wrapper
    @@ Commit message
     
         This is a straight forward conversion to the new counter_priv() wrapper.
     
    +    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/microchip-tcb-capture.c ##
 8:  0d1e999aa274 !  8:  0d917f687039 counter: intel-qep: Convert to counter_priv() wrapper
    @@ Commit message
     
         This is a straight forward conversion to the new counter_priv() wrapper.
     
    +    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/intel-qep.c ##
 9:  a2ffdf7dbac1 !  9:  82ad8f3060e2 counter: ftm-quaddec: Convert to counter_priv() wrapper
    @@ Commit message
     
         This is a straight forward conversion to the new counter_priv() wrapper.
     
    +    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/ftm-quaddec.c ##
10:  95c643c47795 <  -:  ------------ counter: ti-eqep: Convert to counter_priv() wrapper
 -:  ------------ > 10:  0ed4c223ae8e counter: ti-eqep: Convert to counter_priv() wrapper
11:  6960d9cf21d2 ! 11:  caff57fb76ad counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper
    @@ Commit message
     
         This is a straight forward conversion to the new counter_priv() wrapper.
     
    +    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/stm32-lptimer-cnt.c ##
12:  deeca3a39ff5 ! 12:  c45c494ed207 counter: stm32-timer-cnt: Convert to counter_priv() wrapper
    @@ Commit message
     
         This is a straight forward conversion to the new counter_priv() wrapper.
     
    +    Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/stm32-timer-cnt.c ##
13:  a9ccb6fac99f ! 13:  8427cd271336 counter: Provide alternative counter registration functions
    @@ drivers/counter/counter-core.c
      
     +struct counter_device_allochelper {
     +	struct counter_device counter;
    -+	unsigned long privdata[];
    ++
    ++	/*
    ++	 * This is cache line aligned to ensure private data behaves like if it
    ++	 * were kmalloced separately.
    ++	 */
    ++	unsigned long privdata[] ____cacheline_aligned;
     +};
     +
      static void counter_device_release(struct device *dev)
    @@ drivers/counter/counter-core.c: int counter_register(struct counter_device *cons
     +	struct counter_device_allochelper *ch;
     +	struct counter_device *counter;
     +	struct device *dev;
    -+	int id, err;
    ++	int err;
     +
     +	ch = kzalloc(sizeof(*ch) + sizeof_priv, GFP_KERNEL);
     +	if (!ch) {
    @@ drivers/counter/counter-core.c: int counter_register(struct counter_device *cons
     +
     +	/* Acquire unique ID */
     +	err = ida_alloc(&counter_ida, GFP_KERNEL);
    -+	if (err < 0) {
    ++	if (err < 0)
     +		goto err_ida_alloc;
    -+	}
     +	dev->id = err;
     +
    ++	mutex_init(&counter->ops_exist_lock);
    ++	dev->type = &counter_device_type;
    ++	dev->bus = &counter_bus_type;
    ++	dev->devt = MKDEV(MAJOR(counter_devt), dev->id);
    ++
     +	err = counter_chrdev_add(counter);
     +	if (err < 0)
     +		goto err_chrdev_add;
     +
     +	device_initialize(dev);
    -+	/* Configure device structure for Counter */
    -+	dev->type = &counter_device_type;
    -+	dev->bus = &counter_bus_type;
    -+	dev->devt = MKDEV(MAJOR(counter_devt), id);
    -+
    -+	mutex_init(&counter->ops_exist_lock);
     +
     +	return counter;
     +
    @@ drivers/counter/counter-core.c: int counter_register(struct counter_device *cons
     +{
     +	put_device(&counter->dev);
     +}
    ++EXPORT_SYMBOL_GPL(counter_put);
     +
     +/**
     + * counter_add - complete registration of a counter
    @@ drivers/counter/counter-core.c: int counter_register(struct counter_device *cons
     +	int err;
     +	struct device *dev = &counter->dev;
     +
    -+	get_device(&counter->dev);
    -+
     +	if (counter->parent) {
     +		dev->parent = counter->parent;
     +		dev->of_node = counter->parent->of_node;
    @@ drivers/counter/counter-core.c: int counter_register(struct counter_device *cons
     +		return err;
     +
     +	/* implies device_add(dev) */
    -+	err = cdev_device_add(&counter->chrdev, dev);
    -+
    -+	return err;
    ++	return cdev_device_add(&counter->chrdev, dev);
     +}
     +EXPORT_SYMBOL_GPL(counter_add);
     +
      /**
       * counter_unregister - unregister Counter from the system
       * @counter:	pointer to Counter to unregister
    +@@ drivers/counter/counter-core.c: void counter_unregister(struct counter_device *const counter)
    + 
    + 	mutex_unlock(&counter->ops_exist_lock);
    + 
    +-	put_device(&counter->dev);
    ++	if (counter->legacy_device)
    ++		put_device(&counter->dev);
    + }
    + EXPORT_SYMBOL_GPL(counter_unregister);
    + 
     @@ drivers/counter/counter-core.c: int devm_counter_register(struct device *dev,
      }
      EXPORT_SYMBOL_GPL(devm_counter_register);
    @@ drivers/counter/counter-core.c: int devm_counter_register(struct device *dev,
     +	counter_put(counter);
     +}
     +
    ++/**
    ++ * devm_counter_alloc - allocate a counter_device
    ++ * @dev: the device to register the release callback for
    ++ * @sizeof_priv: size of the driver private data
    ++ *
    ++ * This is the device managed version of counter_add(). It registers a cleanup
    ++ * callback to care for calling counter_put().
    ++ */
     +struct counter_device *devm_counter_alloc(struct device *dev, size_t sizeof_priv)
     +{
     +	struct counter_device *counter;
    @@ drivers/counter/counter-core.c: int devm_counter_register(struct device *dev,
     +}
     +EXPORT_SYMBOL_GPL(devm_counter_alloc);
     +
    ++/**
    ++ * devm_counter_add - complete registration of a counter
    ++ * @dev: the device to register the release callback for
    ++ * @counter: the counter to add
    ++ *
    ++ * This is the device managed version of counter_add(). It registers a cleanup
    ++ * callback to care for calling counter_unregister().
    ++ */
     +int devm_counter_add(struct device *dev,
     +		     struct counter_device *const counter)
     +{
14:  7ae52f5b75f4 ! 14:  f841ae4f8909 counter: Update documentation for new counter registration functions
    @@ Commit message
         In order to replace the counter registration API also update the
         documentation to the new way.
     
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## Documentation/driver-api/generic-counter.rst ##
    @@ Documentation/driver-api/generic-counter.rst: order to communicate with the devi
     -it to the counter_unregister function. Similarly, the
     -devm_counter_register function may be used if device memory-managed
     -registration is desired.
    -+A counter_device structure is supposed to be allocated using counter_alloc()
    -+and may be registered to the system by passing it to the counter_add()
    -+function, and unregistered by passing it to the counter_unregister function.
    -+There are device managed variants of these functions: devm_counter_alloc() and
    ++A counter_device structure is allocated using counter_alloc() and then
    ++registered to the system by passing it to the counter_add() function, and
    ++unregistered by passing it to the counter_unregister function. There are
    ++device managed variants of these functions: devm_counter_alloc() and
     +devm_counter_add().
      
      The struct counter_comp structure is used to define counter extensions
15:  02e54fed5b4e ! 15:  db635ea62ba4 counter: 104-quad-8: Convert to new counter registration
    @@ Commit message
         struct device.
     
         Fixes: f1d8a071d45b ("counter: 104-quad-8: Add Generic Counter interface support")
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/104-quad-8.c ##
    @@ drivers/counter/104-quad-8.c: MODULE_PARM_DESC(irq, "ACCES 104-QUAD-8 interrupt
      	unsigned int fck_prescaler[QUAD8_NUM_COUNTERS];
      	unsigned int preset[QUAD8_NUM_COUNTERS];
      	unsigned int count_mode[QUAD8_NUM_COUNTERS];
    +@@ drivers/counter/104-quad-8.c: static struct counter_count quad8_counts[] = {
    + 
    + static irqreturn_t quad8_irq_handler(int irq, void *private)
    + {
    +-	struct quad8 *const priv = private;
    ++	struct counter_device *counter = private;
    ++	struct quad8 *const priv = counter_priv(counter);
    + 	const unsigned long base = priv->base;
    + 	unsigned long irq_status;
    + 	unsigned long channel;
    +@@ drivers/counter/104-quad-8.c: static irqreturn_t quad8_irq_handler(int irq, void *private)
    + 			continue;
    + 		}
    + 
    +-		counter_push_event(&priv->counter, event, channel);
    ++		counter_push_event(counter, event, channel);
    + 	}
    + 
    + 	/* Clear pending interrupts on device */
     @@ drivers/counter/104-quad-8.c: static irqreturn_t quad8_irq_handler(int irq, void *private)
      
      static int quad8_probe(struct device *dev, unsigned int id)
    @@ drivers/counter/104-quad-8.c: static int quad8_probe(struct device *dev, unsigne
      
      	err = devm_request_irq(dev, irq[id], quad8_irq_handler, IRQF_SHARED,
     -			       priv->counter.name, priv);
    -+			       counter->name, priv);
    ++			       counter->name, counter);
      	if (err)
      		return err;
      
16:  728494402580 ! 16:  3ef149d41223 counter: interrupt-cnt: Convert to new counter registration
    @@ Commit message
         struct device.
     
         Fixes: a55ebd47f21f ("counter: add IRQ or GPIO based counter")
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/interrupt-cnt.c ##
17:  fe5266b17ded ! 17:  ad4a85dc9f99 counter: intel-qep: Convert to new counter registration
    @@ Commit message
         struct device.
     
         Fixes: b711f687a1c1 ("counter: Add support for Intel Quadrature Encoder Peripheral")
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/intel-qep.c ##
18:  e2610d673a23 ! 18:  192c5bba00e4 counter: ftm-quaddec: Convert to new counter registration
    @@ Commit message
         struct device.
     
         Fixes: a3b9a99980d9 ("counter: add FlexTimer Module Quadrature decoder counter driver")
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
    - ## drivers/counter/104-quad-8.c ##
    -@@ drivers/counter/104-quad-8.c: static struct counter_count quad8_counts[] = {
    - 
    - static irqreturn_t quad8_irq_handler(int irq, void *private)
    - {
    --	struct quad8 *const priv = private;
    -+	struct counter_device *counter = private;
    -+	struct quad8 *const priv = counter_priv(counter);
    - 	const unsigned long base = priv->base;
    - 	unsigned long irq_status;
    - 	unsigned long channel;
    -@@ drivers/counter/104-quad-8.c: static irqreturn_t quad8_irq_handler(int irq, void *private)
    - 			continue;
    - 		}
    - 
    --		counter_push_event(&priv->counter, event, channel);
    -+		counter_push_event(counter, event, channel);
    - 	}
    - 
    - 	/* Clear pending interrupts on device */
    -@@ drivers/counter/104-quad-8.c: static int quad8_probe(struct device *dev, unsigned int id)
    - 	outb(QUAD8_CHAN_OP_ENABLE_INTERRUPT_FUNC, base[id] + QUAD8_REG_CHAN_OP);
    - 
    - 	err = devm_request_irq(dev, irq[id], quad8_irq_handler, IRQF_SHARED,
    --			       counter->name, priv);
    -+			       counter->name, counter);
    - 	if (err)
    - 		return err;
    - 
    -
      ## drivers/counter/ftm-quaddec.c ##
     @@
      	})
    @@ drivers/counter/ftm-quaddec.c: static struct counter_count ftm_quaddec_counts =
      {
     +	struct counter_device *counter;
      	struct ftm_quaddec *ftm;
    --
    + 
      	struct device_node *node = pdev->dev.of_node;
      	struct resource *io;
      	int ret;
19:  fa10a9c1f369 ! 19:  8df134fb3723 counter: microchip-tcb-capture: Convert to new counter registration
    @@ Commit message
         struct device.
     
         Fixes: 106b104137fd ("counter: Add microchip TCB capture counter")
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/microchip-tcb-capture.c ##
20:  f697f9a17e6d ! 20:  ec4c0c5e183f counter: stm32-timer-cnt: Convert to new counter registration
    @@ Commit message
         struct device.
     
         Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder")
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/stm32-timer-cnt.c ##
21:  4368748521cc ! 21:  2b800479151d counter: stm32-lptimer-cnt: Convert to new counter registration
    @@ Commit message
         struct device.
     
         Fixes: 597f55e3f36c ("counter: stm32-lptimer: add counter device")
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/stm32-lptimer-cnt.c ##
22:  47485ea4bac8 ! 22:  97a2e4aac286 counter: ti-eqep: Convert to new counter registration
    @@ Commit message
         struct device.
     
         Fixes: f213729f6796 ("counter: new TI eQEP driver")
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/ti-eqep.c ##
23:  eb26d7efeede ! 23:  db76bf498f3f counter: remove old and now unused registration API
    @@ Commit message
         Usage of counter_register() yields issues in device lifetime tracking. All
         drivers were converted to the new API, so the old one can go away.
     
    +    Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    +    Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
         Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
     
      ## drivers/counter/counter-core.c ##
    @@ drivers/counter/counter-core.c: static dev_t counter_devt;
      /**
       * counter_alloc - allocate a counter_device
       * @sizeof_priv: size of the driver private data
    +@@ drivers/counter/counter-core.c: void counter_unregister(struct counter_device *const counter)
    + 	wake_up(&counter->events_wait);
    + 
    + 	mutex_unlock(&counter->ops_exist_lock);
    +-
    +-	if (counter->legacy_device)
    +-		put_device(&counter->dev);
    + }
    + EXPORT_SYMBOL_GPL(counter_unregister);
    + 
     @@ drivers/counter/counter-core.c: static void devm_counter_release(void *counter)
      	counter_unregister(counter);
      }

base-commit: a7904a538933c525096ca2ccde1e60d0ee62c08e
prerequisite-patch-id: 9459ad8bc78190558df9123f8bebe28ca1c396ea
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 11/23] counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper
  2021-12-29 15:44 [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
@ 2021-12-29 15:44 ` Uwe Kleine-König
  2021-12-29 15:44 ` [PATCH v3 12/23] counter: stm32-timer-cnt: " Uwe Kleine-König
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2021-12-29 15:44 UTC (permalink / raw)
  To: William Breathitt Gray
  Cc: linux-iio, kernel, Jonathan Cameron, Greg Kroah-Hartman,
	linux-kernel, Fabrice Gasnier, Maxime Coquelin, Alexandre Torgue,
	linux-stm32, linux-arm-kernel

This is a straight forward conversion to the new counter_priv() wrapper.

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/counter/stm32-lptimer-cnt.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/counter/stm32-lptimer-cnt.c b/drivers/counter/stm32-lptimer-cnt.c
index 5168833b1fdf..9cf00e929cc0 100644
--- a/drivers/counter/stm32-lptimer-cnt.c
+++ b/drivers/counter/stm32-lptimer-cnt.c
@@ -141,7 +141,7 @@ static const enum counter_synapse_action stm32_lptim_cnt_synapse_actions[] = {
 static int stm32_lptim_cnt_read(struct counter_device *counter,
 				struct counter_count *count, u64 *val)
 {
-	struct stm32_lptim_cnt *const priv = counter->priv;
+	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 	u32 cnt;
 	int ret;
 
@@ -158,7 +158,7 @@ static int stm32_lptim_cnt_function_read(struct counter_device *counter,
 					 struct counter_count *count,
 					 enum counter_function *function)
 {
-	struct stm32_lptim_cnt *const priv = counter->priv;
+	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 
 	if (!priv->quadrature_mode) {
 		*function = COUNTER_FUNCTION_INCREASE;
@@ -177,7 +177,7 @@ static int stm32_lptim_cnt_function_write(struct counter_device *counter,
 					  struct counter_count *count,
 					  enum counter_function function)
 {
-	struct stm32_lptim_cnt *const priv = counter->priv;
+	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 
 	if (stm32_lptim_is_enabled(priv))
 		return -EBUSY;
@@ -200,7 +200,7 @@ static int stm32_lptim_cnt_enable_read(struct counter_device *counter,
 				       struct counter_count *count,
 				       u8 *enable)
 {
-	struct stm32_lptim_cnt *const priv = counter->priv;
+	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 	int ret;
 
 	ret = stm32_lptim_is_enabled(priv);
@@ -216,7 +216,7 @@ static int stm32_lptim_cnt_enable_write(struct counter_device *counter,
 					struct counter_count *count,
 					u8 enable)
 {
-	struct stm32_lptim_cnt *const priv = counter->priv;
+	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 	int ret;
 
 	/* Check nobody uses the timer, or already disabled/enabled */
@@ -241,7 +241,7 @@ static int stm32_lptim_cnt_ceiling_read(struct counter_device *counter,
 					struct counter_count *count,
 					u64 *ceiling)
 {
-	struct stm32_lptim_cnt *const priv = counter->priv;
+	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 
 	*ceiling = priv->ceiling;
 
@@ -252,7 +252,7 @@ static int stm32_lptim_cnt_ceiling_write(struct counter_device *counter,
 					 struct counter_count *count,
 					 u64 ceiling)
 {
-	struct stm32_lptim_cnt *const priv = counter->priv;
+	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 
 	if (stm32_lptim_is_enabled(priv))
 		return -EBUSY;
@@ -277,7 +277,7 @@ static int stm32_lptim_cnt_action_read(struct counter_device *counter,
 				       struct counter_synapse *synapse,
 				       enum counter_synapse_action *action)
 {
-	struct stm32_lptim_cnt *const priv = counter->priv;
+	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 	enum counter_function function;
 	int err;
 
@@ -321,7 +321,7 @@ static int stm32_lptim_cnt_action_write(struct counter_device *counter,
 					struct counter_synapse *synapse,
 					enum counter_synapse_action action)
 {
-	struct stm32_lptim_cnt *const priv = counter->priv;
+	struct stm32_lptim_cnt *const priv = counter_priv(counter);
 	enum counter_function function;
 	int err;
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 12/23] counter: stm32-timer-cnt: Convert to counter_priv() wrapper
  2021-12-29 15:44 [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
  2021-12-29 15:44 ` [PATCH v3 11/23] counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper Uwe Kleine-König
@ 2021-12-29 15:44 ` Uwe Kleine-König
  2021-12-29 15:44 ` [PATCH v3 20/23] counter: stm32-timer-cnt: Convert to new counter registration Uwe Kleine-König
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2021-12-29 15:44 UTC (permalink / raw)
  To: William Breathitt Gray
  Cc: linux-iio, kernel, Jonathan Cameron, Greg Kroah-Hartman,
	linux-kernel, Fabrice Gasnier, Maxime Coquelin, Alexandre Torgue,
	linux-stm32, linux-arm-kernel

This is a straight forward conversion to the new counter_priv() wrapper.

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/counter/stm32-timer-cnt.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
index 0546e932db0c..4b05b198a8d8 100644
--- a/drivers/counter/stm32-timer-cnt.c
+++ b/drivers/counter/stm32-timer-cnt.c
@@ -47,7 +47,7 @@ static const enum counter_function stm32_count_functions[] = {
 static int stm32_count_read(struct counter_device *counter,
 			    struct counter_count *count, u64 *val)
 {
-	struct stm32_timer_cnt *const priv = counter->priv;
+	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 cnt;
 
 	regmap_read(priv->regmap, TIM_CNT, &cnt);
@@ -59,7 +59,7 @@ static int stm32_count_read(struct counter_device *counter,
 static int stm32_count_write(struct counter_device *counter,
 			     struct counter_count *count, const u64 val)
 {
-	struct stm32_timer_cnt *const priv = counter->priv;
+	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 ceiling;
 
 	regmap_read(priv->regmap, TIM_ARR, &ceiling);
@@ -73,7 +73,7 @@ static int stm32_count_function_read(struct counter_device *counter,
 				     struct counter_count *count,
 				     enum counter_function *function)
 {
-	struct stm32_timer_cnt *const priv = counter->priv;
+	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 smcr;
 
 	regmap_read(priv->regmap, TIM_SMCR, &smcr);
@@ -100,7 +100,7 @@ static int stm32_count_function_write(struct counter_device *counter,
 				      struct counter_count *count,
 				      enum counter_function function)
 {
-	struct stm32_timer_cnt *const priv = counter->priv;
+	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 cr1, sms;
 
 	switch (function) {
@@ -140,7 +140,7 @@ static int stm32_count_direction_read(struct counter_device *counter,
 				      struct counter_count *count,
 				      enum counter_count_direction *direction)
 {
-	struct stm32_timer_cnt *const priv = counter->priv;
+	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 cr1;
 
 	regmap_read(priv->regmap, TIM_CR1, &cr1);
@@ -153,7 +153,7 @@ static int stm32_count_direction_read(struct counter_device *counter,
 static int stm32_count_ceiling_read(struct counter_device *counter,
 				    struct counter_count *count, u64 *ceiling)
 {
-	struct stm32_timer_cnt *const priv = counter->priv;
+	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 arr;
 
 	regmap_read(priv->regmap, TIM_ARR, &arr);
@@ -166,7 +166,7 @@ static int stm32_count_ceiling_read(struct counter_device *counter,
 static int stm32_count_ceiling_write(struct counter_device *counter,
 				     struct counter_count *count, u64 ceiling)
 {
-	struct stm32_timer_cnt *const priv = counter->priv;
+	struct stm32_timer_cnt *const priv = counter_priv(counter);
 
 	if (ceiling > priv->max_arr)
 		return -ERANGE;
@@ -181,7 +181,7 @@ static int stm32_count_ceiling_write(struct counter_device *counter,
 static int stm32_count_enable_read(struct counter_device *counter,
 				   struct counter_count *count, u8 *enable)
 {
-	struct stm32_timer_cnt *const priv = counter->priv;
+	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 cr1;
 
 	regmap_read(priv->regmap, TIM_CR1, &cr1);
@@ -194,7 +194,7 @@ static int stm32_count_enable_read(struct counter_device *counter,
 static int stm32_count_enable_write(struct counter_device *counter,
 				    struct counter_count *count, u8 enable)
 {
-	struct stm32_timer_cnt *const priv = counter->priv;
+	struct stm32_timer_cnt *const priv = counter_priv(counter);
 	u32 cr1;
 
 	if (enable) {
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 20/23] counter: stm32-timer-cnt: Convert to new counter registration
  2021-12-29 15:44 [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
  2021-12-29 15:44 ` [PATCH v3 11/23] counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper Uwe Kleine-König
  2021-12-29 15:44 ` [PATCH v3 12/23] counter: stm32-timer-cnt: " Uwe Kleine-König
@ 2021-12-29 15:44 ` Uwe Kleine-König
  2021-12-29 15:44 ` [PATCH v3 21/23] counter: stm32-lptimer-cnt: " Uwe Kleine-König
  2021-12-30  8:53 ` [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
  4 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2021-12-29 15:44 UTC (permalink / raw)
  To: William Breathitt Gray
  Cc: linux-iio, kernel, Jonathan Cameron, Greg Kroah-Hartman,
	linux-kernel, Fabrice Gasnier, Maxime Coquelin, Alexandre Torgue,
	linux-stm32, linux-arm-kernel

This fixes device lifetime issues where it was possible to free a live
struct device.

Fixes: ad29937e206f ("counter: Add STM32 Timer quadrature encoder")
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/counter/stm32-timer-cnt.c | 30 ++++++++++++++++++------------
 1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/drivers/counter/stm32-timer-cnt.c b/drivers/counter/stm32-timer-cnt.c
index 4b05b198a8d8..5779ae7c73cf 100644
--- a/drivers/counter/stm32-timer-cnt.c
+++ b/drivers/counter/stm32-timer-cnt.c
@@ -29,7 +29,6 @@ struct stm32_timer_regs {
 };
 
 struct stm32_timer_cnt {
-	struct counter_device counter;
 	struct regmap *regmap;
 	struct clk *clk;
 	u32 max_arr;
@@ -317,31 +316,38 @@ static int stm32_timer_cnt_probe(struct platform_device *pdev)
 	struct stm32_timers *ddata = dev_get_drvdata(pdev->dev.parent);
 	struct device *dev = &pdev->dev;
 	struct stm32_timer_cnt *priv;
+	struct counter_device *counter;
+	int ret;
 
 	if (IS_ERR_OR_NULL(ddata))
 		return -EINVAL;
 
-	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-	if (!priv)
+	counter = devm_counter_alloc(dev, sizeof(*priv));
+	if (!counter)
 		return -ENOMEM;
 
+	priv = counter_priv(counter);
+
 	priv->regmap = ddata->regmap;
 	priv->clk = ddata->clk;
 	priv->max_arr = ddata->max_arr;
 
-	priv->counter.name = dev_name(dev);
-	priv->counter.parent = dev;
-	priv->counter.ops = &stm32_timer_cnt_ops;
-	priv->counter.counts = &stm32_counts;
-	priv->counter.num_counts = 1;
-	priv->counter.signals = stm32_signals;
-	priv->counter.num_signals = ARRAY_SIZE(stm32_signals);
-	priv->counter.priv = priv;
+	counter->name = dev_name(dev);
+	counter->parent = dev;
+	counter->ops = &stm32_timer_cnt_ops;
+	counter->counts = &stm32_counts;
+	counter->num_counts = 1;
+	counter->signals = stm32_signals;
+	counter->num_signals = ARRAY_SIZE(stm32_signals);
 
 	platform_set_drvdata(pdev, priv);
 
 	/* Register Counter device */
-	return devm_counter_register(dev, &priv->counter);
+	ret = devm_counter_add(dev, counter);
+	if (ret < 0)
+		dev_err_probe(dev, ret, "Failed to add counter\n");
+
+	return ret;
 }
 
 static int __maybe_unused stm32_timer_cnt_suspend(struct device *dev)
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v3 21/23] counter: stm32-lptimer-cnt: Convert to new counter registration
  2021-12-29 15:44 [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
                   ` (2 preceding siblings ...)
  2021-12-29 15:44 ` [PATCH v3 20/23] counter: stm32-timer-cnt: Convert to new counter registration Uwe Kleine-König
@ 2021-12-29 15:44 ` Uwe Kleine-König
  2021-12-30  8:53 ` [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
  4 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2021-12-29 15:44 UTC (permalink / raw)
  To: William Breathitt Gray
  Cc: linux-iio, kernel, Jonathan Cameron, Greg Kroah-Hartman,
	linux-kernel, Fabrice Gasnier, Maxime Coquelin, Alexandre Torgue,
	linux-stm32, linux-arm-kernel

This fixes device lifetime issues where it was possible to free a live
struct device.

Fixes: 597f55e3f36c ("counter: stm32-lptimer: add counter device")
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
 drivers/counter/stm32-lptimer-cnt.c | 33 +++++++++++++++++------------
 1 file changed, 19 insertions(+), 14 deletions(-)

diff --git a/drivers/counter/stm32-lptimer-cnt.c b/drivers/counter/stm32-lptimer-cnt.c
index 9cf00e929cc0..68031d93ce89 100644
--- a/drivers/counter/stm32-lptimer-cnt.c
+++ b/drivers/counter/stm32-lptimer-cnt.c
@@ -20,7 +20,6 @@
 #include <linux/types.h>
 
 struct stm32_lptim_cnt {
-	struct counter_device counter;
 	struct device *dev;
 	struct regmap *regmap;
 	struct clk *clk;
@@ -411,14 +410,17 @@ static struct counter_count stm32_lptim_in1_counts = {
 static int stm32_lptim_cnt_probe(struct platform_device *pdev)
 {
 	struct stm32_lptimer *ddata = dev_get_drvdata(pdev->dev.parent);
+	struct counter_device *counter;
 	struct stm32_lptim_cnt *priv;
+	int ret;
 
 	if (IS_ERR_OR_NULL(ddata))
 		return -EINVAL;
 
-	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
-	if (!priv)
+	counter = devm_counter_alloc(&pdev->dev, sizeof(*priv));
+	if (!counter)
 		return -ENOMEM;
+	priv = counter_priv(counter);
 
 	priv->dev = &pdev->dev;
 	priv->regmap = ddata->regmap;
@@ -426,23 +428,26 @@ static int stm32_lptim_cnt_probe(struct platform_device *pdev)
 	priv->ceiling = STM32_LPTIM_MAX_ARR;
 
 	/* Initialize Counter device */
-	priv->counter.name = dev_name(&pdev->dev);
-	priv->counter.parent = &pdev->dev;
-	priv->counter.ops = &stm32_lptim_cnt_ops;
+	counter->name = dev_name(&pdev->dev);
+	counter->parent = &pdev->dev;
+	counter->ops = &stm32_lptim_cnt_ops;
 	if (ddata->has_encoder) {
-		priv->counter.counts = &stm32_lptim_enc_counts;
-		priv->counter.num_signals = ARRAY_SIZE(stm32_lptim_cnt_signals);
+		counter->counts = &stm32_lptim_enc_counts;
+		counter->num_signals = ARRAY_SIZE(stm32_lptim_cnt_signals);
 	} else {
-		priv->counter.counts = &stm32_lptim_in1_counts;
-		priv->counter.num_signals = 1;
+		counter->counts = &stm32_lptim_in1_counts;
+		counter->num_signals = 1;
 	}
-	priv->counter.num_counts = 1;
-	priv->counter.signals = stm32_lptim_cnt_signals;
-	priv->counter.priv = priv;
+	counter->num_counts = 1;
+	counter->signals = stm32_lptim_cnt_signals;
 
 	platform_set_drvdata(pdev, priv);
 
-	return devm_counter_register(&pdev->dev, &priv->counter);
+	ret = devm_counter_add(&pdev->dev, counter);
+	if (ret < 0)
+		return dev_err_probe(&pdev->dev, ret, "Failed to add counter\n");
+
+	return 0;
 }
 
 #ifdef CONFIG_PM_SLEEP
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 00/23] counter: cleanups and device lifetime fixes
  2021-12-29 15:44 [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
                   ` (3 preceding siblings ...)
  2021-12-29 15:44 ` [PATCH v3 21/23] counter: stm32-lptimer-cnt: " Uwe Kleine-König
@ 2021-12-30  8:53 ` Uwe Kleine-König
  2021-12-30 12:31   ` Greg Kroah-Hartman
  2021-12-30 14:58   ` Jonathan Cameron
  4 siblings, 2 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2021-12-30  8:53 UTC (permalink / raw)
  To: William Breathitt Gray, Greg Kroah-Hartman, Jonathan Cameron
  Cc: Kamel Bouhara, Ahmad Fatoum, David Lechner, Jonathan Corbet,
	linux-iio, linux-kernel, Oleksij Rempel, Alexandre Torgue,
	Fabrice Gasnier, Jarkko Nikula, linux-arm-kernel, kernel,
	Patrick Havelange, Syed Nayyar Waris, linux-stm32,
	Maxime Coquelin


[-- Attachment #1.1: Type: text/plain, Size: 3391 bytes --]

Hello,

On Wed, Dec 29, 2021 at 04:44:18PM +0100, Uwe Kleine-König wrote:
> this is v3 of my series to fix device lifetime issues in the counter
> framework. This hopefully addresses all things pointed out for v2.
> 
> Note this depends on 60f07e74f86b (which is in next) now. Full diffstat
> below.
> 
> Things that could be further improved:
> 
> [...]
> 
> Uwe Kleine-König (23):
>   counter: Use container_of instead of drvdata to track counter_device
>   counter: ftm-quaddec: Drop unused platform_set_drvdata()
>   counter: microchip-tcb-capture: Drop unused platform_set_drvdata()
>   counter: Provide a wrapper to access device private data
>   counter: 104-quad-8: Convert to counter_priv() wrapper
>   counter: interrupt-cnt: Convert to counter_priv() wrapper
>   counter: microchip-tcb-capture: Convert to counter_priv() wrapper
>   counter: intel-qep: Convert to counter_priv() wrapper
>   counter: ftm-quaddec: Convert to counter_priv() wrapper
>   counter: ti-eqep: Convert to counter_priv() wrapper
>   counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper
>   counter: stm32-timer-cnt: Convert to counter_priv() wrapper
>   counter: Provide alternative counter registration functions
>   counter: Update documentation for new counter registration functions
>   counter: 104-quad-8: Convert to new counter registration
>   counter: interrupt-cnt: Convert to new counter registration
>   counter: intel-qep: Convert to new counter registration
>   counter: ftm-quaddec: Convert to new counter registration
>   counter: microchip-tcb-capture: Convert to new counter registration
>   counter: stm32-timer-cnt: Convert to new counter registration
>   counter: stm32-lptimer-cnt: Convert to new counter registration
>   counter: ti-eqep: Convert to new counter registration
>   counter: remove old and now unused registration API
> 
>  Documentation/driver-api/generic-counter.rst |  10 +-
>  drivers/counter/104-quad-8.c                 |  93 +++++-----
>  drivers/counter/counter-core.c               | 186 ++++++++++++++-----
>  drivers/counter/ftm-quaddec.c                |  36 ++--
>  drivers/counter/intel-qep.c                  |  46 ++---
>  drivers/counter/interrupt-cnt.c              |  38 ++--
>  drivers/counter/microchip-tcb-capture.c      |  44 ++---
>  drivers/counter/stm32-lptimer-cnt.c          |  51 ++---
>  drivers/counter/stm32-timer-cnt.c            |  48 ++---
>  drivers/counter/ti-eqep.c                    |  31 ++--
>  include/linux/counter.h                      |  15 +-
>  11 files changed, 356 insertions(+), 242 deletions(-)
> 
> Range-diff against v2:
> [...]
> 
> base-commit: a7904a538933c525096ca2ccde1e60d0ee62c08e
> prerequisite-patch-id: 9459ad8bc78190558df9123f8bebe28ca1c396ea

All patches have a blessing by at least one of William and Jonathan.
The prerequisite commit (60f07e74f86b) is in Greg's char-misc-next branch.

Assuming noone still finds a problem in this series that requires me to
respin I wonder who will pick it up? Greg?

Given that it fixes a possible use-after-free in all counter drivers,
I'd like to see it hit before v5.17-rc1. For 5.16 it's probably too
late.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 00/23] counter: cleanups and device lifetime fixes
  2021-12-30  8:53 ` [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
@ 2021-12-30 12:31   ` Greg Kroah-Hartman
  2021-12-30 14:58   ` Jonathan Cameron
  1 sibling, 0 replies; 9+ messages in thread
From: Greg Kroah-Hartman @ 2021-12-30 12:31 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: William Breathitt Gray, Jonathan Cameron, Kamel Bouhara,
	Ahmad Fatoum, David Lechner, Jonathan Corbet, linux-iio,
	linux-kernel, Oleksij Rempel, Alexandre Torgue, Fabrice Gasnier,
	Jarkko Nikula, linux-arm-kernel, kernel, Patrick Havelange,
	Syed Nayyar Waris, linux-stm32, Maxime Coquelin

On Thu, Dec 30, 2021 at 09:53:51AM +0100, Uwe Kleine-König wrote:
> Hello,
> 
> On Wed, Dec 29, 2021 at 04:44:18PM +0100, Uwe Kleine-König wrote:
> > this is v3 of my series to fix device lifetime issues in the counter
> > framework. This hopefully addresses all things pointed out for v2.
> > 
> > Note this depends on 60f07e74f86b (which is in next) now. Full diffstat
> > below.
> > 
> > Things that could be further improved:
> > 
> > [...]
> > 
> > Uwe Kleine-König (23):
> >   counter: Use container_of instead of drvdata to track counter_device
> >   counter: ftm-quaddec: Drop unused platform_set_drvdata()
> >   counter: microchip-tcb-capture: Drop unused platform_set_drvdata()
> >   counter: Provide a wrapper to access device private data
> >   counter: 104-quad-8: Convert to counter_priv() wrapper
> >   counter: interrupt-cnt: Convert to counter_priv() wrapper
> >   counter: microchip-tcb-capture: Convert to counter_priv() wrapper
> >   counter: intel-qep: Convert to counter_priv() wrapper
> >   counter: ftm-quaddec: Convert to counter_priv() wrapper
> >   counter: ti-eqep: Convert to counter_priv() wrapper
> >   counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper
> >   counter: stm32-timer-cnt: Convert to counter_priv() wrapper
> >   counter: Provide alternative counter registration functions
> >   counter: Update documentation for new counter registration functions
> >   counter: 104-quad-8: Convert to new counter registration
> >   counter: interrupt-cnt: Convert to new counter registration
> >   counter: intel-qep: Convert to new counter registration
> >   counter: ftm-quaddec: Convert to new counter registration
> >   counter: microchip-tcb-capture: Convert to new counter registration
> >   counter: stm32-timer-cnt: Convert to new counter registration
> >   counter: stm32-lptimer-cnt: Convert to new counter registration
> >   counter: ti-eqep: Convert to new counter registration
> >   counter: remove old and now unused registration API
> > 
> >  Documentation/driver-api/generic-counter.rst |  10 +-
> >  drivers/counter/104-quad-8.c                 |  93 +++++-----
> >  drivers/counter/counter-core.c               | 186 ++++++++++++++-----
> >  drivers/counter/ftm-quaddec.c                |  36 ++--
> >  drivers/counter/intel-qep.c                  |  46 ++---
> >  drivers/counter/interrupt-cnt.c              |  38 ++--
> >  drivers/counter/microchip-tcb-capture.c      |  44 ++---
> >  drivers/counter/stm32-lptimer-cnt.c          |  51 ++---
> >  drivers/counter/stm32-timer-cnt.c            |  48 ++---
> >  drivers/counter/ti-eqep.c                    |  31 ++--
> >  include/linux/counter.h                      |  15 +-
> >  11 files changed, 356 insertions(+), 242 deletions(-)
> > 
> > Range-diff against v2:
> > [...]
> > 
> > base-commit: a7904a538933c525096ca2ccde1e60d0ee62c08e
> > prerequisite-patch-id: 9459ad8bc78190558df9123f8bebe28ca1c396ea
> 
> All patches have a blessing by at least one of William and Jonathan.
> The prerequisite commit (60f07e74f86b) is in Greg's char-misc-next branch.
> 
> Assuming noone still finds a problem in this series that requires me to
> respin I wonder who will pick it up? Greg?
> 
> Given that it fixes a possible use-after-free in all counter drivers,
> I'd like to see it hit before v5.17-rc1. For 5.16 it's probably too
> late.

Of course it is too later for 5.16, sorry.

I'll queue this up to my tree now, for 5.17-rc1, thanks.

greg k-h

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 00/23] counter: cleanups and device lifetime fixes
  2021-12-30  8:53 ` [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
  2021-12-30 12:31   ` Greg Kroah-Hartman
@ 2021-12-30 14:58   ` Jonathan Cameron
  2021-12-30 15:08     ` Uwe Kleine-König
  1 sibling, 1 reply; 9+ messages in thread
From: Jonathan Cameron @ 2021-12-30 14:58 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: William Breathitt Gray, Greg Kroah-Hartman, Jonathan Cameron,
	Kamel Bouhara, Ahmad Fatoum, David Lechner, Jonathan Corbet,
	linux-iio, linux-kernel, Oleksij Rempel, Alexandre Torgue,
	Fabrice Gasnier, Jarkko Nikula, linux-arm-kernel, kernel,
	Patrick Havelange, Syed Nayyar Waris, linux-stm32,
	Maxime Coquelin

On Thu, 30 Dec 2021 09:53:51 +0100
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:

> Hello,
> 
> On Wed, Dec 29, 2021 at 04:44:18PM +0100, Uwe Kleine-König wrote:
> > this is v3 of my series to fix device lifetime issues in the counter
> > framework. This hopefully addresses all things pointed out for v2.
> > 
> > Note this depends on 60f07e74f86b (which is in next) now. Full diffstat
> > below.
> > 
> > Things that could be further improved:
> > 
> > [...]
> > 
> > Uwe Kleine-König (23):
> >   counter: Use container_of instead of drvdata to track counter_device
> >   counter: ftm-quaddec: Drop unused platform_set_drvdata()
> >   counter: microchip-tcb-capture: Drop unused platform_set_drvdata()
> >   counter: Provide a wrapper to access device private data
> >   counter: 104-quad-8: Convert to counter_priv() wrapper
> >   counter: interrupt-cnt: Convert to counter_priv() wrapper
> >   counter: microchip-tcb-capture: Convert to counter_priv() wrapper
> >   counter: intel-qep: Convert to counter_priv() wrapper
> >   counter: ftm-quaddec: Convert to counter_priv() wrapper
> >   counter: ti-eqep: Convert to counter_priv() wrapper
> >   counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper
> >   counter: stm32-timer-cnt: Convert to counter_priv() wrapper
> >   counter: Provide alternative counter registration functions
> >   counter: Update documentation for new counter registration functions
> >   counter: 104-quad-8: Convert to new counter registration
> >   counter: interrupt-cnt: Convert to new counter registration
> >   counter: intel-qep: Convert to new counter registration
> >   counter: ftm-quaddec: Convert to new counter registration
> >   counter: microchip-tcb-capture: Convert to new counter registration
> >   counter: stm32-timer-cnt: Convert to new counter registration
> >   counter: stm32-lptimer-cnt: Convert to new counter registration
> >   counter: ti-eqep: Convert to new counter registration
> >   counter: remove old and now unused registration API
> > 
> >  Documentation/driver-api/generic-counter.rst |  10 +-
> >  drivers/counter/104-quad-8.c                 |  93 +++++-----
> >  drivers/counter/counter-core.c               | 186 ++++++++++++++-----
> >  drivers/counter/ftm-quaddec.c                |  36 ++--
> >  drivers/counter/intel-qep.c                  |  46 ++---
> >  drivers/counter/interrupt-cnt.c              |  38 ++--
> >  drivers/counter/microchip-tcb-capture.c      |  44 ++---
> >  drivers/counter/stm32-lptimer-cnt.c          |  51 ++---
> >  drivers/counter/stm32-timer-cnt.c            |  48 ++---
> >  drivers/counter/ti-eqep.c                    |  31 ++--
> >  include/linux/counter.h                      |  15 +-
> >  11 files changed, 356 insertions(+), 242 deletions(-)
> > 
> > Range-diff against v2:
> > [...]
> > 
> > base-commit: a7904a538933c525096ca2ccde1e60d0ee62c08e
> > prerequisite-patch-id: 9459ad8bc78190558df9123f8bebe28ca1c396ea  
> 
> All patches have a blessing by at least one of William and Jonathan.

For future reference (may be fine this time) William has final say on counter
stuff as the maintainer so treat my input as just another set of eyes.

Anyhow, plenty of time for any necessary fixes during the RCs so shouldn't
be a problem.

Jonathan


> The prerequisite commit (60f07e74f86b) is in Greg's char-misc-next branch.
> 
> Assuming noone still finds a problem in this series that requires me to
> respin I wonder who will pick it up? Greg?
> 
> Given that it fixes a possible use-after-free in all counter drivers,
> I'd like to see it hit before v5.17-rc1. For 5.16 it's probably too
> late.
> 
> Best regards
> Uwe
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v3 00/23] counter: cleanups and device lifetime fixes
  2021-12-30 14:58   ` Jonathan Cameron
@ 2021-12-30 15:08     ` Uwe Kleine-König
  0 siblings, 0 replies; 9+ messages in thread
From: Uwe Kleine-König @ 2021-12-30 15:08 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Kamel Bouhara, Ahmad Fatoum, David Lechner, Jonathan Corbet,
	linux-iio, Greg Kroah-Hartman, William Breathitt Gray,
	Maxime Coquelin, linux-kernel, Alexandre Torgue, Fabrice Gasnier,
	Jarkko Nikula, kernel, Jonathan Cameron, Syed Nayyar Waris,
	Oleksij Rempel, Patrick Havelange, linux-stm32, linux-arm-kernel


[-- Attachment #1.1: Type: text/plain, Size: 4105 bytes --]

On Thu, Dec 30, 2021 at 02:58:26PM +0000, Jonathan Cameron wrote:
> On Thu, 30 Dec 2021 09:53:51 +0100
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> wrote:
> 
> > Hello,
> > 
> > On Wed, Dec 29, 2021 at 04:44:18PM +0100, Uwe Kleine-König wrote:
> > > this is v3 of my series to fix device lifetime issues in the counter
> > > framework. This hopefully addresses all things pointed out for v2.
> > > 
> > > Note this depends on 60f07e74f86b (which is in next) now. Full diffstat
> > > below.
> > > 
> > > Things that could be further improved:
> > > 
> > > [...]
> > > 
> > > Uwe Kleine-König (23):
> > >   counter: Use container_of instead of drvdata to track counter_device
> > >   counter: ftm-quaddec: Drop unused platform_set_drvdata()
> > >   counter: microchip-tcb-capture: Drop unused platform_set_drvdata()
> > >   counter: Provide a wrapper to access device private data
> > >   counter: 104-quad-8: Convert to counter_priv() wrapper
> > >   counter: interrupt-cnt: Convert to counter_priv() wrapper
> > >   counter: microchip-tcb-capture: Convert to counter_priv() wrapper
> > >   counter: intel-qep: Convert to counter_priv() wrapper
> > >   counter: ftm-quaddec: Convert to counter_priv() wrapper
> > >   counter: ti-eqep: Convert to counter_priv() wrapper
> > >   counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper
> > >   counter: stm32-timer-cnt: Convert to counter_priv() wrapper
> > >   counter: Provide alternative counter registration functions
> > >   counter: Update documentation for new counter registration functions
> > >   counter: 104-quad-8: Convert to new counter registration
> > >   counter: interrupt-cnt: Convert to new counter registration
> > >   counter: intel-qep: Convert to new counter registration
> > >   counter: ftm-quaddec: Convert to new counter registration
> > >   counter: microchip-tcb-capture: Convert to new counter registration
> > >   counter: stm32-timer-cnt: Convert to new counter registration
> > >   counter: stm32-lptimer-cnt: Convert to new counter registration
> > >   counter: ti-eqep: Convert to new counter registration
> > >   counter: remove old and now unused registration API
> > > 
> > >  Documentation/driver-api/generic-counter.rst |  10 +-
> > >  drivers/counter/104-quad-8.c                 |  93 +++++-----
> > >  drivers/counter/counter-core.c               | 186 ++++++++++++++-----
> > >  drivers/counter/ftm-quaddec.c                |  36 ++--
> > >  drivers/counter/intel-qep.c                  |  46 ++---
> > >  drivers/counter/interrupt-cnt.c              |  38 ++--
> > >  drivers/counter/microchip-tcb-capture.c      |  44 ++---
> > >  drivers/counter/stm32-lptimer-cnt.c          |  51 ++---
> > >  drivers/counter/stm32-timer-cnt.c            |  48 ++---
> > >  drivers/counter/ti-eqep.c                    |  31 ++--
> > >  include/linux/counter.h                      |  15 +-
> > >  11 files changed, 356 insertions(+), 242 deletions(-)
> > > 
> > > Range-diff against v2:
> > > [...]
> > > 
> > > base-commit: a7904a538933c525096ca2ccde1e60d0ee62c08e
> > > prerequisite-patch-id: 9459ad8bc78190558df9123f8bebe28ca1c396ea  
> > 
> > All patches have a blessing by at least one of William and Jonathan.
> 
> For future reference (may be fine this time) William has final say on counter
> stuff as the maintainer so treat my input as just another set of eyes.

Yeah, right. William only didn't ack patch 13 but wrote in reply it in v2:

	I agree with the approach taken in this patch, and I don't have much to
	add after the suggestions Lars-Peter and Jonathan have already given. So
	assuming those are addressed in the next version I expect to Ack this
	patch as well.

So I assume it's just that William didn't have the time yet to look into
v3 (or v4 that I just sent out) yet.

Best regards and thanks to all who gave feedback to improve this patch
set,
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-12-30 15:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 15:44 [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
2021-12-29 15:44 ` [PATCH v3 11/23] counter: stm32-lptimer-cnt: Convert to counter_priv() wrapper Uwe Kleine-König
2021-12-29 15:44 ` [PATCH v3 12/23] counter: stm32-timer-cnt: " Uwe Kleine-König
2021-12-29 15:44 ` [PATCH v3 20/23] counter: stm32-timer-cnt: Convert to new counter registration Uwe Kleine-König
2021-12-29 15:44 ` [PATCH v3 21/23] counter: stm32-lptimer-cnt: " Uwe Kleine-König
2021-12-30  8:53 ` [PATCH v3 00/23] counter: cleanups and device lifetime fixes Uwe Kleine-König
2021-12-30 12:31   ` Greg Kroah-Hartman
2021-12-30 14:58   ` Jonathan Cameron
2021-12-30 15:08     ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).