2023-08-15 19:15:27

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH] ASoC: rt5677: fix -Wvoid-pointer-to-enum-cast warning

On Mon, Aug 14, 2023 at 09:58:56PM +0000, Justin Stitt wrote:
> `match_id->data` is a void* and as such is being truncated when cast to
> `enum rt5677_type` which is only int-width.

This doesn't apply against current code, please check and resend.


Attachments:
(No filename) (254.00 B)
signature.asc (499.00 B)
Download all attachments

2023-08-16 06:37:18

by Nathan Chancellor

[permalink] [raw]
Subject: Re: [PATCH] ASoC: rt5677: fix -Wvoid-pointer-to-enum-cast warning

On Tue, Aug 15, 2023 at 01:54:40PM +0100, Mark Brown wrote:
> On Mon, Aug 14, 2023 at 09:58:56PM +0000, Justin Stitt wrote:
> > `match_id->data` is a void* and as such is being truncated when cast to
> > `enum rt5677_type` which is only int-width.
>
> This doesn't apply against current code, please check and resend.

It looks like Andy fixed this warning as part of the refactoring to
device_get_match_data():

https://git.kernel.org/broonie/sound/c/043bb9c012ee7d092a477159cc66dbdf62fd2666

Cheers,
Nathan