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]
Date:   Thu, 29 Jun 2023 11:56:10 +0100
From:   Mark Brown <broonie@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        Oder Chiou <oder_chiou@...ltek.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>
Subject: Re: [PATCH v1 2/3] ASoC: rt5677: Use device_get_match_data()

On Thu, Jun 29, 2023 at 01:46:02PM +0300, Andy Shevchenko wrote:

> +	rt5677->type = (enum rt5677_type)(uintptr_t)device_get_match_data(dev);

Double casts, always a sign of a successful simplification! :P

> +	if (rt5677->type == 0)
>  		return -EINVAL;
> -	}
>  
>  	rt5677_read_device_properties(rt5677, &i2c->dev);
>  
> @@ -5702,7 +5689,7 @@ static struct i2c_driver rt5677_i2c_driver = {
>  	.driver = {
>  		.name = RT5677_DRV_NAME,
>  		.of_match_table = rt5677_of_match,
> -		.acpi_match_table = ACPI_PTR(rt5677_acpi_match),
> +		.acpi_match_table = rt5677_acpi_match,
>  	},
>  	.probe    = rt5677_i2c_probe,
>  	.remove   = rt5677_i2c_remove,
> diff --git a/sound/soc/codecs/rt5677.h b/sound/soc/codecs/rt5677.h
> index 944ae02aafc2..5ccdf1ba613a 100644
> --- a/sound/soc/codecs/rt5677.h
> +++ b/sound/soc/codecs/rt5677.h
> @@ -1753,8 +1753,8 @@ enum {
>  };
>  
>  enum rt5677_type {
> -	RT5677,
> -	RT5676,
> +	RT5677 = 1,
> +	RT5676 = 2,
>  };
>  
>  /* ASRC clock source selection */
> -- 
> 2.40.0.1.gaa8946217a0b
> 

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