[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180116034947.GG4590@fury>
Date: Mon, 15 Jan 2018 19:49:47 -0800
From: Darren Hart <dvhart@...radead.org>
To: Vadim Pasternak <vadimp@...lanox.com>
Cc: andy.shevchenko@...il.com, gregkh@...uxfoundation.org,
linux-kernel@...r.kernel.org, platform-driver-x86@...r.kernel.org,
jiri@...nulli.us
Subject: Re: [patch v8 0/3] drivers/platform: replace module
x86/mlxcpld-hotplug with mellanox/mlxreg-hotplug
On Mon, Jan 15, 2018 at 07:45:11PM -0800, Darren Hart wrote:
> On Mon, Jan 15, 2018 at 07:42:09PM -0800, Darren Hart wrote:
> > To follow this email, are two patches which are minor incremental
> > cleanups, which I'd appreciate your review of before I push them to
> > testing.
>
>
> From 2c5d26ee913e0f5f7d13c559d85e8da7e4ddcdab Mon Sep 17 00:00:00 2001
> Message-Id: <2c5d26ee913e0f5f7d13c559d85e8da7e4ddcdab.1516073719.git.dvhart@...radead.org>
> From: "Darren Hart (VMware)" <dvhart@...radead.org>
> Date: Mon, 15 Jan 2018 19:16:36 -0800
> Subject: [PATCH 1/2] platform/mellanox: mlxreg-hotplug: Simplify exit path
>
> Several functions use a "goto access_error" pattern result in a
> duplicated exit path at the end of the function. Address this by using a
> single exit path, and checking for (ret) prior to printing the error
> message. This adds a conditional, but only in the failure case, and
> simplifies the exit path.
>
> Signed-off-by: Darren Hart (VMware) <dvhart@...radead.org>
> Cc: Vadim Pasternak <vadimp@...lanox.com>
> ---
> drivers/platform/mellanox/mlxreg-hotplug.c | 62 ++++++++++++------------------
> 1 file changed, 25 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/platform/mellanox/mlxreg-hotplug.c b/drivers/platform/mellanox/mlxreg-hotplug.c
> index 9bbaa8c..78056f7 100644
> --- a/drivers/platform/mellanox/mlxreg-hotplug.c
> +++ b/drivers/platform/mellanox/mlxreg-hotplug.c
...
> @@ -267,18 +267,15 @@ mlxreg_hotplug_work_helper(struct mlxreg_hotplug_priv_data *priv,
> ret = regmap_write(priv->regmap, item->reg + MLXREG_HOTPLUG_EVENT_OFF,
> 0);
> if (ret)
> - goto access_error;
> + goto out:
Apologies: goto out;
--
Darren Hart
VMware Open Source Technology Center
Powered by blists - more mailing lists