From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: "Loktionov, Aleksandr" <aleksandr.loktionov@intel.com>,
Jiri Pirko <jiri@resnulli.us>, Jakub Kicinski <kuba@kernel.org>
Cc: Eric Dumazet <edumazet@google.com>,
"intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Simon Horman <horms@kernel.org>,
"Nguyen, Anthony L" <anthony.l.nguyen@intel.com>,
Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH net-next] devlink: unify devlink_shd_get_priv() into devlink_priv()
Date: Mon, 23 Mar 2026 16:25:09 +0100 [thread overview]
Message-ID: <4025f11d-a34e-4fed-b1a7-61c44ca67204@intel.com> (raw)
In-Reply-To: <IA3PR11MB898619DAC6BA30C2DBC65F62E54BA@IA3PR11MB8986.namprd11.prod.outlook.com>
>> void *devlink_priv(struct devlink *devlink) {
>> + if (devlink->is_shd)
>> + return devlink_shd_get_priv(devlink);
> I'm afraid it can cause recursion, if you didn't modify the function:
right, thanks
I should have really send this as an RFC :/
> void *devlink_shd_get_priv(struct devlink *devlink)
> {
> struct devlink_shd *shd = devlink_priv(devlink);
>
>> +
>> return &devlink->priv;
>> }
>
> ...
>
>> if (refcount_dec_and_test(&shd->refcount))
>> devlink_shd_destroy(shd);
>> mutex_unlock(&shd_mutex);
>> @@ -159,4 +165,3 @@ void *devlink_shd_get_priv(struct devlink
>> *devlink)
>>
>> return shd->priv;
>> }
>> -EXPORT_SYMBOL_GPL(devlink_shd_get_priv);
>> --
>> 2.39.3
>
next prev parent reply other threads:[~2026-03-23 15:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 13:21 [PATCH net-next] devlink: unify devlink_shd_get_priv() into devlink_priv() Przemek Kitszel
2026-03-23 14:42 ` [Intel-wired-lan] " Loktionov, Aleksandr
2026-03-23 15:25 ` Przemek Kitszel [this message]
2026-03-23 15:03 ` Jiri Pirko
2026-03-23 15:23 ` Przemek Kitszel
2026-03-25 10:14 ` [Intel-wired-lan] " kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4025f11d-a34e-4fed-b1a7-61c44ca67204@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox