Re: [PATCH 1/4] media: pci: netup_unidvb: don't print error when adding adapter fails

From: Wolfram Sang
Date: Tue Aug 09 2016 - 10:59:08 EST



> Sometimes it better to show more message - especially in error conditions :)

Sure, if they contain additional information.

> btw, do you make sanity check for "duplicate" log messages ?

I checked all error messages if they contain additional information.

> Â Â Â Â ret = i2c_add_adapter(&i2c->adap);
> -Â Â Â Âif (ret) {
> -Â Â Â Â Â Â Â Âdev_err(&ndev->pci_dev->dev,
> -Â Â Â Â Â Â Â Â Â Â Â Â"%s(): failed to add I2C adapter\n", __func__);
> +Â Â Â Âif (ret)
> Â Â Â Â Â Â Â Â return ret;
> -Â Â Â Â}

IMHO, this one doesn't. __func__ is not helpful to users. And the error
messages in the core will make sure that a developer knows where to
start looking.

Attachment: signature.asc
Description: PGP signature