Skip to contentSkip to conversation

fpga: small fixes for 4.19

PATCH New Alan Tull 1 participant 3 messages Aug 16, 2018

Subsystems (2)
lore
Share & tools
lore

Alan Tull

author
#0 lore raw

cover fpga: small fixes for 4.19

Hi Greg,

Please take these two small fixes for FPGA. They've been reviewed on the mailing lists. They apply cleanly on linux-next/master.

Thanks,
Alan

Colin Ian King (1):
drivers: fpga: fix two trivial spelling mistakes

Wei Yongjun (1):
fpga: dfl: fme: fix return value check in in pr_mgmt_init()

 drivers/fpga/dfl-afu-dma-region.c | 2 +-
 drivers/fpga/dfl-fme-mgr.c        | 2 +-
 drivers/fpga/dfl-fme-pr.c         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
author
#1 lore raw

PATCH 1/2 fpga: dfl: fme: fix return value check in in pr_mgmt_init()

From: Wei Yongjun <[email protected]>

In case of error, the function dfl_fme_create_region() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR().

Fixes 29de76240e86 ("fpga: dfl: fme: add partial reconfiguration sub feature support")
---
 drivers/fpga/dfl-fme-pr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/dfl-fme-pr.c +1 -1
index fc9fd2d..0b84053 100644
@@ -420,7 +420,7 @@ static int pr_mgmt_init(struct platform_device *pdev,
 		/* Create region for each port */
 		fme_region = dfl_fme_create_region(pdata, mgr,
 						   fme_br->br, i);
-		if (!fme_region) {
+		if (IS_ERR(fme_region)) {
 			ret = PTR_ERR(fme_region);
 			goto destroy_region;
 		}
Signature · 1 line
2.7.4
author
#2 lore raw

PATCH 2/2 drivers: fpga: fix two trivial spelling mistakes

In reply to Alan Tull

From: Colin Ian King <[email protected]>

Trivial fix to two spelling mistakes
"execeeded" -> "exceeded"
"Invaild" -> "Invalid"

---
 drivers/fpga/dfl-afu-dma-region.c | 2 +-
 drivers/fpga/dfl-fme-mgr.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/fpga/dfl-afu-dma-region.c +1 -1
index 0e81d33..025aba3 100644
@@ -70,7 +70,7 @@ static int afu_dma_adjust_locked_vm(struct device *dev, long npages, bool incr)
 	dev_dbg(dev, "[%d] RLIMIT_MEMLOCK %c%ld %ld/%ld%s\n", current->pid,
 		incr ? '+' : '-', npages << PAGE_SHIFT,
 		current->mm->locked_vm << PAGE_SHIFT, rlimit(RLIMIT_MEMLOCK),
-		ret ? "- execeeded" : "");
+		ret ? "- exceeded" : "");
 
 	up_write(&current->mm->mmap_sem);
 
drivers/fpga/dfl-fme-mgr.c +1 -1
index b5ef405..9f045d0 100644
@@ -201,7 +201,7 @@ static int fme_mgr_write(struct fpga_manager *mgr,
 		}
 
 		if (count < 4) {
-			dev_err(dev, "Invaild PR bitstream size\n");
+			dev_err(dev, "Invalid PR bitstream size\n");
 			return -EINVAL;
 		}
 
Signature · 1 line
2.7.4