[PATCH] drivers: pnp: proc.c: Handle errors while attaching devices
Valdis Kl=?utf-8?Q?=c4=93?=tnieks
valdis.kletnieks at vt.edu
Thu Apr 29 00:31:13 EDT 2021
On Tue, 27 Apr 2021 07:26:27 +0300, Leon Romanovsky said:
> On Mon, Apr 26, 2021 at 11:20:32PM +0530, bkkarthik wrote:
> > These were only intended for a clean-up job, the idea of this function came from how PCI handles procfs.
> > Maybe those should be changed?
>
> Probably, the CONFIG_PROC_FS around pci_proc_*() is not needed too.
Will that actually build correctly if it's an embedded system or something build with
CONFIG_PROC_FS=n? I'd expect that to die a horrid death while linking vmlinx due
to stuff inside that #ifdef calling symbols only present with PROC_FS=m/y.
In general, inline ifdef's are frowned upon, so if you come across one in the kernel
source, that's probably a *big* hint that either (a) refactoring the code to eliminate
an inline ifdef was just too ugly to be allowed to live or (b) you *have* to put a guard
around it because you're guaranteed a build failure otherwise.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20210429/6b7c21f5/attachment.sig>
More information about the Kernelnewbies
mailing list