From 649ba2a4b3fcbea2135ce4d0d00feb7563b14270 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Fri, 26 Jan 2018 16:31:12 -0800 Subject: gpu: nvgpu: vgpu: remove parameter dn from tegra_hv_mempool_reserve() Device tree node was not used by the function, so remove it to make the function more common. Jira EVLR-2364 Change-Id: I34b143a10c021030a1e94f019081b352f72a51bf Signed-off-by: Richard Zhao Reviewed-on: https://git-master.nvidia.com/r/1647032 Reviewed-by: svc-mobile-coverity Reviewed-by: Aingara Paramakuru Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit Reviewed-by: Nirav Patel Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c | 6 ++---- drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c index fba3cc63..ba13c54e 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2018, 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, @@ -33,7 +33,6 @@ static struct tegra_hv_ivm_cookie *vgpu_css_reserve_mempool(struct gk20a *g) struct device *dev = dev_from_gk20a(g); struct device_node *np = dev->of_node; struct of_phandle_args args; - struct device_node *hv_np; struct tegra_hv_ivm_cookie *cookie; u32 mempool; int err; @@ -45,9 +44,8 @@ static struct tegra_hv_ivm_cookie *vgpu_css_reserve_mempool(struct gk20a *g) return ERR_PTR(err); } - hv_np = args.np; mempool = args.args[0]; - cookie = tegra_hv_mempool_reserve(hv_np, mempool); + cookie = tegra_hv_mempool_reserve(mempool); if (IS_ERR_OR_NULL(cookie)) { nvgpu_err(g, "mempool %u reserve failed", mempool); return ERR_PTR(-EINVAL); diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c index 5344313a..bf692c4d 100644 --- a/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c +++ b/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-2018, 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, @@ -43,7 +43,6 @@ int vgpu_fecs_trace_init(struct gk20a *g) struct device *dev = dev_from_gk20a(g); struct device_node *np = dev->of_node; struct of_phandle_args args; - struct device_node *hv_np; struct vgpu_fecs_trace *vcst; u32 mempool; int err; @@ -62,9 +61,8 @@ int vgpu_fecs_trace_init(struct gk20a *g) } __nvgpu_set_enabled(g, NVGPU_SUPPORT_FECS_CTXSW_TRACE, true); - hv_np = args.np; mempool = args.args[0]; - vcst->cookie = tegra_hv_mempool_reserve(hv_np, mempool); + vcst->cookie = tegra_hv_mempool_reserve(mempool); if (IS_ERR(vcst->cookie)) { dev_info(dev_from_gk20a(g), "mempool %u reserve failed\n", mempool); -- cgit v1.2.2