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, 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

#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.

-- 
With Best Regards,
Andy Shevchenko






[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