Re: [PATCH 02/27] iio: chemical: scd30: Use guard(mutex) to allow early returns

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/4/25 2:02 PM, Jonathan Cameron wrote:
> From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> 
> Auto cleanup based release of the lock allows for simpler code flow in a
> few functions with large multiplexing style switch statements and no
> common operations following the switch.
> 
> Suggested-by: David Lechner <dlechner@xxxxxxxxxxxx>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Cc: Tomasz Duszynski <tomasz.duszynski@xxxxxxxxxxx>
> ---
>  drivers/iio/chemical/scd30_core.c | 63 ++++++++++++++-----------------
>  1 file changed, 28 insertions(+), 35 deletions(-)
> 
> diff --git a/drivers/iio/chemical/scd30_core.c b/drivers/iio/chemical/scd30_core.c
> index d613c54cb28d..7a864b52adf1 100644
> --- a/drivers/iio/chemical/scd30_core.c
> +++ b/drivers/iio/chemical/scd30_core.c
> @@ -6,6 +6,7 @@
>   */
>  #include <linux/bits.h>
>  #include <linux/completion.h>
> +#include <linux/cleanup.h>

Alphabetical order?





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux