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: <5B8DA87D05A7694D9FA63FD143655C1B9DC23236@hasmsx108.ger.corp.intel.com>
Date:   Mon, 3 Jun 2019 18:00:30 +0000
From:   "Winkler, Tomas" <tomas.winkler@...el.com>
To:     Suzuki K Poulose <suzuki.poulose@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
        "rafael@...nel.org" <rafael@...nel.org>,
        Arnd Bergmann <arnd@...db.de>
Subject: RE: [RFC PATCH 36/57] drivers: mei: Use class_find_device_by_devt
 match helper



> -----Original Message-----
> From: Suzuki K Poulose [mailto:suzuki.poulose@....com]
> Sent: Monday, June 03, 2019 18:50
> To: linux-kernel@...r.kernel.org
> Cc: gregkh@...uxfoundation.org; rafael@...nel.org; suzuki.poulose@....com;
> Winkler, Tomas <tomas.winkler@...el.com>; Arnd Bergmann
> <arnd@...db.de>
> Subject: [RFC PATCH 36/57] drivers: mei: Use class_find_device_by_devt match
> helper
> 
> Switch to the generic helper class_find_device_by_devt.

Looks okay, but  you could add me at least to cover later mail, there is very little context. 


Thanks
Tomas


> 
> Cc: Tomas Winkler <tomas.winkler@...el.com>
> Cc: Arnd Bergmann <arnd@...db.de>
> Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
> ---
>  drivers/misc/mei/main.c | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index
> ad02097..243b481 100644
> --- a/drivers/misc/mei/main.c
> +++ b/drivers/misc/mei/main.c
> @@ -858,13 +858,6 @@ static ssize_t dev_state_show(struct device *device,  }
> static DEVICE_ATTR_RO(dev_state);
> 
> -static int match_devt(struct device *dev, const void *data) -{
> -	const dev_t *devt = data;
> -
> -	return dev->devt == *devt;
> -}
> -
>  /**
>   * dev_set_devstate: set to new device state and notify sysfs file.
>   *
> @@ -880,7 +873,7 @@ void mei_set_devstate(struct mei_device *dev, enum
> mei_dev_state state)
> 
>  	dev->dev_state = state;
> 
> -	clsdev = class_find_device(mei_class, NULL, &dev->cdev.dev,
> match_devt);
> +	clsdev = class_find_device_by_devt(mei_class, NULL, dev->cdev.dev);
>  	if (clsdev) {
>  		sysfs_notify(&clsdev->kobj, NULL, "dev_state");
>  		put_device(clsdev);
> --
> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ