Subject: Re: [PATCH net-next v3 8/8] net: mscc: PTP Hardware Clock (PHC) support

From: Antoine Tenart <[email-masked]>
Date: Thu, 25 Jul 2019 09:24:06 +0200

Hi David,

On Wed, Jul 24, 2019 at 11:52:26AM -0700, David Miller wrote:
> From: Antoine Tenart <[email-masked]>
> Date: Wed, 24 Jul 2019 10:17:15 +0200
> 
> > +static int ocelot_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
> > +{
> > +	struct ocelot *ocelot = container_of(ptp, struct ocelot, ptp_info);
> > +	u32 unit = 0, direction = 0;
> > +	unsigned long flags;
>                       ^^^^
> > +	u64 adj = 0;
> > +
> > +	if (!scaled_ppm)
> > +		goto disable_adj;
>  ...
> > +disable_adj:
> > +	ocelot_write(ocelot, 0, PTP_CLK_CFG_ADJ_CFG);
> > +
> > +	spin_unlock_irqrestore(&ocelot->ptp_clock_lock, flags);
>                                                         ^^^^^
> Did GCC really not warn about this in your build like it did immediately
> on mine?

I was using gcc8 for mips32, and it did not warn about this. Sorry about
that.

> drivers/net/ethernet/mscc/ocelot.c: In function ‘ocelot_ptp_adjfine’:
> ./include/linux/spinlock.h:288:3: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized]
>    _raw_spin_unlock_irqrestore(lock, flags); \
>    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Please fix this and when you respin please just elide the MIPS tree
> patches and just keep all the ones that I should apply to net-next.

OK, will do.

Thanks!
Antoine

-- 
Antoine Ténart, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com