From f548671497b2df180c7b661c5dd1de3ae01b974e Mon Sep 17 00:00:00 2001
From: ssangani-xlnx <63835134+ssangani-xlnx@users.noreply.github.com>
Date: Thu, 14 Jul 2022 15:21:13 +0530
Subject: [PATCH] 2022.1.3 Patch: Ported changes from pull request
 https://github.com/Xilinx/dma_ip_drivers/pull/170 to fix coverity issues

2022.1.3 Patch: Ported changes from pull request https://github.com/Xilinx/dma_ip_drivers/pull/170 to fix coverity issues
---
 QDMA/linux-kernel/RELEASE                                   | 6 +++++-
 .../qdma_access/eqdma_cpm5_access/eqdma_cpm5_access.c       | 4 ++--
 .../driver/libqdma/qdma_access/qdma_access_version.h        | 2 +-
 .../libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.c | 4 ++--
 QDMA/linux-kernel/driver/libqdma/version.h                  | 2 +-
 QDMA/linux-kernel/driver/src/version.h                      | 2 +-
 6 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/QDMA/linux-kernel/RELEASE b/QDMA/linux-kernel/RELEASE
index 4608f43..320781c 100644
--- a/QDMA/linux-kernel/RELEASE
+++ b/QDMA/linux-kernel/RELEASE
@@ -1,4 +1,4 @@
-RELEASE: 2022.1.2 Patch 
+RELEASE: 2022.1.3 Patch
 =======================
 
 This release is validated for
@@ -112,6 +112,10 @@ CPM5
 ----------------------
 - Added VF 4K queues support for CPM5 design. This feature is applicable only when corresponding RTL support is added.
 
+2022.1.3 Patch Updates
+----------------------
+- Ported changes from pull request https://github.com/Xilinx/dma_ip_drivers/pull/170 to fix coverity issues
+
 KNOWN ISSUES:
 =============
 - CPM5 Only
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_cpm5_access/eqdma_cpm5_access.c b/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_cpm5_access/eqdma_cpm5_access.c
index b53c47a..59fc504 100644
--- a/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_cpm5_access/eqdma_cpm5_access.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/eqdma_cpm5_access/eqdma_cpm5_access.c
@@ -2193,7 +2193,7 @@ static int dump_eqdma_cpm5_context(struct qdma_descq_context *queue_context,
 	int n;
 	int len = 0;
 	int rv;
-	char banner[DEBGFS_LINE_SZ];
+	char banner[DEBGFS_LINE_SZ] = "";
 
 	if (queue_context == NULL) {
 		qdma_log_error("%s: queue_context is NULL, err:%d\n",
@@ -2652,7 +2652,7 @@ static int dump_eqdma_cpm5_intr_context(struct qdma_indirect_intr_ctxt
 	int n;
 	int len = 0;
 	int rv;
-	char banner[DEBGFS_LINE_SZ];
+	char banner[DEBGFS_LINE_SZ] = "";
 
 	eqdma_cpm5_fill_intr_ctxt(intr_ctx);
 
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h
index b3e08f4..8080f2d 100644
--- a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_access_version.h
@@ -20,7 +20,7 @@
 
 #define QDMA_VERSION_MAJOR	2022
 #define QDMA_VERSION_MINOR	1
-#define QDMA_VERSION_PATCH	2
+#define QDMA_VERSION_PATCH	3
 
 #define QDMA_VERSION_STR	\
 	__stringify(QDMA_VERSION_MAJOR) "." \
diff --git a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.c b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.c
index 8f74f59..bf2d7af 100644
--- a/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.c
+++ b/QDMA/linux-kernel/driver/libqdma/qdma_access/qdma_cpm4_access/qdma_cpm4_access.c
@@ -1411,7 +1411,7 @@ static int dump_cpm4_context(struct qdma_descq_context *queue_context,
 	int n;
 	int len = 0;
 	int rv;
-	char banner[DEBGFS_LINE_SZ];
+	char banner[DEBGFS_LINE_SZ] = "";
 
 	if (queue_context == NULL) {
 		qdma_log_error("%s: queue_context is NULL, err:%d\n",
@@ -1925,7 +1925,7 @@ static int dump_cpm4_intr_context(struct qdma_indirect_intr_ctxt *intr_ctx,
 	int n;
 	int len = 0;
 	int rv;
-	char banner[DEBGFS_LINE_SZ];
+	char banner[DEBGFS_LINE_SZ] = "";
 
 	qdma_cpm4_fill_intr_ctxt(intr_ctx);
 
diff --git a/QDMA/linux-kernel/driver/libqdma/version.h b/QDMA/linux-kernel/driver/libqdma/version.h
index f3bd7cd..b84755b 100644
--- a/QDMA/linux-kernel/driver/libqdma/version.h
+++ b/QDMA/linux-kernel/driver/libqdma/version.h
@@ -25,7 +25,7 @@
 
 #define LIBQDMA_VERSION_MAJOR	2022
 #define LIBQDMA_VERSION_MINOR	1
-#define LIBQDMA_VERSION_PATCH	2
+#define LIBQDMA_VERSION_PATCH	3
 
 #define LIBQDMA_VERSION_STR	\
 	__stringify(LIBQDMA_VERSION_MAJOR) "." \
diff --git a/QDMA/linux-kernel/driver/src/version.h b/QDMA/linux-kernel/driver/src/version.h
index 1fb421b..e9f4076 100644
--- a/QDMA/linux-kernel/driver/src/version.h
+++ b/QDMA/linux-kernel/driver/src/version.h
@@ -33,7 +33,7 @@
 
 #define DRV_MOD_MAJOR		2022
 #define DRV_MOD_MINOR		1
-#define DRV_MOD_PATCHLEVEL	2
+#define DRV_MOD_PATCHLEVEL	3
 
 #define DRV_MODULE_VERSION      \
 	__stringify(DRV_MOD_MAJOR) "." \
-- 
GitLab