diff mbox

[2/3] kobject: export kset_find_obj() to be used from modules

Message ID 5c2bafb073e1386e39c4f73a83e7d835547b6b1f.1439220623.git.somlo@cmu.edu
State New
Headers show

Commit Message

Gabriel L. Somlo Aug. 10, 2015, 4:31 p.m. UTC
From: "Gabriel Somlo" <somlo@cmu.edu>

Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
---
 lib/kobject.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Greg KH Aug. 10, 2015, 6:33 p.m. UTC | #1
On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote:
> From: "Gabriel Somlo" <somlo@cmu.edu>
> 
> Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> ---
>  lib/kobject.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/lib/kobject.c b/lib/kobject.c
> index 3e3a5c3..f9754a0 100644
> --- a/lib/kobject.c
> +++ b/lib/kobject.c
> @@ -1058,3 +1058,4 @@ EXPORT_SYMBOL(kobject_del);
>  
>  EXPORT_SYMBOL(kset_register);
>  EXPORT_SYMBOL(kset_unregister);
> +EXPORT_SYMBOL(kset_find_obj);

checkpatch doesn't like this for obvious reasons :)
Gabriel L. Somlo Aug. 10, 2015, 6:43 p.m. UTC | #2
On Mon, Aug 10, 2015 at 11:33:04AM -0700, Greg KH wrote:
> On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote:
> > From: "Gabriel Somlo" <somlo@cmu.edu>
> > 
> > Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> > ---
> >  lib/kobject.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/lib/kobject.c b/lib/kobject.c
> > index 3e3a5c3..f9754a0 100644
> > --- a/lib/kobject.c
> > +++ b/lib/kobject.c
> > @@ -1058,3 +1058,4 @@ EXPORT_SYMBOL(kobject_del);
> >  
> >  EXPORT_SYMBOL(kset_register);
> >  EXPORT_SYMBOL(kset_unregister);
> > +EXPORT_SYMBOL(kset_find_obj);
> 
> checkpatch doesn't like this for obvious reasons :)

When I run checkpatch on this one, it comes back fine. Could you
please elaborate ?

[staging]$ scripts/checkpatch.pl
0002-kobject-export-kset_find_obj-to-be-used-from-modules.patch 
total: 0 errors, 0 warnings, 4 lines checked

0002-kobject-export-kset_find_obj-to-be-used-from-modules.patch has no
obvious style problems and is ready for submission.


Thanks much,
--Gabriel
Greg KH Aug. 10, 2015, 6:54 p.m. UTC | #3
On Mon, Aug 10, 2015 at 02:43:10PM -0400, Gabriel L. Somlo wrote:
> On Mon, Aug 10, 2015 at 11:33:04AM -0700, Greg KH wrote:
> > On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote:
> > > From: "Gabriel Somlo" <somlo@cmu.edu>
> > > 
> > > Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> > > ---
> > >  lib/kobject.c | 1 +
> > >  1 file changed, 1 insertion(+)
> > > 
> > > diff --git a/lib/kobject.c b/lib/kobject.c
> > > index 3e3a5c3..f9754a0 100644
> > > --- a/lib/kobject.c
> > > +++ b/lib/kobject.c
> > > @@ -1058,3 +1058,4 @@ EXPORT_SYMBOL(kobject_del);
> > >  
> > >  EXPORT_SYMBOL(kset_register);
> > >  EXPORT_SYMBOL(kset_unregister);
> > > +EXPORT_SYMBOL(kset_find_obj);
> > 
> > checkpatch doesn't like this for obvious reasons :)
> 
> When I run checkpatch on this one, it comes back fine. Could you
> please elaborate ?
> 
> [staging]$ scripts/checkpatch.pl
> 0002-kobject-export-kset_find_obj-to-be-used-from-modules.patch 
> total: 0 errors, 0 warnings, 4 lines checked
> 
> 0002-kobject-export-kset_find_obj-to-be-used-from-modules.patch has no
> obvious style problems and is ready for submission.

EXPORT_SYMBOL() should be below the function definition itself, not at
the bottom of the file.  Odd that checkpatch doesn't catch this when
done in this manner, it will if you run it on the whole file after your
patch is applied (along with the existing problems.)

But this is a minor issue, see my other review first...

greg k-h
Gabriel L. Somlo Aug. 10, 2015, 7:04 p.m. UTC | #4
On Mon, Aug 10, 2015 at 11:54:00AM -0700, Greg KH wrote:
> On Mon, Aug 10, 2015 at 02:43:10PM -0400, Gabriel L. Somlo wrote:
> > On Mon, Aug 10, 2015 at 11:33:04AM -0700, Greg KH wrote:
> > > On Mon, Aug 10, 2015 at 12:31:19PM -0400, Gabriel L. Somlo wrote:
> > > > From: "Gabriel Somlo" <somlo@cmu.edu>
> > > > 
> > > > Signed-off-by: Gabriel Somlo <somlo@cmu.edu>
> > > > ---
> > > >  lib/kobject.c | 1 +
> > > >  1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/lib/kobject.c b/lib/kobject.c
> > > > index 3e3a5c3..f9754a0 100644
> > > > --- a/lib/kobject.c
> > > > +++ b/lib/kobject.c
> > > > @@ -1058,3 +1058,4 @@ EXPORT_SYMBOL(kobject_del);
> > > >  
> > > >  EXPORT_SYMBOL(kset_register);
> > > >  EXPORT_SYMBOL(kset_unregister);
> > > > +EXPORT_SYMBOL(kset_find_obj);
> > > 
> > > checkpatch doesn't like this for obvious reasons :)
> > 
> > When I run checkpatch on this one, it comes back fine. Could you
> > please elaborate ?
> > 
> > [staging]$ scripts/checkpatch.pl
> > 0002-kobject-export-kset_find_obj-to-be-used-from-modules.patch 
> > total: 0 errors, 0 warnings, 4 lines checked
> > 
> > 0002-kobject-export-kset_find_obj-to-be-used-from-modules.patch has no
> > obvious style problems and is ready for submission.
> 
> EXPORT_SYMBOL() should be below the function definition itself, not at
> the bottom of the file.  Odd that checkpatch doesn't catch this when
> done in this manner, it will if you run it on the whole file after your
> patch is applied (along with the existing problems.)

Got it, fix lined up for v2

> But this is a minor issue, see my other review first...

Yeah, but it was the low hanging fruit, so I replied to it first ;)

Thanks much,
--Gabriel
diff mbox

Patch

diff --git a/lib/kobject.c b/lib/kobject.c
index 3e3a5c3..f9754a0 100644
--- a/lib/kobject.c
+++ b/lib/kobject.c
@@ -1058,3 +1058,4 @@  EXPORT_SYMBOL(kobject_del);
 
 EXPORT_SYMBOL(kset_register);
 EXPORT_SYMBOL(kset_unregister);
+EXPORT_SYMBOL(kset_find_obj);