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

From: Vladimir Oltean
Date: Thu Feb 10 2022 - 10:27:22 EST


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?