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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 5 Oct 2023 18:00:09 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Naresh Solanki <naresh.solanki@...ements.com>
Cc:     zev@...ilderbeest.net, Liam Girdwood <lgirdwood@...il.com>,
        Patrick Rudolph <patrick.rudolph@...ements.com>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/regulator: Notify sysfs about status changes

On Thu, Oct 05, 2023 at 03:30:58PM +0200, Naresh Solanki wrote:

>  static int _notifier_call_chain(struct regulator_dev *rdev,
>  				  unsigned long event, void *data)
>  {
> +	const char *name;
> +	int ret;
> +
>  	/* call rdev chain first */
> -	return blocking_notifier_call_chain(&rdev->notifier, event, data);
> +	ret =  blocking_notifier_call_chain(&rdev->notifier, event, data);
> +
> +	if (event & REGULATOR_EVENT_VOLTAGE_CHANGE) {
> +		name = dev_attr_microvolts.attr.name;
> +		sysfs_notify(&rdev->dev.kobj, NULL, name);
> +	} else {
> +		name = dev_attr_status.attr.name;
> +		sysfs_notify(&rdev->dev.kobj, NULL, name);
> +	}

We probably should filter the events more, there's events for pre and
post voltage change for example which aren't status changes so would be
spurious.  It ought not to break anything but we should still avoid
unneeded work.

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ