All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: fsm-mc: bus: remove unused function modalias_show
@ 2016-10-07 14:26 Bhumika Goyal
  2016-10-07 14:32 ` Greg KH
  0 siblings, 1 reply; 7+ messages in thread
From: Bhumika Goyal @ 2016-10-07 14:26 UTC (permalink / raw)
  To: outreachy-kernel, gregkh, German.Rivera, stuart.yoder; +Cc: Bhumika Goyal

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);
 
 static struct attribute *fsl_mc_dev_attrs[] = {
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-10-07 16:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-07 14:26 [PATCH] Staging: fsm-mc: bus: remove unused function modalias_show Bhumika Goyal
2016-10-07 14:32 ` Greg KH
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

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.