All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "Markus Elfring" <Markus.Elfring@web.de>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Jakub Kicinski" <kuba@kernel.org>,
	"MD Danish Anwar" <danishanwar@ti.com>,
	"Michael Grzeschik" <mgr@kernel.org>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Vadim Fedorenko" <vadim.fedorenko@linux.dev>,
	"Yibo Dong" <dong100@mucse.com>,
	LKML <linux-kernel@vger.kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>
Subject: Re: net: rnpgbe: Pass an expression directly in rnpgbe_rm_adapter()
Date: Thu, 16 Jul 2026 16:34:05 +0300	[thread overview]
Message-ID: <aljdzTZ_f5v6ckVg@stanley.mountain> (raw)
In-Reply-To: <062f9181-e494-4576-bedb-36de488c11ca@lunn.ch>

On Thu, Jul 16, 2026 at 03:24:22PM +0200, Andrew Lunn wrote:
> On Thu, Jul 16, 2026 at 11:48:43AM +0200, Markus Elfring wrote:
> > > In C writing if (!p) and if (p == NULL) are always equivalent but weirdly
> > > the NULL doesn't have to zero.  It's part of the C FAQ.
> > > https://c-faq.com/null/machexamp.html It's just a bit of fun trivia that
> > > doesn't really matter unless you have a time machine.  Even if you invented
> > > a time machine, the code here would still be fine because we have a NULL
> > > test before dereferencing the results of our pointer math.
> > Which expression evaluations would you interpret as pointer dereferences finally?
> > https://c-faq.com/sx1/
> 
> This is all interesting, but nobody has yet explain how this function
> can be called such that we have a NULL pointer.

mucse cannot be NULL.

We call pci_set_drvdata() during probe() and it is still valid when
we call the remove() function.

regards,
dan carpenter

  reply	other threads:[~2026-07-16 13:34 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-12 18:35 [PATCH net] net: rnpgbe: Pass an expression directly in rnpgbe_rm_adapter() Markus Elfring
2026-07-12 22:19 ` Vadim Fedorenko
2026-07-13  6:00   ` Markus Elfring
2026-07-13  8:04 ` [PATCH net] " Dan Carpenter
2026-07-13  8:22   ` Markus Elfring
2026-07-15 13:12     ` Uwe Kleine-König
2026-07-15 18:45       ` Markus Elfring
2026-07-16  9:30         ` Dan Carpenter
2026-07-16  9:48           ` Markus Elfring
2026-07-16 13:24             ` Andrew Lunn
2026-07-16 13:34               ` Dan Carpenter [this message]
2026-07-16 13:43                 ` Andrew Lunn
2026-07-16 17:26                   ` [PATCH v2 net-next] net: rnpgbe: Delete a null pointer check " Markus Elfring
2026-07-16 19:40                     ` Andrew Lunn
2026-07-16  6:57     ` [PATCH net] net: rnpgbe: Pass an expression directly " Dan Carpenter
2026-07-16  8:20       ` Markus Elfring
2026-07-16 13:30         ` Dan Carpenter
2026-07-16 16:19           ` Markus Elfring
2026-07-16 14:27         ` Jonathan Corbet
2026-07-16 16:30           ` Markus Elfring
2026-07-14 22:20 ` [PATCH net] " Andrew Lunn
2026-07-15  5:22   ` Markus Elfring

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=aljdzTZ_f5v6ckVg@stanley.mountain \
    --to=error27@gmail.com \
    --cc=Markus.Elfring@web.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=corbet@lwn.net \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=dong100@mucse.com \
    --cc=edumazet@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgr@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=u.kleine-koenig@baylibre.com \
    --cc=vadim.fedorenko@linux.dev \
    /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.