Blob Blame History Raw
From: Enzo Matsumiya <ematsumiya@suse.de>
Patch-mainline: Never, kabi fix
Subject: kabi: fix nvme_wait_freeze_timeout() return type
References: bsc#1181161

Use previous return type (void) for nvme_wait_freeze_timeout()
when __GENKSYMS__ is set. Otherwise use the new one (int).

This is related to the changes introduced in patch
patches.suse/nvme-have-nvme_wait_freeze_timeout-return-if-it-time.patch

--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3882,7 +3882,12 @@ void nvme_unfreeze(struct nvme_ctrl *ctr
 }
 EXPORT_SYMBOL_GPL(nvme_unfreeze);
 
-int nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl, long timeout)
+#ifdef __GENKSYMS__
+void /* previous return type, cf. commit 7cf0d7c0f3c */
+#else
+int
+#endif
+nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl, long timeout)
 {
 	struct nvme_ns *ns;
 
@@ -3893,7 +3898,9 @@ int nvme_wait_freeze_timeout(struct nvme
 			break;
 	}
 	up_read(&ctrl->namespaces_rwsem);
+#ifndef __GENKSYMS__
 	return timeout;
+#endif
 }
 EXPORT_SYMBOL_GPL(nvme_wait_freeze_timeout);
 
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -461,7 +461,11 @@ void nvme_sync_queues(struct nvme_ctrl *
 void nvme_sync_io_queues(struct nvme_ctrl *ctrl);
 void nvme_unfreeze(struct nvme_ctrl *ctrl);
 void nvme_wait_freeze(struct nvme_ctrl *ctrl);
+#ifdef __GENKSYMS__
+void nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl, long timeout);
+#else
 int nvme_wait_freeze_timeout(struct nvme_ctrl *ctrl, long timeout);
+#endif
 void nvme_start_freeze(struct nvme_ctrl *ctrl);
 
 #define NVME_QID_ANY -1