mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: phasta@kernel.org
Cc: Zhang Heng <zhangheng@kylinos.cn>,
	axboe@kernel.dk, broonie@kernel.org, lizetao1@huawei.com,
	viro@zeniv.linux.org.uk, fourier.thomas@gmail.com,
	anuj20.g@samsung.com, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] block: mtip32xx: Prioritize state cleanup over memory freeing in the mtip_pci_probe error path.
Date: Mon, 25 Aug 2025 16:40:37 +0300	[thread overview]
Message-ID: <aKxn1bnFhFVSw3r7@smile.fi.intel.com> (raw)
In-Reply-To: <ab3196a1e0ccb8f94eafb83de589c0ae8f82d598.camel@mailbox.org>

On Mon, Aug 25, 2025 at 01:33:17PM +0200, Philipp Stanner wrote:
> On Sat, 2025-08-23 at 16:32 +0800, Zhang Heng wrote:

...

> So I think that the pci_set_drvdata(… NULL) can be removed
> alltogether. 
> 
> When working on the probe() / remove() paths last and this year, I came
> to believe that calls like that were often used because of a
> misunderstanding of how the driver core APIs work.

I think there are other aspects that makes this happen (any combination of them
possible):

1) old books for Linux kernel development with outdated examples (these calls
   used to be required ca. 2010);

2) initial driver development based on (quite) old examples;

3) (as you said) misunderstanding of the device enumeration process in Linux
device model;

4) ...anything else I forgot...

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2025-08-25 13:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-23  8:32 Zhang Heng
2025-08-25 10:56 ` Andy Shevchenko
2025-08-25 10:58   ` Andy Shevchenko
2025-08-25 11:33 ` Philipp Stanner
2025-08-25 13:40   ` Andy Shevchenko [this message]

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=aKxn1bnFhFVSw3r7@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=anuj20.g@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=broonie@kernel.org \
    --cc=fourier.thomas@gmail.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizetao1@huawei.com \
    --cc=phasta@kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=zhangheng@kylinos.cn \
    /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

all inboxes | Powered by JetHome®