Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1375671 > unrolled thread
| Started by | Vaishali Thakkar <vaishali.thakkar@oracle.com> |
|---|---|
| First post | 2016-04-11 12:40 +0200 |
| Last post | 2016-04-11 21:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] net: fjes: Use resource_size Vaishali Thakkar <vaishali.thakkar@oracle.com> - 2016-04-11 12:40 +0200
Re: [PATCH] net: fjes: Use resource_size David Miller <davem@davemloft.net> - 2016-04-11 21:10 +0200
| From | Vaishali Thakkar <vaishali.thakkar@oracle.com> |
|---|---|
| Date | 2016-04-11 12:40 +0200 |
| Subject | [PATCH] net: fjes: Use resource_size |
| Message-ID | <rmHqa-4eH-9@gated-at.bofh.it> |
Use the function resource_size instead of explicit computation. Problem found using Coccinelle. Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> --- drivers/net/fjes/fjes_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c index 0ddb54f..061b4af 100644 --- 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 = resource_size(res); hw->hw_res.irq = platform_get_irq(plat_dev, 0); err = fjes_hw_init(&adapter->hw); if (err) -- 2.1.4
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-04-11 21:10 +0200 |
| Message-ID | <rmPnI-2oc-13@gated-at.bofh.it> |
| In reply to | #1375671 |
From: Vaishali Thakkar <vaishali.thakkar@oracle.com> Date: Mon, 11 Apr 2016 15:58:17 +0530 > Use the function resource_size instead of explicit computation. > > Problem found using Coccinelle. > > Signed-off-by: Vaishali Thakkar <vaishali.thakkar@oracle.com> Applied.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web