Skip to content

Commit 3c0f13b

Browse files
thomasmeyRichard Kuo
authored andcommitted
Hexagon: Use resource_size function
Use resource_size function on resource object instead of explicit computation. The semantic patch that makes this change is available in scripts/coccinelle/api/resource_size.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
1 parent f6a26ae commit 3c0f13b

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎arch/hexagon/kernel/time.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,10 @@ void __init time_init_deferred(void)
201201
resource = rtos_timer_device.resource;
202202

203203
/* ioremap here means this has to run later, after paging init */
204-
rtos_timer = ioremap(resource->start, resource->end
205-
- resource->start + 1);
204+
rtos_timer = ioremap(resource->start, resource_size(resource));
206205

207206
if (!rtos_timer) {
208-
release_mem_region(resource->start, resource->end
209-
- resource->start + 1);
207+
release_mem_region(resource->start, resource_size(resource));
210208
}
211209
clocksource_register_khz(&hexagon_clocksource, pcycle_freq_mhz * 1000);
212210

0 commit comments

Comments
 (0)