lkml.org 
[lkml]   [2023]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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?

\
 
 \ /
  Last update: 2023-03-27 01:11    [W:0.032 / U:0.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site