platform: tegra: cvnas: Fix function declarations

Sparse generates the following warnings for the CVNAS driver ...

 drivers/platform/tegra/cvnas/cvnas.c:126:5: warning: symbol
 	'nvcvnas_busy' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:138:5: warning: symbol
 	'nvcvnas_idle' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:444:13: warning: symbol
 	'nvcvnas_get_cvsram_base' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:456:8: warning: symbol
 	'nvcvnas_get_cvsram_size' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:468:5: warning: symbol
 	'is_nvcvnas_probed' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:476:5: warning: symbol
 	'is_nvcvnas_clk_enabled' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:779:5: warning: symbol
 	'nvcvnas_busy_no_rpm' was not declared. Should it be static?
 drivers/platform/tegra/cvnas/cvnas.c:793:5: warning: symbol
 	'nvcvnas_idle_no_rpm' was not declared. Should it be static?

There are a few problems here which are:
1. The CVNAS driver does not include the 'cvnas.h' header file and so
   some of the declarations are not found.
2. Some of the CVNAS functions are not declared in the 'cvnas.h' header
   file and need to be added.
3. The Tegra19x CBB driver is a user of these CVNAS functions, but
   instead of including the 'cvnas.h' file it defines prototypes for
   these functions. This is not necessary and so we can remove these
   prototypes and simply include the 'cvnas.h' header file.
4. The function definition nvcvnas_idle_no_rpm() in the CVNAS driver is
   incorrect and this function should not have any arguments passed to
   it and currently does not match the prototype.

Bug 3528414

Change-Id: I7945f8c66ceb5ca5b158b7ed1b81a50f19c52bb7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2670149
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This commit is contained in:
Jon Hunter
2022-02-15 10:12:32 +00:00
committed by Laxman Dewangan
parent 2f44df7fa3
commit c920508259
2 changed files with 9 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
*
* Tegra cvnas driver
*
* Copyright (c) 2018, NVIDIA Corporation. All rights reserved.
* Copyright (c) 2018-2022, NVIDIA Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,9 +20,15 @@
#ifndef __LINUX_CVNAS_H
#define __LINUX_CVNAS_H
#include <linux/types.h>
int nvcvnas_busy(void);
int nvcvnas_busy_no_rpm(void);
int nvcvnas_idle(void);
int nvcvnas_idle_no_rpm(void);
int is_nvcvnas_probed(void);
phys_addr_t nvcvnas_get_cvsram_base(void);
size_t nvcvnas_get_cvsram_size(void);
int is_nvcvnas_clk_enabled(void);
#endif