drm/panthor: Don't add write fences to the shared BOs
[drm/drm-misc.git] / scripts / modules-check.sh
blob4c8da90de78ea2de961caee88003d8fb0abe8ac3
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0
4 set -e
6 if [ $# != 1 ]; then
7 echo "Usage: $0 <modules.order>" >& 2
8 exit 1
9 fi
11 exit_code=0
13 # Check uniqueness of module names
14 check_same_name_modules()
16 for m in $(sed 's:.*/::' "$1" | sort | uniq -d)
18 echo "error: the following would cause module name conflict:" >&2
19 sed -n "/\/$m/s:^\(.*\)\.o\$: \1.ko:p" "$1" >&2
20 exit_code=1
21 done
24 check_same_name_modules "$1"
26 exit $exit_code