OSDN Git Service
(root)
/
android-x86
/
kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3484f44
)
net: fjes: Use resource_size
author
Vaishali Thakkar
<vaishali.thakkar@oracle.com>
Mon, 11 Apr 2016 10:28:17 +0000
(15:58 +0530)
committer
David S. Miller
<davem@davemloft.net>
Mon, 11 Apr 2016 19:00:04 +0000
(15:00 -0400)
Use the function resource_size instead of explicit computation.
Problem found using Coccinelle.
Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fjes/fjes_main.c
patch
|
blob
|
history
diff --git
a/drivers/net/fjes/fjes_main.c
b/drivers/net/fjes/fjes_main.c
index
0ddb54f
..
061b4af
100644
(file)
--- a/
drivers/net/fjes/fjes_main.c
+++ b/
drivers/net/fjes/fjes_main.c
@@
-1129,7
+1129,7
@@
static int fjes_probe(struct platform_device *plat_dev)
res = platform_get_resource(plat_dev, IORESOURCE_MEM, 0);
hw->hw_res.start = res->start;
- hw->hw_res.size = res
->end - res->start + 1
;
+ hw->hw_res.size = res
ource_size(res)
;
hw->hw_res.irq = platform_get_irq(plat_dev, 0);
err = fjes_hw_init(&adapter->hw);
if (err)