All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 0/3] using guard/__free in networking
Date: Mon, 25 Mar 2024 19:09:57 -0700	[thread overview]
Message-ID: <20240325190957.02d74258@kernel.org> (raw)
In-Reply-To: <20240325223905.100979-5-johannes@sipsolutions.net>

On Mon, 25 Mar 2024 23:31:25 +0100 Johannes Berg wrote:
> Hi,
> 
> So I started playing with this for wifi, and overall that
> does look pretty nice, but it's a bit weird if we can do
> 
>   guard(wiphy)(&rdev->wiphy);
> 
> or so, but still have to manually handle the RTNL in the
> same code.

Dunno, it locks code instead of data accesses.
Forgive the comparison but it feels too much like Java to me :)
scoped_guard is fine, the guard() not so much.

But happy for other netdev maintainers to override me..

Do you have a piece of code in wireless where the conversion
made you go "wow, this is so much cleaner"?

  parent reply	other threads:[~2024-03-26  2:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 22:31 [PATCH 0/3] using guard/__free in networking Johannes Berg
2024-03-25 22:31 ` [PATCH 1/3] rtnetlink: add guard for RTNL Johannes Berg
2024-03-25 22:31 ` [PATCH 2/3] netdevice: add DEFINE_FREE() for dev_put Johannes Berg
2024-03-25 22:31 ` [PATCH 3/3] net: core: use guard/__free in core dev code Johannes Berg
2024-03-26  2:09 ` Jakub Kicinski [this message]
2024-03-26  8:42   ` [PATCH 0/3] using guard/__free in networking Johannes Berg
2024-03-26 14:37     ` Jakub Kicinski
2024-03-26 15:23       ` Willem de Bruijn
2024-03-26 17:33         ` Stanislav Fomichev
2024-03-29 10:23         ` Simon Horman
2024-03-26 15:33       ` Johannes Berg
2024-03-27  0:15         ` Jakub Kicinski
2024-03-27 19:24           ` Johannes Berg
2024-03-27 20:07             ` Jakub Kicinski
2024-03-27 20:25         ` Jakub Sitnicki
2024-03-27 21:28           ` Johannes Berg
2024-03-27 21:43             ` Johannes Berg
2024-03-27 11:15       ` Przemek Kitszel
2024-03-26 15:33   ` Andrew Lunn

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=20240325190957.02d74258@kernel.org \
    --to=kuba@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.