From: Athira Rajeev Date: Fri, 13 Oct 2023 07:30:21 +0000 (+0530) Subject: perf tests: Fix shellcheck warning in stat_all_metricgroups X-Git-Tag: v6.7-rc1~83^2~44 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a20fca2c5db19a09260827e526f37397ba698ce0;p=thirdparty%2Fkernel%2Flinux.git perf tests: Fix shellcheck warning in stat_all_metricgroups Running shellcheck on stat_all_metricgroups.sh reports below warning: In ./tests/shell/stat_all_metricgroups.sh line 7: function ParanoidAndNotRoot() ^-- SC2112: 'function' keyword is non-standard. Delete it. As per the format, "function" is a non-standard keyword that can be used to declare functions. Fix this by removing the "function" keyword from ParanoidAndNotRoot function Signed-off-by: Athira Rajeev Acked-by: Namhyung Kim Cc: kjain@linux.ibm.com Cc: maddy@linux.ibm.com Cc: disgoel@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20231013073021.99794-4-atrajeev@linux.vnet.ibm.com Signed-off-by: Namhyung Kim --- diff --git a/tools/perf/tests/shell/stat_all_metricgroups.sh b/tools/perf/tests/shell/stat_all_metricgroups.sh index f3e305649e2c1..55ef9c9ded2d7 100755 --- a/tools/perf/tests/shell/stat_all_metricgroups.sh +++ b/tools/perf/tests/shell/stat_all_metricgroups.sh @@ -4,7 +4,7 @@ set -e -function ParanoidAndNotRoot() +ParanoidAndNotRoot() { [ "$(id -u)" != 0 ] && [ "$(cat /proc/sys/kernel/perf_event_paranoid)" -gt $1 ] }