Re: [PATCH] media: atomisp: gmin: Use str_on_off() helper
From: Andy Shevchenko
Date: Thu Jun 11 2026 - 01:38:40 EST
On Wed, Jun 10, 2026 at 08:23:48PM +0200, Mert Seftali wrote:
> Replace the open-coded "on" : "off" ternary with the standard
> str_on_off() helper from <linux/string_choices.h>. This improves
> readability and reuses the kernel's existing string helper instead of
> duplicating the literals.
>
> No functional change intended.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
but see a couple of nit-picks below.
...
> #include <linux/gpio/consumer.h>
> #include <linux/gpio.h>
> #include <linux/platform_device.h>
> +#include <linux/string_choices.h>
While at it, perhaps add a blank line here.
> #include "../../include/linux/atomisp_platform.h"
> #include "../../include/linux/atomisp_gmin_platform.h"
...
> dev_dbg(subdev->dev, "Setting power state to %s\n",
> - on ? "on" : "off");
> + str_on_off(on));
Now this goes to be perfectly one line.
--
With Best Regards,
Andy Shevchenko