Changeset a35b458 in mainline for kernel/genarch/src/drivers/i8042


Ignore:
Timestamp:
2018-03-02T20:10:49Z (8 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/drivers/i8042/i8042.c

    r3061bc1 ra35b458  
    5959        i8042_instance_t *i8042_instance = irq->instance;
    6060        i8042_t *dev = i8042_instance->i8042;
    61        
     61
    6262        if (pio_read_8(&dev->status) & i8042_BUFFER_FULL_MASK)
    6363                return IRQ_ACCEPT;
     
    7070        i8042_instance_t *instance = irq->instance;
    7171        i8042_t *dev = instance->i8042;
    72        
     72
    7373        if (pio_read_8(&dev->status) & i8042_BUFFER_FULL_MASK) {
    7474                uint8_t data = pio_read_8(&dev->data);
     
    8383                if ((pio_read_8(&dev->status) & i8042_BUFFER_FULL_MASK) == 0)
    8484                        break;
    85                
     85
    8686                (void) pio_read_8(&dev->data);
    8787                delay(50);  /* 50 us think time */
     
    9494                if ((pio_read_8(&dev->status) & i8042_WAIT_MASK) == 0)
    9595                        break;
    96                
     96
    9797                delay(50);  /* 50 us think time */
    9898        }
    99        
     99
    100100        pio_write_8(&dev->status, cmd);
    101101        delay(10000);  /* 10 ms think time */
     
    110110                instance->i8042 = dev;
    111111                instance->kbrdin = NULL;
    112                
     112
    113113                irq_initialize(&instance->irq);
    114114                instance->irq.inr = inr;
     
    117117                instance->irq.instance = instance;
    118118        }
    119        
     119
    120120        return instance;
    121121}
     
    125125        assert(instance);
    126126        assert(kbrdin);
    127        
     127
    128128        i8042_clear_buffer(instance->i8042);
    129        
     129
    130130        instance->kbrdin = kbrdin;
    131131        irq_register(&instance->irq);
Note: See TracChangeset for help on using the changeset viewer.