From: Lee Jones <lee.jones@linaro.org>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: bleung@chromium.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] cros_ec: Use devm_kzalloc for private data
Date: Tue, 5 Jun 2018 07:59:07 +0100 [thread overview]
Message-ID: <20180605065907.GE21163@dell> (raw)
In-Reply-To: <20180530165422.51178-1-gwendal@chromium.org>
On Wed, 30 May 2018, Gwendal Grignou wrote:
> Use dev_kzmalloc, remove .release entry point.
>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
> Change sinc v1:
> - Readd __remove to avoid a warning when loaded as a module.
>
> drivers/mfd/cros_ec_dev.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c
> index 1d6dc5c7a19d..81466264f7fc 100644
> --- a/drivers/mfd/cros_ec_dev.c
> +++ b/drivers/mfd/cros_ec_dev.c
> @@ -262,12 +262,7 @@ static const struct file_operations fops = {
> #endif
> };
>
> -static void __remove(struct device *dev)
> -{
> - struct cros_ec_dev *ec = container_of(dev, struct cros_ec_dev,
> - class_dev);
> - kfree(ec);
> -}
> +static void __remove(struct device *dev) { }
I missed this line when reviewing.
Why are you keeping the function around?
As a result, we now suffer with a build warning:
drivers/mfd/cros_ec_dev.c:265:13: warning: '__remove' defined but not used [-Wunused-function]
static void __remove(struct device *dev) { }
Can I just remove the line? What are the ramifications of doing so?
Please reply swiftly, so resolve this issue in good time.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
prev parent reply other threads:[~2018-06-05 6:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-09 23:06 [PATCH] cros_ec: Use devm_kzalloc for private data Gwendal Grignou
2018-05-23 16:35 ` Enric Balletbo Serra
2018-05-30 16:04 ` [PATCH v2] platform/chrome: Use to_cros_ec_dev more broadly Gwendal Grignou
2018-05-30 16:43 ` Enric Balletbo Serra
2018-05-30 19:06 ` Benson Leung
2018-05-30 16:54 ` [PATCH v2] cros_ec: Use devm_kzalloc for private data Gwendal Grignou
2018-06-04 7:42 ` Lee Jones
2018-06-05 6:59 ` 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=20180605065907.GE21163@dell \
--to=lee.jones@linaro.org \
--cc=bleung@chromium.org \
--cc=gwendal@chromium.org \
--cc=linux-kernel@vger.kernel.org \
/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 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.