From: Peter Rosin <peda@axentia.se> To: <linux-kernel@vger.kernel.org> Cc: Peter Rosin <peda@axentia.se>, Wolfram Sang <wsa@the-dreams.de>, Peter Korsgaard <peter.korsgaard@barco.com>, Guenter Roeck <linux@roeck-us.net>, Linus Walleij <linus.walleij@linaro.org>, Jonathan Cameron <jic23@kernel.org>, Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, Peter Meerwald-Stadler <pmeerw@pmeerw.net>, Mauro Carvalho Chehab <mchehab@kernel.org>, <linux-i2c@vger.kernel.org>, <linux-iio@vger.kernel.org>, <linux-media@vger.kernel.org> Subject: [PATCH 1/9] i2c: mux: provide more info on failure in i2c_mux_add_adapter Date: Mon, 3 Apr 2017 10:38:30 +0200 [thread overview] Message-ID: <1491208718-32068-2-git-send-email-peda@axentia.se> (raw) In-Reply-To: <1491208718-32068-1-git-send-email-peda@axentia.se> No callers then need to report any further info, thus reducing both the amount of code and the log noise. Signed-off-by: Peter Rosin <peda@axentia.se> --- drivers/i2c/i2c-mux.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index 2178266bca79..26f7237558ba 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c @@ -395,13 +395,16 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, if (force_nr) { priv->adap.nr = force_nr; ret = i2c_add_numbered_adapter(&priv->adap); + dev_err(&parent->dev, + "failed to add mux-adapter %u as bus %u (error=%d)\n", + chan_id, force_nr, ret); } else { ret = i2c_add_adapter(&priv->adap); + dev_err(&parent->dev, + "failed to add mux-adapter %u (error=%d)\n", + chan_id, ret); } if (ret < 0) { - dev_err(&parent->dev, - "failed to add mux-adapter (error=%d)\n", - ret); kfree(priv); return ret; } -- 2.1.4
WARNING: multiple messages have this Message-ID (diff)
From: Peter Rosin <peda@axentia.se> To: linux-kernel@vger.kernel.org Cc: Peter Rosin <peda@axentia.se>, Wolfram Sang <wsa@the-dreams.de>, Peter Korsgaard <peter.korsgaard@barco.com>, Guenter Roeck <linux@roeck-us.net>, Linus Walleij <linus.walleij@linaro.org>, Jonathan Cameron <jic23@kernel.org>, Hartmut Knaack <knaack.h@gmx.de>, Lars-Peter Clausen <lars@metafoo.de>, Peter Meerwald-Stadler <pmeerw@pmeerw.net>, Mauro Carvalho Chehab <mchehab@kernel.org>, linux-i2c@vger.kernel.org, linux-iio@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 1/9] i2c: mux: provide more info on failure in i2c_mux_add_adapter Date: Mon, 3 Apr 2017 10:38:30 +0200 [thread overview] Message-ID: <1491208718-32068-2-git-send-email-peda@axentia.se> (raw) In-Reply-To: <1491208718-32068-1-git-send-email-peda@axentia.se> No callers then need to report any further info, thus reducing both the amount of code and the log noise. Signed-off-by: Peter Rosin <peda@axentia.se> --- drivers/i2c/i2c-mux.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index 2178266bca79..26f7237558ba 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c @@ -395,13 +395,16 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc, if (force_nr) { priv->adap.nr = force_nr; ret = i2c_add_numbered_adapter(&priv->adap); + dev_err(&parent->dev, + "failed to add mux-adapter %u as bus %u (error=%d)\n", + chan_id, force_nr, ret); } else { ret = i2c_add_adapter(&priv->adap); + dev_err(&parent->dev, + "failed to add mux-adapter %u (error=%d)\n", + chan_id, ret); } if (ret < 0) { - dev_err(&parent->dev, - "failed to add mux-adapter (error=%d)\n", - ret); kfree(priv); return ret; } -- 2.1.4
next prev parent reply other threads:[~2017-04-03 8:37 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-04-03 8:38 [PATCH 0/9] Unify i2c_mux_add_adapter error reporting Peter Rosin 2017-04-03 8:38 ` Peter Rosin 2017-04-03 8:38 ` Peter Rosin [this message] 2017-04-03 8:38 ` [PATCH 1/9] i2c: mux: provide more info on failure in i2c_mux_add_adapter Peter Rosin 2017-04-03 8:38 ` [PATCH 2/9] i2c: arb: gpio-challenge: stop double error reporting Peter Rosin 2017-04-03 8:38 ` Peter Rosin 2017-04-03 8:38 ` [PATCH 3/9] i2c: mux: gpio: " Peter Rosin 2017-04-03 8:38 ` Peter Rosin 2017-04-03 8:38 ` [PATCH 4/9] i2c: mux: pca9541: " Peter Rosin 2017-04-03 8:38 ` Peter Rosin 2017-04-03 8:38 ` [PATCH 5/9] i2c: mux: pca954x: " Peter Rosin 2017-04-03 8:38 ` Peter Rosin 2017-04-03 8:38 ` [PATCH 6/9] i2c: mux: pinctrl: " Peter Rosin 2017-04-03 8:38 ` Peter Rosin 2017-04-03 8:38 ` [PATCH 7/9] i2c: mux: reg: " Peter Rosin 2017-04-03 8:38 ` Peter Rosin 2017-04-03 8:38 ` [PATCH 8/9] iio: gyro: mpu3050: " Peter Rosin 2017-04-03 8:38 ` Peter Rosin 2017-04-03 17:56 ` Linus Walleij 2017-04-03 19:42 ` Jonathan Cameron 2017-04-03 8:38 ` [PATCH 9/9] [media] cx231xx: " Peter Rosin 2017-04-03 8:38 ` Peter Rosin 2017-04-03 10:26 ` Wolfram Sang 2017-04-03 11:13 ` Peter Rosin 2017-04-03 11:13 ` Peter Rosin 2017-04-03 10:27 ` [PATCH 0/9] Unify i2c_mux_add_adapter " Wolfram Sang 2017-04-03 10:27 ` Wolfram Sang 2017-04-03 11:27 ` Peter Rosin 2017-04-03 11:27 ` Peter Rosin 2017-04-19 10:29 ` Mauro Carvalho Chehab 2017-04-19 10:29 ` Mauro Carvalho Chehab 2017-04-11 8:08 ` Peter Rosin 2017-04-11 8:08 ` Peter Rosin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1491208718-32068-2-git-send-email-peda@axentia.se \ --to=peda@axentia.se \ --cc=jic23@kernel.org \ --cc=knaack.h@gmx.de \ --cc=lars@metafoo.de \ --cc=linus.walleij@linaro.org \ --cc=linux-i2c@vger.kernel.org \ --cc=linux-iio@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-media@vger.kernel.org \ --cc=linux@roeck-us.net \ --cc=mchehab@kernel.org \ --cc=peter.korsgaard@barco.com \ --cc=pmeerw@pmeerw.net \ --cc=wsa@the-dreams.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.