From: Greg KH <gregkh@linuxfoundation.org>
To: Bhumika Goyal <bhumirks@gmail.com>
Cc: outreachy-kernel@googlegroups.com, German.Rivera@freescale.com,
stuart.yoder@nxp.com
Subject: Re: [PATCH] Staging: fsm-mc: bus: remove unused function modalias_show
Date: Fri, 7 Oct 2016 16:32:03 +0200 [thread overview]
Message-ID: <20161007143203.GA26091@kroah.com> (raw)
In-Reply-To: <1475850411-16745-1-git-send-email-bhumirks@gmail.com>
On Fri, Oct 07, 2016 at 07:56:51PM +0530, Bhumika Goyal wrote:
> The function modalias_show is not used anywhere in the kernel, so
> remove it. Done using Coccinelle:
>
> @r1@
> identifier func;
> type T;
> @@
> static T func(...)
> {
> ...
> }
>
> @r@
> identifier r1.func;
> @@
> func
>
> @delete depends on !r@
> identifier r1.func;
> type r1.T;
> @@
> - static T func(...){...}
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
> drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 9 ---------
> 1 file changed, 9 deletions(-)
>
> diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
> index 44f64b6..e8bca6e 100644
> --- a/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
> +++ b/drivers/staging/fsl-mc/bus/fsl-mc-bus.c
> @@ -121,15 +121,6 @@ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
>
> return 0;
> }
> -
> -static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
> - char *buf)
> -{
> - struct fsl_mc_device *mc_dev = to_fsl_mc_device(dev);
> -
> - return sprintf(buf, "fsl-mc:v%08Xd%s\n", mc_dev->obj_desc.vendor,
> - mc_dev->obj_desc.type);
> -}
> static DEVICE_ATTR_RO(modalias);
Um, it's used right there in the line you didn't delete. Did you build
this code successfully with this change?
confused,
greg k-h
next prev parent reply other threads:[~2016-10-07 14:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-07 14:26 [PATCH] Staging: fsm-mc: bus: remove unused function modalias_show Bhumika Goyal
2016-10-07 14:32 ` Greg KH [this message]
2016-10-07 14:37 ` Bhumika Goyal
2016-10-07 14:54 ` [Outreachy kernel] " Greg KH
2016-10-07 15:00 ` Bhumika Goyal
2016-10-07 15:06 ` Greg KH
2016-10-07 16:35 ` Bhumika Goyal
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=20161007143203.GA26091@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=German.Rivera@freescale.com \
--cc=bhumirks@gmail.com \
--cc=outreachy-kernel@googlegroups.com \
--cc=stuart.yoder@nxp.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 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.