RE: [PATCH] ASoC: tlv320aic32x4-i2c: Simplify probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy Shevchenko,


> Subject: Re: [PATCH] ASoC: tlv320aic32x4-i2c: Simplify probe()
> 
> On Sun, Aug 27, 2023 at 10:45:36AM +0100, Biju Das wrote:
> > Simplify probe() by replacing of_match_node() and i2c_match_id() with
> > i2c_get_match_data().
> 
> ...
> 
> > +	dev_set_drvdata(&i2c->dev, (void *)i2c_get_match_data(i2c));
> 
> You (potentially) drop const qualifier here. It's not good and it's not
> explained in the commit message why.

dev_set_drvdata() needs non-const void*, otherwise I get warning.
The original code also use this cast. That is the reason it is not
explained in commit message.

Cheers,
Biju





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux