Re: [PATCH v3] kbuild: check uniqueness of module names

From: Stephen Rothwell
Date: Sun May 19 2019 - 20:10:24 EST


Hi Masahiro,

On Sat, 18 May 2019 01:07:15 +0900 Masahiro Yamada <yamada.masahiro@xxxxxxxxxxxxx> wrote:
>
> +++ b/scripts/modules-check.sh
> @@ -0,0 +1,16 @@
> +#!/bin/sh
> +# SPDX-License-Identifier: GPL-2.0
> +
> +set -e
> +
> +# Check uniqueness of module names
> +check_same_name_modules()
> +{
> + for m in $(sed 's:.*/::' modules.order modules.builtin | sort | uniq -d)
> + do
> + echo "warning: same basename if the following are built as modules:" >&2
> + sed "/\/$m/!d;s:^kernel/: :" modules.order modules.builtin >&2

(bringing out my bike shed paint brush :-))
this could be
sed -n "/\/$m/s:^kernel/: :p" ...

--
Cheers,
Stephen Rothwell

Attachment: pgpBpID_VupSR.pgp
Description: OpenPGP digital signature