staging: rtl8192u: remove redundant assignment to pointer crypt
[linux/fpc-iii.git] / tools / testing / selftests / rcutorture / bin / configNR_CPUS.sh
blob2deea2169fc2df428ec4420f8800d3e8d7b967b7
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0+
4 # Extract the number of CPUs expected from the specified Kconfig-file
5 # fragment by checking CONFIG_SMP and CONFIG_NR_CPUS. If the specified
6 # file gives no clue, base the number on the number of idle CPUs on
7 # the system.
9 # Usage: configNR_CPUS.sh config-frag
11 # Copyright (C) IBM Corporation, 2013
13 # Authors: Paul E. McKenney <paulmck@linux.ibm.com>
15 cf=$1
16 if test ! -r $cf
17 then
18 echo Unreadable config fragment $cf 1>&2
19 exit -1
21 if grep -q '^CONFIG_SMP=n$' $cf
22 then
23 echo 1
24 exit 0
26 if grep -q '^CONFIG_NR_CPUS=' $cf
27 then
28 grep '^CONFIG_NR_CPUS=' $cf |
29 sed -e 's/^CONFIG_NR_CPUS=\([0-9]*\).*$/\1/'
30 exit 0
32 cpus2use.sh