After walking and trying to clean up the worst in the driver, I came across the pci_driver::remove() _empty_ implementation. That would crash the system at least during hot-unplug (or write to remove in sysfs). There are many other problems: * Initialization + deinitialization apparently comes from no-hotplug support age. It needs a rewrite. * Hairy debug macros. Drop them. * Use of self-baked lists. Replace by list. * The order of the functions should be inverted and fwd decls dropped. * Coding style from the stone age. Fix. * I assume there are many bugs, but the code is unreadable at times, so hard to judge. There is one example posted [1]. I was able to find only one user back in 2016. So mark the driver as BROKEN for some time. Either someone will notice and we can bring the driver to this century. Or we will drop it completely if noone cares. [1] https://lore.kernel.org/all/20230728123901.64225-1-dg573847474@gmail.com/ Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Cc: Chengfeng Ye <dg573847474@gmail.com> Link: https://lore.kernel.org/r/20230731090002.15680-8-jirislaby@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. The formatted documentation can also be read online at: https://www.kernel.org/doc/html/latest/ There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.
Description
Languages
C
97.6%
Assembly
1%
Shell
0.5%
Python
0.3%
Makefile
0.3%