Skip to contentSkip to conversation

uacce: fix some coding styles

PATCH In review Kai Ye 4 participants 5 messages Jul 30, 2020 – Sep 11, 2020

Subsystems (2)
lore
Share & tools
lore

Kai Ye

author
#0 lore raw

PATCH 1/1 uacce: fix some coding styles

1. delete some redundant code.
2. modify the module author information.

---
Changes in V2:
deleted extra NULL pointer check in uacce_fops.

 drivers/misc/uacce/uacce.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/misc/uacce/uacce.c +1 -12
index 107028e..1d09707 100644
@@ -239,17 +239,6 @@ static int uacce_fops_mmap(struct file *filep, struct vm_area_struct *vma)
 
 	switch (type) {
 	case UACCE_QFRT_MMIO:
-		if (!uacce->ops->mmap) {
-			ret = -EINVAL;
-			goto out_with_lock;
-		}
-
-		ret = uacce->ops->mmap(q, vma, qfr);
-		if (ret)
-			goto out_with_lock;
-
-		break;
-
 	case UACCE_QFRT_DUS:
 		if (!uacce->ops->mmap) {
 			ret = -EINVAL;
@@ -541,5 +530,5 @@ subsys_initcall(uacce_init);
 module_exit(uacce_exit);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Hisilicon Tech. Co., Ltd.");
+MODULE_AUTHOR("HiSilicon Tech. Co., Ltd.");
 MODULE_DESCRIPTION("Accelerator interface for Userland applications");
Signature · 1 line
2.8.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Kai Ye

1. delete some redundant code.
2. modify the module author information.

Fine to me.

Thanks,
Zhou

Quoted 37 lines

---
Changes in V2:
deleted extra NULL pointer check in uacce_fops.

 drivers/misc/uacce/uacce.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/misc/uacce/uacce.c +1 -12
index 107028e..1d09707 100644
@@ -239,17 +239,6 @@ static int uacce_fops_mmap(struct file *filep, struct vm_area_struct *vma)
 
 	switch (type) {
 	case UACCE_QFRT_MMIO:
-		if (!uacce->ops->mmap) {
-			ret = -EINVAL;
-			goto out_with_lock;
-		}
-
-		ret = uacce->ops->mmap(q, vma, qfr);
-		if (ret)
-			goto out_with_lock;
-
-		break;
-
 	case UACCE_QFRT_DUS:
 		if (!uacce->ops->mmap) {
 			ret = -EINVAL;
@@ -541,5 +530,5 @@ subsys_initcall(uacce_init);
 module_exit(uacce_exit);
 
 MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Hisilicon Tech. Co., Ltd.");
+MODULE_AUTHOR("HiSilicon Tech. Co., Ltd.");
 MODULE_DESCRIPTION("Accelerator interface for Userland applications");
maintainer
#4 lore raw
Quoted 21 lines · yekai(A)

Hi Hartman

Could you help to take this patch?
Thanks.

Quoted 14 lines · Zhangfei Gao
Quoted 4 lines · Kai Ye

1. delete some redundant code.
2. modify the module author information.

Thanks Kai

Thanks

I see no patch here to take, sorry :(