[PATCH 14/16] pcmcia: use dynamic debug infrastructure, deprecate CS_CHECK (misc drivers)

Dominik Brodowski linux at dominikbrodowski.net
Tue Nov 3 03:44:27 EST 2009


On Tue, Nov 03, 2009 at 05:15:51PM +0900, Komuro wrote:
> Hi,
> 
> > > Also, remove all usages of the CS_CHECK macro and replace them with proper
> > > Linux style calling and return value checking. The extra error reporting m
> ay
> > > be dropped, as the PCMCIA core already complains about any (non-driver-aut
> hor)
> >> > errors.
> 
> 
> If the "extra error reporting" is dropped and debug option is not enabled,
> the driver is unloaded without error message.
> 
> So it should be
> 
>             ret = pcmcia_request_io(link, &link->io);
>             if (ret) {
>                    dev_err(... pcmcia_request_io failed\n");
>                    return ret;
>            }

Most if not all ways pcmcia_request_io() can fail are related to broken
drivers. For those, dev_dbg() is enough in drivers/pcmcia/pcmcia_resource.c.
Otherwise, it's better to do the verbose error reporting in
drivers/pcmcia/pcmcia_resource.c:pcmcia_request_io() [specifically after the
two calls to alloc_io_space()] than to duplicate this in each and every
driver.

Best,
	Dominik



More information about the linux-pcmcia mailing list