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: <20171129135813.GE32417@localhost>
Date:   Wed, 29 Nov 2017 19:28:14 +0530
From:   Vinod Koul <vinod.koul@...el.com>
To:     Sinan Kaya <okaya@...eaurora.org>
Cc:     dmaengine@...r.kernel.org, timur@...eaurora.org,
        linux-arm-msm@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, robin.murphy@....com,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3 3/4] dmaengine: qcom_hidma: add support for the new
 revision

On Thu, Nov 09, 2017 at 09:32:54PM -0500, Sinan Kaya wrote:

> -static bool hidma_msi_capable(struct device *dev)
> +static bool hidma_test_capability(struct device *dev, enum hidma_cap test_cap)
>  {
>  	struct acpi_device *adev = ACPI_COMPANION(dev);
> -	const char *of_compat;
> -	int ret = -EINVAL;
> +	enum hidma_cap cap;
>  
> -	if (!adev || acpi_disabled) {
> -		ret = device_property_read_string(dev, "compatible",
> -						  &of_compat);
> -		if (ret)
> -			return false;
> +	if (!adev || acpi_disabled)
> +		cap = (enum hidma_cap) of_device_get_match_data(dev);
> +	else
> +		cap = (enum hidma_cap) acpi_device_get_match_data(dev);

should this not reside in core? How about a device_get_match_data() which
returns the data for folks based on node being acpi/of

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ