Re: [PATCH v3 char-misc-next] misc: microchip: pci1xxxx: Add OTP/EEPROM driver for the pci1xxxx switch

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

 



On Mon, Feb 06, 2023 at 09:20:51AM +0000, Tharunkumar.Pasumarthi@xxxxxxxxxxxxx wrote:
> > From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>
> > Sent: Friday, January 20, 2023 4:26 PM
> > To: Kumaravel Thiagarajan - I21417
> > <Kumaravel.Thiagarajan@xxxxxxxxxxxxx>
> > > +             dev_err(&priv->pdev->dev,
> > > +                     "EPC_Timeout, EEPROM is unresponsive: %x\n",
> > > + data);
> > 
> > Can this spam the kernel logs?  If so, please rate limit it.
> 
> This print will only come once at max and will not spam logs.
> 
> > > +     delay = msecs_to_jiffies(OTP_RW_TIMEOUT_MILLISECONDS);
> > > +     j0 = jiffies;
> > > +     j1 = j0 + delay;
> > 
> > Are you sure this math works out?  Please use the jiffies math functions
> > instead so you can handle wrapping properly.
> 
> You suggest using any existing APIs to add jiffies to handle wrapping? I am not able 
> to find any such API. Can you please point out API name. 

I have no context here for what you are doing with the math in jiffies,
but that is usually a very odd thing.  If you use the normal timer
functions, you will not have to worry about the wrapping as it is
handled for you, right?

thanks,

greg k-h



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux