mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: Disable logging for safety build
This patch adds a conditional flag to filter out logging functions from safety release build. Logging functions are replaced with stubs. Jira NVGPU-869 Change-Id: If898b9ce8edb260727df28b407df83f0a92f61ad Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2109509 Reviewed-by: Alex Waterman <alexw@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d8b2e22de9
commit
6f37ac5de2
@@ -131,6 +131,7 @@
|
||||
* Caps return at the size of the buffer not what would have been written if buf
|
||||
* were arbitrarily sized.
|
||||
*/
|
||||
#ifdef CONFIG_NVGPU_LOGGING
|
||||
static inline int scnprintf(char *buf, size_t size, const char *format, ...)
|
||||
{
|
||||
size_t ret;
|
||||
@@ -142,6 +143,12 @@ static inline int scnprintf(char *buf, size_t size, const char *format, ...)
|
||||
|
||||
return ret <= size ? (int)ret : (int)size;
|
||||
}
|
||||
#else
|
||||
static inline int scnprintf(char *buf, size_t size, const char *format, ...)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static inline u32 be32_to_cpu(u32 x)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user