DCE-KMD: Add helper macro to check non NULL

- This is a follow-up CL to address a comment in
  I885348a09eaac6e4362c89b59880fbd32d77d3b5

- This change will add a  helper macro, DCE_WARN_ON_NOT_NULL(x),
  to print a warning message if the input param is not NULL.
    - Added to dce.h

JIRA TDS-16126

Change-Id: I9b2c4ea89fa1682d18c20f68b14ab7696917f261
Signed-off-by: anupamg <anupamg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3251828
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Arun Swain <arswain@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Mahesh Kumar <mahkumar@nvidia.com>
This commit is contained in:
anupamg
2024-11-18 15:11:50 -08:00
committed by Jon Hunter
parent 46895eb9cd
commit 0becc78306
5 changed files with 17 additions and 20 deletions

View File

@@ -20,6 +20,13 @@
#include <dce-client-ipc-internal.h>
#include <dce-os-work.h>
#define DCE_WARN_ON_NOT_NULL(x) \
do { \
if (x != NULL) { \
dce_os_warn(d, "Unexpected non-NULL value for " #x "\n"); \
} \
} while (0)
#define DCE_MAX_CPU_IRQS 4
/**