[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230321214124.19f29406@kernel.org>
Date: Tue, 21 Mar 2023 21:41:24 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Florian Fainelli <f.fainelli@...il.com>
Cc: netdev@...r.kernel.org, opendmb@...il.com,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org (open list)
Subject: Re: [PATCH net-next] net: phy: Improved phy_error() with function
and error code
On Mon, 20 Mar 2023 14:34:51 -0700 Florian Fainelli wrote:
> +static inline void phy_error(struct phy_device *phydev)
> +{
> + phy_error_precise(phydev, (const void *)_RET_IP_, -EIO);
> +}
LGTM apart from this _RET_IP_ here. Wouldn't this make @func
sometimes the function that returned the error and sometimes
the caller? The caller is in the stack trace already, so no
need to duplicate. Besides how dependable is using _RET_IP_
inside a static inline?
Powered by blists - more mailing lists