From 0f7191e8ad073f4876826ca9f045fb7430fb9000 Mon Sep 17 00:00:00 2001 From: Ian Lepore Date: Tue, 5 Nov 2013 05:01:46 +0000 Subject: [PATCH] Style and comment tweaks, no functional changes. --- sys/arm/arm/devmap.c | 7 ++++--- sys/arm/include/devmap.h | 14 +++++++------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/arm/arm/devmap.c b/sys/arm/arm/devmap.c index b7d52a3e146..42e12980738 100644 --- a/sys/arm/arm/devmap.c +++ b/sys/arm/arm/devmap.c @@ -62,7 +62,7 @@ vm_offset_t arm_devmap_lastaddr() { const struct arm_devmap_entry *pd; - vm_offset_t lowaddr = ARM_VECTORS_HIGH; + vm_offset_t lowaddr; if (akva_devmap_idx > 0) return (akva_devmap_vaddr); @@ -70,6 +70,7 @@ arm_devmap_lastaddr() if (devmap_table == NULL) panic("arm_devmap_lastaddr(): No devmap table registered."); + lowaddr = ARM_VECTORS_HIGH; for (pd = devmap_table; pd->pd_size != 0; ++pd) { if (lowaddr > pd->pd_va) lowaddr = pd->pd_va; @@ -95,7 +96,7 @@ arm_devmap_add_entry(vm_paddr_t pa, vm_size_t sz) panic("arm_devmap_add_entry() after arm_devmap_bootstrap()"); if (akva_devmap_idx == (AKVA_DEVMAP_MAX_ENTRIES - 1)) - panic("AKVA_DEVMAP_MAX_ENTRIES is too small!\n"); + panic("AKVA_DEVMAP_MAX_ENTRIES is too small"); if (akva_devmap_idx == 0) arm_devmap_register_table(akva_devmap_entries); @@ -152,7 +153,7 @@ arm_devmap_bootstrap(vm_offset_t l1pt, const struct arm_devmap_entry *table) if (table != NULL) devmap_table = table; else if (devmap_table == NULL) - panic("arm_devmap_bootstrap(): No devmap table registered."); + panic("arm_devmap_bootstrap(): No devmap table registered"); for (pd = devmap_table; pd->pd_size != 0; ++pd) { pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size, diff --git a/sys/arm/include/devmap.h b/sys/arm/include/devmap.h index 47240d934d1..028f40d7af1 100644 --- a/sys/arm/include/devmap.h +++ b/sys/arm/include/devmap.h @@ -42,18 +42,18 @@ struct arm_devmap_entry { }; /* - * Returns the lowest KVA address used in any entry in the registered devmap + * Return the lowest KVA address used in any entry in the registered devmap * table. This works with whatever table is registered, including the internal - * table used by arm_devmap_add_entry() if that routinue was used. Platforms can + * table used by arm_devmap_add_entry() if that routine was used. Platforms can * implement initarm_lastaddr() by calling this if static device mappings are * their only use of high KVA space. */ vm_offset_t arm_devmap_lastaddr(void); /* - * Routine to automatically allocate KVA (from the top of the address space - * downwards) and make static device mapping entries in an internal table. The - * internal table is automatically registered on the first call to this. + * Automatically allocate KVA (from the top of the address space downwards) and + * make static device mapping entries in an internal table. The internal table + * is automatically registered on the first call to this. */ void arm_devmap_add_entry(vm_paddr_t pa, vm_size_t sz); @@ -74,8 +74,8 @@ void arm_devmap_bootstrap(vm_offset_t _l1pt, const struct arm_devmap_entry *_table); /* - * Routines to translate between virtual and physical addresses within a region - * that is static-mapped by the devmap code. If the given address range isn't + * Translate between virtual and physical addresses within a region that is + * static-mapped by the devmap code. If the given address range isn't * static-mapped, then ptov returns NULL and vtop returns DEVMAP_PADDR_NOTFOUND. * The latter implies that you can't vtop just the last byte of physical address * space. This is not as limiting as it might sound, because even if a device