From: Lee Jones <lee.jones@linaro.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Subject: Re: [patch v2] mfd: wm8400-core: delete wm8400_reg_read()
Date: Mon, 25 Apr 2016 12:00:21 +0100 [thread overview]
Message-ID: <20160425110021.GD2713@dell> (raw)
In-Reply-To: <20160415144418.GA8953@mwanda>
On Fri, 15 Apr 2016, Dan Carpenter wrote:
> There was a static checker warning in wm8400_reg_read() because we were
> returning u16 and that can't hold the negative error codes. The
> function isn't used, so let's just delete it.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> v2: just delete the function
No diff?
I've fixed the $SUBJECT line and applied the patch.
> diff --git a/include/linux/mfd/wm8400-private.h b/include/linux/mfd/wm8400-private.h
> index 2de565b..4ee908f 100644
> --- a/include/linux/mfd/wm8400-private.h
> +++ b/include/linux/mfd/wm8400-private.h
> @@ -923,7 +923,6 @@ struct wm8400 {
> #define WM8400_LINE_CMP_VTHD_SHIFT 0 /* LINE_CMP_VTHD - [3:0] */
> #define WM8400_LINE_CMP_VTHD_WIDTH 4 /* LINE_CMP_VTHD - [3:0] */
>
> -u16 wm8400_reg_read(struct wm8400 *wm8400, u8 reg);
> int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data);
>
> static inline int wm8400_set_bits(struct wm8400 *wm8400, u8 reg,
> diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c
> index 3bd44a4..c1adfc1 100644
> --- a/drivers/mfd/wm8400-core.c
> +++ b/drivers/mfd/wm8400-core.c
> @@ -35,27 +35,6 @@ static bool wm8400_volatile(struct device *dev, unsigned int reg)
> }
> }
>
> -/**
> - * wm8400_reg_read - Single register read
> - *
> - * @wm8400: Pointer to wm8400 control structure
> - * @reg: Register to read
> - *
> - * @return Read value
> - */
> -u16 wm8400_reg_read(struct wm8400 *wm8400, u8 reg)
> -{
> - unsigned int val;
> - int ret;
> -
> - ret = regmap_read(wm8400->regmap, reg, &val);
> - if (ret < 0)
> - return ret;
> -
> - return val;
> -}
> -EXPORT_SYMBOL_GPL(wm8400_reg_read);
> -
> int wm8400_block_read(struct wm8400 *wm8400, u8 reg, int count, u16 *data)
> {
> return regmap_bulk_read(wm8400->regmap, reg, data, count);
--
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2016-04-25 11:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 9:40 [patch] mfd: wm8400-core: signedness bug in wm8400_reg_read() Dan Carpenter
2016-04-14 10:01 ` Charles Keepax
2016-04-15 14:44 ` [patch v2] mfd: wm8400-core: delete wm8400_reg_read() Dan Carpenter
2016-04-15 15:15 ` Charles Keepax
2016-04-25 11:00 ` Lee Jones [this message]
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=20160425110021.GD2713@dell \
--to=lee.jones@linaro.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=ckeepax@opensource.wolfsonmicro.com \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.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;
as well as URLs for NNTP newsgroup(s).