staging: sm750fb: clean-up `else`-blocks
PATCH 1/1 staging: sm750fb: clean-up `else`-blocks
Clean-up else-blocks in hw_sm750_map that occur after if-blocks that terminate function execution.
Signed-off-by Eric Florin <[email protected]>
--- drivers/staging/sm750fb/sm750_hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/staging/sm750fb/sm750_hw.c +2 -4
@@ -55,9 +55,8 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)pr_err ("mmio failed\n" ); ret = -EFAULT ; goto exit; - }else { -pr_info ("mmio virtual addr = %p\n" , sm750_dev->pvReg); } +pr_info ("mmio virtual addr = %p\n" , sm750_dev->pvReg); sm750_dev->accel.dprBase = sm750_dev->pvReg +DE_BASE_ADDR_TYPE1 ; sm750_dev->accel.dpPortBase = sm750_dev->pvReg +DE_PORT_ADDR_TYPE1 ;
@@ -84,9 +83,8 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)pr_err ("Map video memory failed\n" ); ret = -EFAULT ; goto exit; - }else { -pr_info ("video memory vaddr = %p\n" , sm750_dev->pvMem); } +pr_info ("video memory vaddr = %p\n" , sm750_dev->pvMem); exit:return ret; }
Signature · 1 line
2.39.5
Greg KH
maintainerQuoted 13 lines · Eric Florin
Clean-up
else-blocks inhw_sm750_mapthat occur afterif-blocks that terminate function execution.Signed-off-by Eric Florin <[email protected]>--- drivers/staging/sm750fb/sm750_hw.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/staging/sm750fb/sm750_hw.c +0
-0
drivers/staging/sm750fb/sm750_hw.c int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev) · line 59
Quoted 7 lines
drivers/staging/sm750fb/sm750_hw.c +1
-2@@ -55,9 +55,8 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)pr_err ("mmio failed\n" ); ret = -EFAULT ; goto exit; - }else { -pr_info ("mmio virtual addr = %p\n" , sm750_dev->pvReg); } +pr_info ("mmio virtual addr = %p\n" , sm750_dev->pvReg);
When drivers work properly, they are "quiet". This driver is not quiet at all. So this really should be a call to dev_dbg(), right?
drivers/staging/sm750fb/sm750_hw.c int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev) · line 87
Quoted 11 lines
drivers/staging/sm750fb/sm750_hw.c +1
-2sm750_dev->accel.dprBase = sm750_dev->pvReg +DE_BASE_ADDR_TYPE1 ; sm750_dev->accel.dpPortBase = sm750_dev->pvReg +DE_PORT_ADDR_TYPE1 ;@@ -84,9 +83,8 @@ int hw_sm750_map(struct sm750_dev *sm750_dev, struct pci_dev *pdev)pr_err ("Map video memory failed\n" ); ret = -EFAULT ; goto exit; - }else { -pr_info ("video memory vaddr = %p\n" , sm750_dev->pvMem); } +pr_info ("video memory vaddr = %p\n" , sm750_dev->pvMem);
Same here.
thanks,
greg k-h