dmaengine: idxd: match type for retries var in idxd_enqcmds()
authorDave Jiang <dave.jiang@intel.com>
Mon, 18 Apr 2022 21:31:10 +0000 (14:31 -0700)
committerVinod Koul <vkoul@kernel.org>
Wed, 20 Apr 2022 11:54:42 +0000 (17:24 +0530)
wq->enqcmds_retries is defined as unsigned int. However, retries on the
stack is defined as int. Change retries to unsigned int to compare the same
type.

Fixes: 7930d8553575 ("dmaengine: idxd: add knob for enqcmds retries")
Suggested-by: Thiago Macieira <thiago.macieira@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/165031747059.3658198.6035308204505664375.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/submit.c

index e289fd48711adae53f3e6d8460b7a8ddcde917f2..554b0602d2e98c79d69fddf243f0793eed33602a 100644 (file)
@@ -150,7 +150,8 @@ static void llist_abort_desc(struct idxd_wq *wq, struct idxd_irq_entry *ie,
  */
 int idxd_enqcmds(struct idxd_wq *wq, void __iomem *portal, const void *desc)
 {
-       int rc, retries = 0;
+       unsigned int retries = 0;
+       int rc;
 
        do {
                rc = enqcmds(portal, desc);