Staging: fsm-mc: bus: remove unused function modalias_show
PATCH 1/1 Staging: fsm-mc: bus: remove unused function modalias_show
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(...){...}
--- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0 -9
@@ -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[] = {
Signature · 1 line
1.9.1
Greg KH
maintainerQuoted 36 lines · Bhumika Goyal
The function
modalias_showis 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 <[email protected]>--- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 9 --------- 1 file changed, 9 deletions(-)drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-0@@ -121,15 +121,6 @@ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)return 0 ; }
drivers/staging/fsl-mc/bus/fsl-mc-bus.c static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) · line 124
Quoted 10 lines
drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-9- -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
Quoted 35 lines · Greg KH
Quoted 34 lines · Bhumika Goyal
The function
modalias_showis 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 <[email protected]>--- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 9 --------- 1 file changed, 9 deletions(-)drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-0@@ -121,15 +121,6 @@ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)
Quoted 16 lines
drivers/staging/fsl-mc/bus/fsl-mc-bus.c static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) · line 124
Quoted 12 lines
drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-9return 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?
Yes, it did build successfully. I am confused that why didn't the build complain then ?
Thanks for the input.
Thanks,
Bhumika
Quoted 3 lines
confused,
greg k-h
Greg KH
maintainerQuoted 52 lines · Bhumika Goyal
Quoted 35 lines · Greg KH
Quoted 34 lines · Bhumika Goyal
The function
modalias_showis 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 <[email protected]>--- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 9 --------- 1 file changed, 9 deletions(-)drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-0@@ -121,15 +121,6 @@ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)Quoted 16 lines
drivers/staging/fsl-mc/bus/fsl-mc-bus.c static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) · line 124
Quoted 12 lines
drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-9return 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?
Quoted 2 lines
Yes, it did build successfully. I am confused that why didn't the build complain then ?
Are you sure you built this file? It's only usually built for an ARM system...
thanks,
greg k-h
Quoted 53 lines · Greg KH
Quoted 52 lines · Bhumika Goyal
Quoted 51 lines · Greg KH
Quoted 36 lines · Bhumika Goyal
The function
modalias_showis 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 <[email protected]>--- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 9 --------- 1 file changed, 9 deletions(-)drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-0@@ -121,15 +121,6 @@ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)return 0 ; }drivers/staging/fsl-mc/bus/fsl-mc-bus.c static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) · line 124
Quoted 10 lines
drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-9- -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?
Quoted 6 lines
Quoted 2 lines
Yes, it did build successfully. I am confused that why didn't the build complain then ?
Are you sure you built this file? It's only usually built for an ARM system...
My system's architecture is x86_64. And yes, it did build successfully. I did : make drivers/staging/fsl-mc/
Thanks,
Bhumika
Quoted 3 lines
thanks,
greg k-h
Greg KH
maintainerQuoted 54 lines · Bhumika Goyal
Quoted 53 lines · Greg KH
Quoted 52 lines · Bhumika Goyal
Quoted 51 lines · Greg KH
Quoted 36 lines · Bhumika Goyal
The function
modalias_showis 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 <[email protected]>--- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 9 --------- 1 file changed, 9 deletions(-)drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-0@@ -121,15 +121,6 @@ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)return 0 ; }drivers/staging/fsl-mc/bus/fsl-mc-bus.c static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) · line 124
Quoted 10 lines
drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-9- -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?
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Yes, it did build successfully. I am confused that why didn't the build complain then ?
Are you sure you built this file? It's only usually built for an ARM system...
My system's architecture is
x86_64. And yes, it did build successfully. I did : makedrivers/staging/fsl-mc/
And did a .o file get built from the .c file you modified?
Just because you tell the build system to build a subdir, doesn't mean it builds all of the files in it.
thanks,
greg k-h
Quoted 61 lines · Greg KH
Quoted 60 lines · Bhumika Goyal
Quoted 59 lines · Greg KH
Quoted 52 lines · Bhumika Goyal
Quoted 35 lines · Greg KH
Quoted 34 lines · Bhumika Goyal
The function
modalias_showis 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 <[email protected]>--- drivers/staging/fsl-mc/bus/fsl-mc-bus.c | 9 --------- 1 file changed, 9 deletions(-)drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-0@@ -121,15 +121,6 @@ static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env)Quoted 16 lines
drivers/staging/fsl-mc/bus/fsl-mc-bus.c static int fsl_mc_bus_uevent(struct device *dev, struct kobj_uevent_env *env) · line 124
Quoted 12 lines
drivers/staging/fsl-mc/bus/fsl-mc-bus.c +0
-9return 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?
Quoted 2 lines
Yes, it did build successfully. I am confused that why didn't the build complain then ?
Are you sure you built this file? It's only usually built for an ARM system...
Quoted 8 lines
Quoted 2 lines
My system's architecture is
x86_64. And yes, it did build successfully. I did : makedrivers/staging/fsl-mc/And did a .o file get built from the .c file you modified?
Just because you tell the build system to build a subdir, doesn't mean it builds all of the files in it.
Understood.
My bad, I will be more careful from next time. Thanks for the input.
Thanks,
Bhumika
Quoted 3 lines
thanks,
greg k-h