Subject: Re: [PATCH v6 net-next 5/5] net: mscc: ocelot: use bulk reads for stats

From: Colin Foster <[email-masked]>
Date: Thu, 10 Feb 2022 07:35:40 -0800

On Thu, Feb 10, 2022 at 03:27:13PM +0000, Vladimir Oltean wrote:
> On Thu, Feb 10, 2022 at 07:21:03AM -0800, Colin Foster wrote:
> > > ocelot_check_stats_work() should also check for errors.
> > 
> > Another change I'm catching: I assume calling dev_err while holding a
> > mutex is frowned upon, so I'm moving this err check after the counter
> > copy / mutex unlock. I'll submit that fix after patch 1 gets merged into
> > net / mainline.
> 
> Where did you read that? Doing work that doesn't need to be under a lock
> while that work is held isn't preferable, of course, but what is special
> about dev_err?

I didn't read it anywhere, just a hunch about string formatting
overhead. Either way - not necessary to do inside of stats_lock, so I
moved it out. Next round will hopefully be early next week.