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: <89e63e55-5cad-3f88-402f-cd69aa8d18df@linux.ibm.com>
Date:   Tue, 4 Jun 2019 08:52:43 +0200
From:   Harald Freudenberger <freude@...ux.ibm.com>
To:     Suzuki K Poulose <suzuki.poulose@....com>,
        linux-kernel@...r.kernel.org
Cc:     gregkh@...uxfoundation.org, rafael@...nel.org,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Wolfram Sang <wsa@...-dreams.de>,
        Jonathan Cameron <jic23@...nel.org>,
        Hartmut Knaack <knaack.h@....de>,
        Grygorii Strashko <grygorii.strashko@...com>,
        "David S. Miller" <davem@...emloft.net>,
        Bjorn Helgaas <bhelgaas@...gle.com>,
        Sebastian Ott <sebott@...ux.ibm.com>,
        Peter Oberparleiter <oberpar@...ux.ibm.com>,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Andreas Noever <andreas.noever@...il.com>,
        Michael Jamet <michael.jamet@...el.com>,
        Felipe Balbi <balbi@...nel.org>,
        David Kershner <david.kershner@...sys.com>
Subject: Re: [RFC PATCH 27/57] drivers: Unify the match prototype for
 bus_find_device with class_find_device

On 03.06.19 17:49, Suzuki K Poulose wrote:
> We have iterators for devices by bus and class, with a supplied
> "match" function to do the comparison. However, both of the helper
> function have slightly different prototype for the "match" argument.
>
>  int (*) (struct device *dev, void *data)  // bus_find_device
>   vs
>  int (*) (struct device *dev, const void *data) // class_find_device
>
> Unify the prototype by promoting the match function to use that of
> the class_find_device(). This will allow us to share the generic
> match helpers with class_find_device() users.
>
> Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
> Cc: Wolfram Sang <wsa@...-dreams.de>
> Cc: Jonathan Cameron <jic23@...nel.org>
> Cc: Hartmut Knaack <knaack.h@....de>
> Cc: Grygorii Strashko <grygorii.strashko@...com>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Sebastian Ott <sebott@...ux.ibm.com>
> Cc: Peter Oberparleiter <oberpar@...ux.ibm.com>
> Cc: Harald Freudenberger <freude@...ux.ibm.com>
> Cc: "James E.J. Bottomley" <jejb@...ux.ibm.com>
> Cc: "Martin K. Petersen" <martin.petersen@...cle.com>
> Cc: Andreas Noever <andreas.noever@...il.com>
> Cc: Michael Jamet <michael.jamet@...el.com>
> Cc: Felipe Balbi <balbi@...nel.org>
> Cc: David Kershner <david.kershner@...sys.com>
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
> ---
>  arch/powerpc/platforms/pseries/ibmebus.c |  4 ++--
>  drivers/acpi/acpi_lpss.c                 |  4 ++--
>  drivers/acpi/sleep.c                     |  2 +-
>  drivers/acpi/utils.c                     |  4 ++--
>  drivers/base/bus.c                       |  2 +-
>  drivers/base/core.c                      | 10 +++++-----
>  drivers/base/platform.c                  |  2 +-
>  drivers/char/ipmi/ipmi_si_platform.c     |  2 +-
>  drivers/firmware/efi/dev-path-parser.c   |  4 ++--
>  drivers/hwtracing/coresight/coresight.c  |  6 +++---
>  drivers/i2c/i2c-core-acpi.c              |  2 +-
>  drivers/i2c/i2c-core-of.c                |  2 +-
>  drivers/iio/inkern.c                     |  2 +-
>  drivers/net/ethernet/ti/cpsw-phy-sel.c   |  4 ++--
>  drivers/net/ethernet/ti/davinci_emac.c   |  2 +-
>  drivers/net/ethernet/toshiba/tc35815.c   |  4 ++--
>  drivers/pci/probe.c                      |  2 +-
>  drivers/pci/search.c                     |  4 ++--
>  drivers/s390/cio/css.c                   |  4 ++--
>  drivers/s390/cio/device.c                |  4 ++--
>  drivers/s390/crypto/ap_bus.c             |  4 ++--
>  drivers/scsi/scsi_proc.c                 |  2 +-
>  drivers/thunderbolt/switch.c             |  4 ++--
>  drivers/usb/core/usb.c                   |  4 ++--
>  drivers/usb/phy/phy-am335x-control.c     |  4 ++--
>  drivers/usb/phy/phy-isp1301.c            |  4 ++--
>  drivers/visorbus/visorbus_main.c         |  4 ++--
>  include/linux/device.h                   | 13 ++++++-------
>  28 files changed, 54 insertions(+), 55 deletions(-)
>
...

> diff --git a/drivers/s390/crypto/ap_bus.c b/drivers/s390/crypto/ap_bus.c
> index b9fc502..e440682 100644
> --- a/drivers/s390/crypto/ap_bus.c
> +++ b/drivers/s390/crypto/ap_bus.c
> @@ -1365,7 +1365,7 @@ static int __match_card_device_with_id(struct device *dev, void *data)
>   * Helper function to be used with bus_find_dev
>   * matches for the queue device with a given qid
>   */
> -static int __match_queue_device_with_qid(struct device *dev, void *data)
> +static int __match_queue_device_with_qid(struct device *dev, const void *data)
>  {
>  	return is_queue_dev(dev) && to_ap_queue(dev)->qid == (int)(long) data;
>  }
> @@ -1374,7 +1374,7 @@ static int __match_queue_device_with_qid(struct device *dev, void *data)
>   * Helper function to be used with bus_find_dev
>   * matches any queue device with given queue id
>   */
> -static int __match_queue_device_with_queue_id(struct device *dev, void *data)
> +static int __match_queue_device_with_queue_id(struct device *dev, const void *data)
>  {
>  	return is_queue_dev(dev)
>  		&& AP_QID_QUEUE(to_ap_queue(dev)->qid) == (int)(long) data;
fine with me, Thanks
acked-by: Harald Freudenberger <freude@...ux.ibm.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ