[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190130154235.GB15050@lunn.ch>
Date: Wed, 30 Jan 2019 16:42:35 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Pavel Machek <pavel@....cz>
Cc: netdev <netdev@...r.kernel.org>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH RFC RFT net-next 03/10] net: dsa: mv88e6060: Replace
REG_WRITE macro
On Wed, Jan 30, 2019 at 10:24:51AM +0100, Pavel Machek wrote:
> On Wed 2019-01-30 01:37:51, Andrew Lunn wrote:
> > The REG_WRITE macro contains a return statement, making it not very
> > safe. Remove it by inlining the code.
>
> Not bad, but maybe there should be dev_err() or something in case of
> reg_write() returns an error?
Hi Pavel
An error is always returned to the caller. It should be the caller who
handles error recovery, and if need be prints an error message. The
only time we would print an error message is in a void function, when
we cannot return an error code.
I've also followed what we do in mv88e6xxx. It works fine there, so i
don't see the need to do anything different here.
Andrew
Powered by blists - more mailing lists