Changeset a35b458 in mainline for kernel/arch/ia32/src/ddi/ddi.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/arch/ia32/src/ddi/ddi.c

    r3061bc1 ra35b458  
    5959        /* First, copy the I/O Permission Bitmap. */
    6060        irq_spinlock_lock(&TASK->lock, false);
    61        
     61
    6262        size_t ver = TASK->arch.iomapver;
    6363        size_t elements = TASK->arch.iomap.elements;
    64        
     64
    6565        if (elements > 0) {
    6666                assert(TASK->arch.iomap.bits);
    67                
     67
    6868                bitmap_t iomap;
    6969                bitmap_initialize(&iomap, TSS_IOMAP_SIZE * 8,
    7070                    CPU->arch.tss->iomap);
    7171                bitmap_copy(&iomap, &TASK->arch.iomap, elements);
    72                
     72
    7373                /*
    7474                 * Set the trailing bits in the last byte of the map to disable
     
    7777                bitmap_set_range(&iomap, elements,
    7878                    ALIGN_UP(elements, 8) - elements);
    79                
     79
    8080                /*
    8181                 * It is safe to set the trailing eight bits because of the
     
    8484                bitmap_set_range(&iomap, ALIGN_UP(elements, 8), 8);
    8585        }
    86        
     86
    8787        irq_spinlock_unlock(&TASK->lock, false);
    88        
     88
    8989        /*
    9090         * Second, adjust TSS segment limit.
     
    9393        ptr_16_32_t cpugdtr;
    9494        gdtr_store(&cpugdtr);
    95        
     95
    9696        descriptor_t *gdt_p = (descriptor_t *) cpugdtr.base;
    9797        size_t size = bitmap_size(elements);
    9898        gdt_setlimit(&gdt_p[TSS_DES], TSS_BASIC_SIZE + size);
    9999        gdtr_load(&cpugdtr);
    100        
     100
    101101        /*
    102102         * Before we load new TSS limit, the current TSS descriptor
     
    105105        gdt_p[TSS_DES].access = AR_PRESENT | AR_TSS | DPL_KERNEL;
    106106        tr_load(GDT_SELECTOR(TSS_DES));
    107        
     107
    108108        /*
    109109         * Update the generation count so that faults caused by
Note: See TracChangeset for help on using the changeset viewer.