Thread (5 messages) 5 messages, 3 authors, 2025-08-25

Re: [PATCH v2] block: mtip32xx: Prioritize state cleanup over memory freeing in the mtip_pci_probe error path.

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2025-08-25 13:40:44
Also in: lkml

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

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help