Changeset a35b458 in mainline for kernel/genarch/src/ddi/ddi-bitmap.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/genarch/src/ddi/ddi-bitmap.c

    r3061bc1 ra35b458  
    6262        if (elements > IO_PORTS)
    6363                return ENOENT;
    64        
     64
    6565        if (task->arch.iomap.elements < elements) {
    6666                /*
    6767                 * The I/O permission bitmap is too small and needs to be grown.
    6868                 */
    69                
     69
    7070                void *store = malloc(bitmap_size(elements), FRAME_ATOMIC);
    7171                if (!store)
    7272                        return ENOMEM;
    73                
     73
    7474                bitmap_t oldiomap;
    7575                bitmap_initialize(&oldiomap, task->arch.iomap.elements,
    7676                    task->arch.iomap.bits);
    77                
     77
    7878                bitmap_initialize(&task->arch.iomap, elements, store);
    79                
     79
    8080                /*
    8181                 * Mark the new range inaccessible.
     
    8383                bitmap_set_range(&task->arch.iomap, oldiomap.elements,
    8484                    elements - oldiomap.elements);
    85                
     85
    8686                /*
    8787                 * In case there really existed smaller iomap,
     
    9191                        bitmap_copy(&task->arch.iomap, &oldiomap,
    9292                            oldiomap.elements);
    93                        
     93
    9494                        free(oldiomap.bits);
    9595                }
    9696        }
    97        
     97
    9898        /*
    9999         * Enable the range and we are done.
    100100         */
    101101        bitmap_clear_range(&task->arch.iomap, (size_t) ioaddr, size);
    102        
     102
    103103        /*
    104104         * Increment I/O Permission bitmap generation counter.
    105105         */
    106106        task->arch.iomapver++;
    107        
     107
    108108        return EOK;
    109109}
     
    125125        if (elements > IO_PORTS)
    126126                return ENOENT;
    127        
     127
    128128        if (ioaddr >= task->arch.iomap.elements)
    129129                return EINVAL;
     
    136136         */
    137137        bitmap_set_range(&task->arch.iomap, (size_t) ioaddr, size);
    138        
     138
    139139        /*
    140140         * Increment I/O Permission bitmap generation counter.
    141141         */
    142142        task->arch.iomapver++;
    143        
     143
    144144        return 0;
    145145}
Note: See TracChangeset for help on using the changeset viewer.