From 1639db51b24619ee956d47f230e53e4af8d8d787 Mon Sep 17 00:00:00 2001 From: ajesh Date: Mon, 6 May 2019 14:53:10 +0530 Subject: [PATCH] gpu: nvgpu: fix MISRA violation in os_sched unit MISRA rule 21.2 forbids the usage of identifier names which start with an underscore. Fix violation of MISRA rule 21.2 in os_sched unit. Jira NVGPU-3139 Change-Id: Ic64a2590bb180b7ae9481daca5f7720dc2dc8719 Signed-off-by: ajesh Reviewed-on: https://git-master.nvidia.com/r/2112747 Reviewed-by: svc-mobile-coverity Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Dinesh T Reviewed-by: Philip Elcan Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/include/nvgpu/os_sched.h | 6 +++--- drivers/gpu/nvgpu/os/linux/os_sched.c | 4 ++-- drivers/gpu/nvgpu/os/posix/os_sched.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/nvgpu/include/nvgpu/os_sched.h b/drivers/gpu/nvgpu/include/nvgpu/os_sched.h index c8843b1ba..b59cd92d6 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/os_sched.h +++ b/drivers/gpu/nvgpu/include/nvgpu/os_sched.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -39,13 +39,13 @@ int nvgpu_current_tid(struct gk20a *g); */ int nvgpu_current_pid(struct gk20a *g); -void __nvgpu_print_current(struct gk20a *g, const char *func_name, int line, +void nvgpu_print_current_impl(struct gk20a *g, const char *func_name, int line, void *ctx, enum nvgpu_log_type type); /** * nvgpu_print_current - print the name of current calling process * */ #define nvgpu_print_current(g, ctx, type) \ - __nvgpu_print_current(g, __func__, __LINE__, ctx, type) + nvgpu_print_current_impl(g, __func__, __LINE__, ctx, type) #endif /* NVGPU_OS_SCHED_H */ diff --git a/drivers/gpu/nvgpu/os/linux/os_sched.c b/drivers/gpu/nvgpu/os/linux/os_sched.c index 9a25da18f..00b4bf324 100644 --- a/drivers/gpu/nvgpu/os/linux/os_sched.c +++ b/drivers/gpu/nvgpu/os/linux/os_sched.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -25,7 +25,7 @@ int nvgpu_current_pid(struct gk20a *g) return current->tgid; } -void __nvgpu_print_current(struct gk20a *g, const char *func_name, int line, +void nvgpu_print_current_impl(struct gk20a *g, const char *func_name, int line, void *ctx, enum nvgpu_log_type type) { __nvgpu_log_msg(g, func_name, line, type, current->comm); diff --git a/drivers/gpu/nvgpu/os/posix/os_sched.c b/drivers/gpu/nvgpu/os/posix/os_sched.c index 034afb20a..4055c2101 100644 --- a/drivers/gpu/nvgpu/os/posix/os_sched.c +++ b/drivers/gpu/nvgpu/os/posix/os_sched.c @@ -45,7 +45,7 @@ int nvgpu_current_tid(struct gk20a *g) return (int)pthread_self(); } -void __nvgpu_print_current(struct gk20a *g, const char *func_name, int line, +void nvgpu_print_current_impl(struct gk20a *g, const char *func_name, int line, void *ctx, enum nvgpu_log_type type) { char current_tname[CURRENT_NAME_LEN];