All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/4] iio: move IIO to the cleanup.h magic
@ 2024-02-29 15:10 Nuno Sa
  2024-02-29 15:10 ` [PATCH v3 1/4] iio: core: move to " Nuno Sa
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Nuno Sa @ 2024-02-29 15:10 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, Lars-Peter Clausen

Hi,

In v3, I decided to drop the scope_guard_cond() usage (which meant
dropping the event patch). Given the discussion on the cond_guard()
patches, I think it's better to hold those conversions a bit
since Linus came with a suggestion that will potentially change
scope_guard_cond() - and for the better IMO.

Another significant change is the __free(kfree) in all allocations in
inkern.c. I have to admit that I'm not a fan of the in place declaration
(too much time looking at kernel code I guess) but it makes the style
more consistent (as we are doing the automatic cleanup in the locks).  

v1:
 * https://lore.kernel.org/all/20240221-iio-use-cleanup-magic-v1-0-f9c292666f26@analog.com/

v2:
 * https://lore.kernel.org/r/20240223-iio-use-cleanup-magic-v2-0-f6b4848c1f34@analog.com

v3:
 - Patch 1:
  * Do not use scope_guard_cond();
  * Directly return -ENODEV and don't initialize ret.
 - Patch 2:
  * Removed bonus space;
  * Used the normal error check flow in iio_trigger_get_irq().
 - Patch 3:
  * Refactored the state and ret conditions in iio_scan_mask_query();
  * Removed ternary operator check in enable_store().
 - Patch 4:
  * Still use goto at the error patch in iio_map_array_unregister_locked();
  * Used __free(kfree) + return_ptr() in places where allocations are
    done;
  * Keep the else branch in iio_read_channel_processed_scale();
  * Removed the comment in iio_channel_read_min().
  

---
Nuno Sa (4):
      iio: core: move to cleanup.h magic
      iio: trigger: move to the cleanup.h magic
      iio: buffer: iio: core: move to the cleanup.h magic
      iio: inkern: move to the cleanup.h magic

 drivers/iio/industrialio-buffer.c  | 122 +++++++-----------
 drivers/iio/industrialio-core.c    |  34 ++---
 drivers/iio/industrialio-trigger.c |  71 +++++------
 drivers/iio/inkern.c               | 255 +++++++++++++------------------------
 4 files changed, 176 insertions(+), 306 deletions(-)
---
base-commit: 3cc5ebd3a2d6247aeba81873d6b040d5d87f7db1
change-id: 20240223-iio-use-cleanup-magic-9efe3b0a073d
--

Thanks!
- Nuno Sá


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

end of thread, other threads:[~2024-03-23 18:10 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29 15:10 [PATCH v3 0/4] iio: move IIO to the cleanup.h magic Nuno Sa
2024-02-29 15:10 ` [PATCH v3 1/4] iio: core: move to " Nuno Sa
2024-02-29 15:10 ` [PATCH v3 2/4] iio: trigger: move to the " Nuno Sa
2024-03-16 19:32   ` Andy Shevchenko
2024-03-18 12:33     ` Jonathan Cameron
2024-03-18 13:12       ` Andy Shevchenko
2024-03-18 14:15         ` Jonathan Cameron
2024-03-16 19:39   ` Andy Shevchenko
2024-03-18  9:22     ` Nuno Sá
2024-02-29 15:10 ` [PATCH v3 3/4] iio: buffer: iio: core: " Nuno Sa
2024-03-16 19:38   ` Andy Shevchenko
2024-03-18  9:23     ` Nuno Sá
2024-03-18 12:35     ` Jonathan Cameron
2024-03-16 19:49   ` Andy Shevchenko
2024-02-29 15:10 ` [PATCH v3 4/4] iio: inkern: " Nuno Sa
2024-03-03 14:24   ` Jonathan Cameron
2024-03-04  8:04     ` Nuno Sá
2024-03-09 17:41       ` Jonathan Cameron
2024-03-16 13:26         ` Jonathan Cameron
2024-03-16 19:48   ` Andy Shevchenko
2024-03-18  9:20     ` Nuno Sá
2024-03-23 18:09     ` Jonathan Cameron

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.