Re: initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)



On Tuesday 07 March 2006 06:10, Jes Sorensen wrote:
"Paul" == Paul Jackson <pj@xxxxxxx> writes:
Paul> Andrew wrote:
That's OK - it's -ENODEV.

Paul> I can't help but wonder if the particular case of -ENODEV should
Paul> be kept quiet, as in the following totally untested patch:

I'd subscribe to that. It seems a bit wrong to return 0 in a
loadable module if nothing is found, and some of the ones people have
posted patches for converting can be either modules or static.

Yeah, maybe. But it feels a little like the question of whether
{pci,pnp,acpi_bus}_register_driver() should return the number of
devices found. The consensus is that these functions should return
only a negative error, or zero for success, leaving any counting of
devices to the driver's .probe() or .add() method.

I think a loadable driver's init function *should* return success
even if no device is yet present. Maybe you want to load the driver
before hot-adding the device.

The common idiom of, e.g.,

static int __init serial8250_pci_init(void)
{
return pci_register_driver(&serial_pci_driver);
}

should remain acceptable, though it returns 0 even if no devices
are found.

Bjorn
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: initcall at ... returned with error code -19 (Was: Re: 2.6.16-rc5-mm2)
    ... loadable module if nothing is found, and some of the ones people have ... I think a loadable driver's init function *should* return success ... I don't really like this;-(If a driver is loaded for a specific PCI ...
    (Linux-Kernel)
  • Re: SD CA
    ... Paul wouldn't know. ... subdue and control the population. ... Depends on what you call success, ... turning the government over to the hands of the likes of Murdoch and other ...
    (alt.smokers.cigars)
  • Re: SD CA
    ... Paul wouldn't know. ... Depends on what you call success, ... turning the government over to the hands of the likes of Murdoch and other ... Your fascist inclinations are insane. ...
    (alt.smokers.cigars)
  • Re: SD CA
    ... Paul wouldn't know. ... subdue and control the population. ... Depends on what you call success, ... Your fascist inclinations are insane. ...
    (alt.smokers.cigars)
  • Re: SD CA
    ... Paul wouldn't know. ... One hallmark of liberals seems to me to be their unswerving belief ... Depends on what you call success, ... Your fascist inclinations are insane. ...
    (alt.smokers.cigars)