lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=Mc5XfcQPsw1K70ogT6Oyxhy=PJ8neHT9xA8wrZmk069eQ@mail.gmail.com>
Date: Thu, 20 Feb 2025 12:08:18 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Koichiro Den <koichiro.den@...onical.com>
Cc: linux-gpio@...r.kernel.org, geert+renesas@...der.be, 
	linus.walleij@...aro.org, maciej.borzecki@...onical.com, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 2/3] gpio: sim: convert to use dev-sync-probe utilities

On Tue, Feb 18, 2025 at 5:04 PM Koichiro Den <koichiro.den@...onical.com> wrote:
>
> Update gpio-sim to use the new dev-sync-probe helper functions for
> synchronized platform device creation, reducing code duplication.
>
> No functional change.
>
> Signed-off-by: Koichiro Den <koichiro.den@...onical.com>
> ---
>  drivers/gpio/Kconfig    |  2 +
>  drivers/gpio/gpio-sim.c | 84 ++++++-----------------------------------
>  2 files changed, 14 insertions(+), 72 deletions(-)
>
> diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
> index 2e4c5f0a94f7..ba06f052b9ea 100644
> --- a/drivers/gpio/Kconfig
> +++ b/drivers/gpio/Kconfig
> @@ -1866,6 +1866,7 @@ endmenu
>  # This symbol is selected by drivers that need synchronous fake device creation
>  config DEV_SYNC_PROBE
>         tristate "Utilities for synchronous fake device creation"
> +       depends on GPIO_SIM

No, it does not. Please drop this.

>         help
>           Common helper functions for drivers that need synchronous fake
>           device creation.
> @@ -1916,6 +1917,7 @@ config GPIO_SIM
>         tristate "GPIO Simulator Module"
>         select IRQ_SIM
>         select CONFIGFS_FS
> +       select DEV_SYNC_PROBE
>         help
>           This enables the GPIO simulator - a configfs-based GPIO testing
>           driver.
> diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c
> index a086087ada17..d1cdea450937 100644
> --- a/drivers/gpio/gpio-sim.c
> +++ b/drivers/gpio/gpio-sim.c
> @@ -10,7 +10,6 @@
>  #include <linux/array_size.h>
>  #include <linux/bitmap.h>
>  #include <linux/cleanup.h>
> -#include <linux/completion.h>
>  #include <linux/configfs.h>
>  #include <linux/device.h>
>  #include <linux/err.h>
> @@ -37,6 +36,8 @@
>  #include <linux/sysfs.h>
>  #include <linux/types.h>
>
> +#include "dev-sync-probe.h"
> +
>  #define GPIO_SIM_NGPIO_MAX     1024
>  #define GPIO_SIM_PROP_MAX      4 /* Max 3 properties + sentinel. */
>  #define GPIO_SIM_NUM_ATTRS     3 /* value, pull and sentinel */
> @@ -541,14 +542,9 @@ static struct platform_driver gpio_sim_driver = {
>  };
>
>  struct gpio_sim_device {
> +       struct dev_sync_probe_data data;

Maybe something more indicative of the purpose? probe_data? sync_probe_data?

Bart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ