diff options
author | Sidath Senanayake <sidaths@google.com> | 2021-01-29 15:03:53 +0000 |
---|---|---|
committer | Sidath Senanayake <sidaths@google.com> | 2021-01-29 15:03:53 +0000 |
commit | 9748305a584b9f1f7705303ce6e33a5e8b923e60 (patch) | |
tree | a73788e1d912a3202db3a99018002e0858e9a948 /mali_kbase/tests | |
parent | 201c8bfb4637601363b6e9283f3bdc510711a226 (diff) | |
download | gpu-9748305a584b9f1f7705303ce6e33a5e8b923e60.tar.gz |
Mali Valhall DDK r29p0 KMD
Provenance:
afaca8da1 (collaborate/EAC/v_r29p0)
VX504X08X-BU-00000-r29p0-01eac0 - Valhall Android DDK
VX504X08X-BU-60000-r29p0-01eac0 - Valhall Android Document Bundle
VX504X08X-DC-11001-r29p0-01eac0 - Valhall Android DDK Software Errata
VX504X08X-SW-99006-r29p0-01eac0 - Valhall Android Renderscript AOSP parts
Signed-off-by: Sidath Senanayake <sidaths@google.com>
Change-Id: Ie0904c9223b7ec9311b848a52d3159ac2b07530e
Diffstat (limited to 'mali_kbase/tests')
24 files changed, 246 insertions, 63 deletions
diff --git a/mali_kbase/tests/Mconfig b/mali_kbase/tests/Mconfig index be3fedb..cdbbaac 100644 --- a/mali_kbase/tests/Mconfig +++ b/mali_kbase/tests/Mconfig @@ -1,14 +1,21 @@ +# SPDX-License-Identifier: GPL-2.0 # # (C) COPYRIGHT 2018-2020 ARM Limited. All rights reserved. # # This program is free software and is provided to you under the terms of the # GNU General Public License version 2 as published by the Free Software # Foundation, and any use by you of this program is subject to the terms -# of such GNU licence. +# of such GNU license. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, you can access it online at +# http://www.gnu.org/licenses/gpl-2.0.html. # -# A copy of the licence is included with the program, and can also be obtained -# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, -# Boston, MA 02110-1301, USA. # config UNIT_TEST_KERNEL_MODULES diff --git a/mali_kbase/tests/include/kutf/kutf_helpers.h b/mali_kbase/tests/include/kutf/kutf_helpers.h index 858b9c3..ea87f9c 100644 --- a/mali_kbase/tests/include/kutf/kutf_helpers.h +++ b/mali_kbase/tests/include/kutf/kutf_helpers.h @@ -1,6 +1,6 @@ /* * - * (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved. + * (C) COPYRIGHT ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -18,6 +18,25 @@ * * SPDX-License-Identifier: GPL-2.0 * + *//* SPDX-License-Identifier: GPL-2.0 */ +/* + * + * (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved. + * + * This program is free software and is provided to you under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation, and any use by you of this program is subject to the terms + * of such GNU license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. + * */ #ifndef _KERNEL_UTF_HELPERS_H_ diff --git a/mali_kbase/tests/include/kutf/kutf_helpers_user.h b/mali_kbase/tests/include/kutf/kutf_helpers_user.h index 3b1300e..38f36fc 100644 --- a/mali_kbase/tests/include/kutf/kutf_helpers_user.h +++ b/mali_kbase/tests/include/kutf/kutf_helpers_user.h @@ -1,6 +1,6 @@ /* * - * (C) COPYRIGHT 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -18,6 +18,25 @@ * * SPDX-License-Identifier: GPL-2.0 * + *//* SPDX-License-Identifier: GPL-2.0 */ +/* + * + * (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved. + * + * This program is free software and is provided to you under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation, and any use by you of this program is subject to the terms + * of such GNU license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. + * */ #ifndef _KERNEL_UTF_HELPERS_USER_H_ @@ -63,7 +82,8 @@ struct kutf_helper_named_val { * unrecoverable) * * Positive values indicate correct access but invalid parsing (can be - * recovered from assuming data in the future is correct) */ + * recovered from assuming data in the future is correct) + */ enum kutf_helper_err { /* No error - must be zero */ KUTF_HELPER_ERR_NONE = 0, @@ -71,14 +91,16 @@ enum kutf_helper_err { KUTF_HELPER_ERR_INVALID_NAME, /* Named value parsing of string or u64 type encountered extra * characters after the value (after the last digit for a u64 type or - * after the string end delimiter for string type) */ + * after the string end delimiter for string type) + */ KUTF_HELPER_ERR_CHARS_AFTER_VAL, /* Named value parsing of string type couldn't find the string end * delimiter. * * This cannot be encountered when the NAME="value" message exceeds the * textbuf's maximum line length, because such messages are not checked - * for an end string delimiter */ + * for an end string delimiter + */ KUTF_HELPER_ERR_NO_END_DELIMITER, /* Named value didn't parse as any of the known types */ KUTF_HELPER_ERR_INVALID_VALUE, @@ -122,7 +144,8 @@ int kutf_helper_max_str_len_for_kern(const char *val_name, int kern_buf_sz); * * Any failure will be logged on the suite's current test fixture * - * Returns 0 on success, non-zero on failure */ + * Returns 0 on success, non-zero on failure + */ int kutf_helper_send_named_str(struct kutf_context *context, const char *val_name, const char *val_str); @@ -138,7 +161,8 @@ int kutf_helper_send_named_str(struct kutf_context *context, * * Returns 0 on success. Negative value on failure to receive from the 'run' * file, positive value indicates an enum kutf_helper_err value for correct - * reception of data but invalid parsing */ + * reception of data but invalid parsing + */ int kutf_helper_receive_named_val( struct kutf_context *context, struct kutf_helper_named_val *named_val); @@ -165,7 +189,8 @@ int kutf_helper_receive_named_val( * - return value will be 0 to indicate success * * The rationale behind this is that we'd prefer to continue the rest of the - * test with failures propagated, rather than hitting a timeout */ + * test with failures propagated, rather than hitting a timeout + */ int kutf_helper_receive_check_val( struct kutf_helper_named_val *named_val, struct kutf_context *context, diff --git a/mali_kbase/tests/include/kutf/kutf_mem.h b/mali_kbase/tests/include/kutf/kutf_mem.h index 988559d..8a0e855 100644 --- a/mali_kbase/tests/include/kutf/kutf_mem.h +++ b/mali_kbase/tests/include/kutf/kutf_mem.h @@ -1,6 +1,6 @@ /* * - * (C) COPYRIGHT 2014, 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -18,6 +18,25 @@ * * SPDX-License-Identifier: GPL-2.0 * + *//* SPDX-License-Identifier: GPL-2.0 */ +/* + * + * (C) COPYRIGHT 2014, 2017, 2020 ARM Limited. All rights reserved. + * + * This program is free software and is provided to you under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation, and any use by you of this program is subject to the terms + * of such GNU license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. + * */ #ifndef _KERNEL_UTF_MEM_H_ diff --git a/mali_kbase/tests/include/kutf/kutf_resultset.h b/mali_kbase/tests/include/kutf/kutf_resultset.h index 49ebeb4..f21de19 100644 --- a/mali_kbase/tests/include/kutf/kutf_resultset.h +++ b/mali_kbase/tests/include/kutf/kutf_resultset.h @@ -1,6 +1,6 @@ /* * - * (C) COPYRIGHT 2014, 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -18,6 +18,25 @@ * * SPDX-License-Identifier: GPL-2.0 * + *//* SPDX-License-Identifier: GPL-2.0 */ +/* + * + * (C) COPYRIGHT 2014, 2017, 2020 ARM Limited. All rights reserved. + * + * This program is free software and is provided to you under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation, and any use by you of this program is subject to the terms + * of such GNU license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. + * */ #ifndef _KERNEL_UTF_RESULTSET_H_ diff --git a/mali_kbase/tests/include/kutf/kutf_suite.h b/mali_kbase/tests/include/kutf/kutf_suite.h index 8d75f50..f4af4fa 100644 --- a/mali_kbase/tests/include/kutf/kutf_suite.h +++ b/mali_kbase/tests/include/kutf/kutf_suite.h @@ -1,6 +1,6 @@ /* * - * (C) COPYRIGHT 2014, 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -18,6 +18,25 @@ * * SPDX-License-Identifier: GPL-2.0 * + *//* SPDX-License-Identifier: GPL-2.0 */ +/* + * + * (C) COPYRIGHT 2014, 2017, 2020 ARM Limited. All rights reserved. + * + * This program is free software and is provided to you under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation, and any use by you of this program is subject to the terms + * of such GNU license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. + * */ #ifndef _KERNEL_UTF_SUITE_H_ @@ -264,9 +283,10 @@ struct kutf_suite { struct list_head test_list; }; -/* ============================================================================ - Application functions -============================================================================ */ +/** =========================================================================== + * Application functions + * ============================================================================ + */ /** * kutf_create_application() - Create an in kernel test application. @@ -284,9 +304,10 @@ struct kutf_application *kutf_create_application(const char *name); */ void kutf_destroy_application(struct kutf_application *app); -/* ============================================================================ - Suite functions -============================================================================ */ +/**============================================================================ + * Suite functions + * ============================================================================ + */ /** * kutf_create_suite() - Create a kernel test suite. @@ -416,10 +437,10 @@ void kutf_add_test_with_filters_and_data( unsigned int filters, union kutf_callback_data test_data); - -/* ============================================================================ - Test functions -============================================================================ */ +/** =========================================================================== + * Test functions + * ============================================================================ + */ /** * kutf_test_log_result_external() - Log a result which has been created * externally into a in a standard form diff --git a/mali_kbase/tests/include/kutf/kutf_utils.h b/mali_kbase/tests/include/kutf/kutf_utils.h index 25b8285..a60e569 100644 --- a/mali_kbase/tests/include/kutf/kutf_utils.h +++ b/mali_kbase/tests/include/kutf/kutf_utils.h @@ -1,6 +1,6 @@ /* * - * (C) COPYRIGHT 2014, 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -18,6 +18,25 @@ * * SPDX-License-Identifier: GPL-2.0 * + *//* SPDX-License-Identifier: GPL-2.0 */ +/* + * + * (C) COPYRIGHT 2014, 2017, 2020 ARM Limited. All rights reserved. + * + * This program is free software and is provided to you under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation, and any use by you of this program is subject to the terms + * of such GNU license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. + * */ #ifndef _KERNEL_UTF_UTILS_H_ diff --git a/mali_kbase/tests/kutf/Kbuild b/mali_kbase/tests/kutf/Kbuild index 2531d41..de68729 100644 --- a/mali_kbase/tests/kutf/Kbuild +++ b/mali_kbase/tests/kutf/Kbuild @@ -1,5 +1,5 @@ # -# (C) COPYRIGHT 2017 ARM Limited. All rights reserved. +# (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved. # # This program is free software and is provided to you under the terms of the # GNU General Public License version 2 as published by the Free Software diff --git a/mali_kbase/tests/kutf/Kconfig b/mali_kbase/tests/kutf/Kconfig index 0cdb474..3d1f92d 100644 --- a/mali_kbase/tests/kutf/Kconfig +++ b/mali_kbase/tests/kutf/Kconfig @@ -1,5 +1,5 @@ # -# (C) COPYRIGHT 2017 ARM Limited. All rights reserved. +# (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved. # # This program is free software and is provided to you under the terms of the # GNU General Public License version 2 as published by the Free Software @@ -19,7 +19,6 @@ # # - config MALI_KUTF tristate "Mali Kernel Unit Test Framework" default m diff --git a/mali_kbase/tests/kutf/Makefile b/mali_kbase/tests/kutf/Makefile index d848e87..b9e070b 100644 --- a/mali_kbase/tests/kutf/Makefile +++ b/mali_kbase/tests/kutf/Makefile @@ -1,5 +1,5 @@ # -# (C) COPYRIGHT 2014-2017 ARM Limited. All rights reserved. +# (C) COPYRIGHT 2014-2017, 2020 ARM Limited. All rights reserved. # # This program is free software and is provided to you under the terms of the # GNU General Public License version 2 as published by the Free Software diff --git a/mali_kbase/tests/kutf/build.bp b/mali_kbase/tests/kutf/build.bp index 32eab14..707a053 100644 --- a/mali_kbase/tests/kutf/build.bp +++ b/mali_kbase/tests/kutf/build.bp @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * * (C) COPYRIGHT 2018-2020 ARM Limited. All rights reserved. @@ -5,11 +6,16 @@ * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software * Foundation, and any use by you of this program is subject to the terms - * of such GNU licence. + * of such GNU license. * - * A copy of the licence is included with the program, and can also be obtained - * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. * */ diff --git a/mali_kbase/tests/kutf/kutf_helpers.c b/mali_kbase/tests/kutf/kutf_helpers.c index 4463b04..13b6353 100644 --- a/mali_kbase/tests/kutf/kutf_helpers.c +++ b/mali_kbase/tests/kutf/kutf_helpers.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * * (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved. diff --git a/mali_kbase/tests/kutf/kutf_helpers_user.c b/mali_kbase/tests/kutf/kutf_helpers_user.c index 108fa82..00bc9c0 100644 --- a/mali_kbase/tests/kutf/kutf_helpers_user.c +++ b/mali_kbase/tests/kutf/kutf_helpers_user.c @@ -1,6 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 /* * - * (C) COPYRIGHT 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -42,7 +43,8 @@ static const char *get_val_type_name(enum kutf_helper_valtype valtype) * a) "<0 comparison on unsigned type" warning - if we did both upper * and lower bound check * b) incorrect range checking if it was a signed type - if we did - * upper bound check only */ + * upper bound check only + */ unsigned int type_idx = (unsigned int)valtype; if (type_idx >= (unsigned int)KUTF_HELPER_VALTYPE_COUNT) @@ -54,7 +56,8 @@ static const char *get_val_type_name(enum kutf_helper_valtype valtype) /* Check up to str_len chars of val_str to see if it's a valid value name: * * - Has between 1 and KUTF_HELPER_MAX_VAL_NAME_LEN characters before the \0 terminator - * - And, each char is in the character set [A-Z0-9_] */ + * - And, each char is in the character set [A-Z0-9_] + */ static int validate_val_name(const char *val_str, int str_len) { int i = 0; @@ -87,7 +90,8 @@ static int validate_val_name(const char *val_str, int str_len) * e.g. "str" * * That is, before any '\\', '\n' or '"' characters. This is so we don't have - * to escape the string */ + * to escape the string + */ static int find_quoted_string_valid_len(const char *str) { char *ptr; @@ -207,7 +211,8 @@ int kutf_helper_send_named_str(struct kutf_context *context, str_buf_sz = val_name_len + start_delim_len + val_str_len + end_delim_len + 1; /* Using kmalloc() here instead of mempool since we know we need to free - * before we return */ + * before we return + */ str_buf = kmalloc(str_buf_sz, GFP_KERNEL); if (!str_buf) { errmsg = kutf_dsprintf(&context->fixture_pool, @@ -218,7 +223,8 @@ int kutf_helper_send_named_str(struct kutf_context *context, copy_ptr = str_buf; /* Manually copy each string component instead of snprintf because - * val_str may need to end early, and less error path handling */ + * val_str may need to end early, and less error path handling + */ /* name */ memcpy(copy_ptr, val_name, val_name_len); @@ -331,7 +337,8 @@ int kutf_helper_receive_named_val( /* possibly a number value - strtoull will parse it */ err = kstrtoull(recv_str, 0, &u64val); /* unlike userspace can't get an end ptr, but if kstrtoull() - * reads characters after the number it'll report -EINVAL */ + * reads characters after the number it'll report -EINVAL + */ if (!err) { int len_remain = strnlen(recv_str, recv_sz); @@ -399,7 +406,8 @@ int kutf_helper_receive_check_val( goto out_fail_and_fixup; } - if (strcmp(named_val->val_name, expect_val_name) != 0) { + if (named_val->val_name != NULL && + strcmp(named_val->val_name, expect_val_name) != 0) { const char *msg = kutf_dsprintf(&context->fixture_pool, "Expecting to receive value named '%s' but got '%s'", expect_val_name, named_val->val_name); diff --git a/mali_kbase/tests/kutf/kutf_mem.c b/mali_kbase/tests/kutf/kutf_mem.c index fd98bea..88c2de8 100644 --- a/mali_kbase/tests/kutf/kutf_mem.c +++ b/mali_kbase/tests/kutf/kutf_mem.c @@ -1,6 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 /* * - * (C) COPYRIGHT 2014, 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2014, 2017, 2020 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software diff --git a/mali_kbase/tests/kutf/kutf_resultset.c b/mali_kbase/tests/kutf/kutf_resultset.c index 94ecfa4..ed6f02a 100644 --- a/mali_kbase/tests/kutf/kutf_resultset.c +++ b/mali_kbase/tests/kutf/kutf_resultset.c @@ -1,6 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 /* * - * (C) COPYRIGHT 2014, 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2014, 2017, 2020 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software diff --git a/mali_kbase/tests/kutf/kutf_suite.c b/mali_kbase/tests/kutf/kutf_suite.c index 9dc6e2b..382557b 100644 --- a/mali_kbase/tests/kutf/kutf_suite.c +++ b/mali_kbase/tests/kutf/kutf_suite.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * * (C) COPYRIGHT 2014, 2017-2020 ARM Limited. All rights reserved. @@ -21,7 +22,8 @@ */ /* Kernel UTF suite, test and fixture management including user to kernel - * interaction */ + * interaction + */ #include <linux/list.h> #include <linux/slab.h> @@ -598,7 +600,7 @@ static int create_fixture_variant(struct kutf_test_function *test_func, goto fail_file; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0) +#if KERNEL_VERSION(4, 7, 0) <= LINUX_VERSION_CODE tmp = debugfs_create_file_unsafe( #else tmp = debugfs_create_file( @@ -634,7 +636,7 @@ static void kutf_remove_test_variant(struct kutf_test_fixture *test_fix) kfree(test_fix); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0) +#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE /* Adapting to the upstream debugfs_create_x32() change */ static int ktufp_u32_get(void *data, u64 *val) { @@ -679,7 +681,7 @@ void kutf_add_test_with_filters_and_data( } test_func->filters = filters; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0) +#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE tmp = debugfs_create_file_unsafe("filters", S_IROTH, test_func->dir, &test_func->filters, &kutfp_fops_x32_ro); #else @@ -692,7 +694,7 @@ void kutf_add_test_with_filters_and_data( } test_func->test_id = id; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0) +#if KERNEL_VERSION(5, 5, 0) <= LINUX_VERSION_CODE debugfs_create_u32("test_id", S_IROTH, test_func->dir, &test_func->test_id); #else diff --git a/mali_kbase/tests/kutf/kutf_utils.c b/mali_kbase/tests/kutf/kutf_utils.c index 7f5ac51..7d1de25 100644 --- a/mali_kbase/tests/kutf/kutf_utils.c +++ b/mali_kbase/tests/kutf/kutf_utils.c @@ -1,6 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 /* * - * (C) COPYRIGHT 2014, 2017 ARM Limited. All rights reserved. + * (C) COPYRIGHT 2014, 2017, 2020 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software diff --git a/mali_kbase/tests/mali_kutf_clk_rate_trace/kernel/build.bp b/mali_kbase/tests/mali_kutf_clk_rate_trace/kernel/build.bp index 0cc2904..c16b3de 100644 --- a/mali_kbase/tests/mali_kutf_clk_rate_trace/kernel/build.bp +++ b/mali_kbase/tests/mali_kutf_clk_rate_trace/kernel/build.bp @@ -1,14 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* + * * (C) COPYRIGHT 2020 ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software * Foundation, and any use by you of this program is subject to the terms - * of such GNU licence. + * of such GNU license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. * - * A copy of the licence is included with the program, and can also be obtained - * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. */ bob_kernel_module { diff --git a/mali_kbase/tests/mali_kutf_clk_rate_trace/kernel/mali_kutf_clk_rate_trace_test.c b/mali_kbase/tests/mali_kutf_clk_rate_trace/kernel/mali_kutf_clk_rate_trace_test.c index d74a278..88dfef4 100644 --- a/mali_kbase/tests/mali_kutf_clk_rate_trace/kernel/mali_kutf_clk_rate_trace_test.c +++ b/mali_kbase/tests/mali_kutf_clk_rate_trace/kernel/mali_kutf_clk_rate_trace_test.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * * (C) COPYRIGHT 2020 ARM Limited. All rights reserved. diff --git a/mali_kbase/tests/mali_kutf_clk_rate_trace/mali_kutf_clk_rate_trace_test.h b/mali_kbase/tests/mali_kutf_clk_rate_trace/mali_kutf_clk_rate_trace_test.h index f46afd5..0b7b84d 100644 --- a/mali_kbase/tests/mali_kutf_clk_rate_trace/mali_kutf_clk_rate_trace_test.h +++ b/mali_kbase/tests/mali_kutf_clk_rate_trace/mali_kutf_clk_rate_trace_test.h @@ -1,6 +1,6 @@ /* * - * (C) COPYRIGHT 2020 ARM Limited. All rights reserved. + * (C) COPYRIGHT ARM Limited. All rights reserved. * * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software @@ -18,6 +18,25 @@ * * SPDX-License-Identifier: GPL-2.0 * + *//* SPDX-License-Identifier: GPL-2.0 */ +/* + * + * (C) COPYRIGHT 2020 ARM Limited. All rights reserved. + * + * This program is free software and is provided to you under the terms of the + * GNU General Public License version 2 as published by the Free Software + * Foundation, and any use by you of this program is subject to the terms + * of such GNU license. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. + * */ #ifndef _KUTF_CLK_RATE_TRACE_TEST_H_ diff --git a/mali_kbase/tests/mali_kutf_irq_test/Kbuild b/mali_kbase/tests/mali_kutf_irq_test/Kbuild index ca8c512..a1a4828 100644 --- a/mali_kbase/tests/mali_kutf_irq_test/Kbuild +++ b/mali_kbase/tests/mali_kutf_irq_test/Kbuild @@ -1,5 +1,5 @@ # -# (C) COPYRIGHT 2017 ARM Limited. All rights reserved. +# (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved. # # This program is free software and is provided to you under the terms of the # GNU General Public License version 2 as published by the Free Software diff --git a/mali_kbase/tests/mali_kutf_irq_test/Kconfig b/mali_kbase/tests/mali_kutf_irq_test/Kconfig index 4a3863a..c49ec11 100644 --- a/mali_kbase/tests/mali_kutf_irq_test/Kconfig +++ b/mali_kbase/tests/mali_kutf_irq_test/Kconfig @@ -1,5 +1,5 @@ # -# (C) COPYRIGHT 2017 ARM Limited. All rights reserved. +# (C) COPYRIGHT 2017, 2020 ARM Limited. All rights reserved. # # This program is free software and is provided to you under the terms of the # GNU General Public License version 2 as published by the Free Software diff --git a/mali_kbase/tests/mali_kutf_irq_test/build.bp b/mali_kbase/tests/mali_kutf_irq_test/build.bp index 90efdcf..58021c8 100644 --- a/mali_kbase/tests/mali_kutf_irq_test/build.bp +++ b/mali_kbase/tests/mali_kutf_irq_test/build.bp @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * * (C) COPYRIGHT 2018-2020 ARM Limited. All rights reserved. @@ -5,11 +6,16 @@ * This program is free software and is provided to you under the terms of the * GNU General Public License version 2 as published by the Free Software * Foundation, and any use by you of this program is subject to the terms - * of such GNU licence. + * of such GNU license. * - * A copy of the licence is included with the program, and can also be obtained - * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - * Boston, MA 02110-1301, USA. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you can access it online at + * http://www.gnu.org/licenses/gpl-2.0.html. * */ diff --git a/mali_kbase/tests/mali_kutf_irq_test/mali_kutf_irq_test_main.c b/mali_kbase/tests/mali_kutf_irq_test/mali_kutf_irq_test_main.c index 5f27c3a..3c22004 100644 --- a/mali_kbase/tests/mali_kutf_irq_test/mali_kutf_irq_test_main.c +++ b/mali_kbase/tests/mali_kutf_irq_test/mali_kutf_irq_test_main.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* * * (C) COPYRIGHT 2016-2018, 2020 ARM Limited. All rights reserved. @@ -242,7 +243,7 @@ int mali_kutf_irq_test_main_init(void) irq_app = kutf_create_application("irq"); - if (NULL == irq_app) { + if (irq_app == NULL) { pr_warn("Creation of test application failed!\n"); return -ENOMEM; } @@ -251,7 +252,7 @@ int mali_kutf_irq_test_main_init(void) 1, mali_kutf_irq_default_create_fixture, mali_kutf_irq_default_remove_fixture); - if (NULL == suite) { + if (suite == NULL) { pr_warn("Creation of test suite failed!\n"); kutf_destroy_application(irq_app); return -ENOMEM; |