Re: [PATCH v2 3/4] serial: 8250_exar: Replace custom EEPROM read with eeprom_93cx6

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

 



On Fri, 20 Sep 2024 18:26:08 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> On Fri, Sep 20, 2024 at 10:03:23AM -0400, Parker Newman wrote:
> > From: Parker Newman <pnewman@xxxxxxxxxxxxxxx>
>
> ...
>
> > +	osc_freq = le16_to_cpu(ee_words[0]) | (le16_to_cpu(ee_words[1]) << 16);
> > +	if (osc_freq == GENMASK(31, 0))
> >  		return -EIO;
>
> Just noticed that you have
> #define CTI_EE_MASK_OSC_FREQ_LOWER      GENMASK(15, 0)
> #define CTI_EE_MASK_OSC_FREQ_UPPER      GENMASK(31, 16)
>
> So, please modify them and the above check using these.
> Something like
>

Good catch, I debated using them again with FIELD_PREP() like the
old code but it looked pretty ugly. I guess I missed removing them.

I will fix in v3. In this case should I drop your Reviewed-by tag?
Or is this change small enough to keep it?

> #define CTI_EE_MASK_OSC_FREQ		GENMASK(31, 0)
>
> 	osc_freq = le16_to_cpu(ee_words[0]) | (le16_to_cpu(ee_words[1]) << 16);
> 	if (osc_freq == CTI_EE_MASK_OSC_FREQ)
> 		return -EIO;
>
> P.S> If I am not mistaken the definitions were only used in this function.
>






[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux