lkml.org 
[lkml]   [2019]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] kbuild: check uniqueness of module names
On Fri, May 17, 2019 at 2:34 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi Masahiro,
>
> Thanks for this, looks good to me. Just a nit below.
>
> On Fri, 17 May 2019 13:27:53 +0900 Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> >
>
> > diff --git a/scripts/modules-check.sh b/scripts/modules-check.sh
> > new file mode 100755
> > index 000000000000..c875f6eab01e
> > --- /dev/null
> > +++ b/scripts/modules-check.sh
> > @@ -0,0 +1,20 @@
> > +#!/bin/sh
> > +# SPDX-License-Identifier: GPL-2.0
> > +
> > +set -e
> > +
> > +# Check uniqueness of module names
> > +check_same_name_modules()
> > +{
> > + same_name_modules=$(cat modules.order modules.builtin | \
> ^
> This trailing '\' is unnecessary after a pipe symbol.


With the suggestion from Alexander Kapshuk,
the code in v3 became short enough to fit in 80-columns.

Anyway, thanks for pointing it out.





> > + xargs -r basename -a -- | sort | uniq -d)
> > +
> > + for m in $same_name_modules
> > + do
> > + echo "warning: same basename if the following are built as modules:" >&2
> > + grep -h -e "/$m" modules.order modules.builtin | \
>
> Same here
>
> > + sed 's:^kernel/: :' >&2
> > + done
> > +}
> > +
> > +check_same_name_modules
>
> Reviewed-by: Stephen ROthwell <sfr@canb.auug.org.au>
>
> --
> Cheers,
> Stephen Rothwell



--
Best Regards
Masahiro Yamada

\
 
 \ /
  Last update: 2019-05-17 18:25    [W:0.083 / U:12.588 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site