From: Darren Hart <dvhart@infradead.org>
To: Vadim Pasternak <vadimp@mellanox.com>
Cc: andy.shevchenko@gmail.com, gregkh@linuxfoundation.org,
linux-kernel@vger.kernel.org,
platform-driver-x86@vger.kernel.org, jiri@resnulli.us
Subject: Re: [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create
Date: Thu, 25 Jan 2018 13:46:43 -0800 [thread overview]
Message-ID: <20180125214643.GB24122@fury> (raw)
In-Reply-To: <1516826019-124903-1-git-send-email-vadimp@mellanox.com>
On Wed, Jan 24, 2018 at 08:33:37PM +0000, Vadim Pasternak wrote:
> The upper layer will manage and report errors returned by the create and
> destroy functions.
>
> FIXME: but it doesn't - we don't even check
I think we agreed to just drop this patch entirely, since this error is not
checked elsewhere? Keeping the dev_err messages?
>
> Signed-off-by: Vadim Pasternak <vadimp@mellanox.com>
> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
> [dvhart: refactored into smaller functional changes]
> Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
> ---
> drivers/platform/mellanox/mlxreg-hotplug.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
> index e55f576..0ccd327 100644
> --- a/drivers/platform/mellanox/mlxreg-hotplug.c
> +++ b/drivers/platform/mellanox/mlxreg-hotplug.c
> @@ -187,16 +187,11 @@ static int mlxreg_hotplug_device_create(struct device *dev,
> struct mlxreg_hotplug_device *item)
> {
> item->adapter = i2c_get_adapter(item->bus);
> - if (!item->adapter) {
> - dev_err(dev, "Failed to get adapter for bus %d\n",
> - item->bus);
> + if (!item->adapter)
> return -EFAULT;
> - }
>
> item->client = i2c_new_device(item->adapter, &item->brdinfo);
> if (!item->client) {
> - dev_err(dev, "Failed to create client %s at bus %d at addr 0x%02x\n",
> - item->brdinfo.type, item->bus, item->brdinfo.addr);
> i2c_put_adapter(item->adapter);
> item->adapter = NULL;
> return -EFAULT;
> --
> 2.1.4
>
>
--
Darren Hart
VMware Open Source Technology Center
next prev parent reply other threads:[~2018-01-25 21:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-24 20:33 [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Vadim Pasternak
2018-01-24 20:33 ` [patch v11 - re-ordered 04/12] platform/mellanox: Group create/destroy with attribute functions Vadim Pasternak
2018-01-24 20:33 ` [patch v11 - re-ordered 05/12] platform/mellanox: Rename i2c bus to nr Vadim Pasternak
2018-01-25 21:46 ` Darren Hart [this message]
2018-01-26 16:59 ` [patch v11 - re-ordered 03/12] FIXME platform/mellanox: Remove redundant dev_err messages on device_create Vadim Pasternak
2018-01-26 23:41 ` Darren Hart
2018-01-27 5:08 ` Vadim Pasternak
2018-01-31 18:40 ` Darren Hart
2018-01-31 18:47 ` Vadim Pasternak
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=20180125214643.GB24122@fury \
--to=dvhart@infradead.org \
--cc=andy.shevchenko@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jiri@resnulli.us \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=vadimp@mellanox.com \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox