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/sparc64/src/drivers/kbd.c

    r3061bc1 ra35b458  
    6262{
    6363        const char *name = ofw_tree_node_name(node);
    64        
     64
    6565        if (str_cmp(name, "su") != 0)
    6666                return false;
    67        
     67
    6868        /*
    6969         * Read 'interrupts' property.
     
    7575                return false;
    7676        }
    77        
     77
    7878        uint32_t interrupts = *((uint32_t *) prop->value);
    79        
     79
    8080        /*
    8181         * Read 'reg' property.
     
    8787                return false;
    8888        }
    89        
     89
    9090        size_t size = ((ofw_ebus_reg_t *) prop->value)->size;
    91        
     91
    9292        uintptr_t pa = 0; // Prevent -Werror=maybe-uninitialized
    9393        if (!ofw_ebus_apply_ranges(node->parent,
     
    9797                return false;
    9898        }
    99        
     99
    100100        inr_t inr;
    101101        cir_t cir;
     
    108108                return false;
    109109        }
    110        
     110
    111111        /*
    112112         * We need to pass aligned address to hw_map().
     
    117117        uintptr_t aligned_addr = ALIGN_DOWN(pa, PAGE_SIZE);
    118118        size_t offset = pa - aligned_addr;
    119        
     119
    120120        ioport8_t *ns16550 = (ioport8_t *) (km_map(aligned_addr, offset + size,
    121121            PAGE_WRITE | PAGE_NOT_CACHEABLE) + offset);
    122        
     122
    123123        ns16550_instance_t *ns16550_instance = ns16550_init(ns16550, 0, inr, cir,
    124124            cir_arg, NULL);
     
    131131                }
    132132        }
    133        
     133
    134134        /*
    135135         * This is the necessary evil until the userspace drivers are
     
    140140        sysinfo_set_item_val("kbd.address.physical", NULL, pa);
    141141        sysinfo_set_item_val("kbd.type.ns16550", NULL, true);
    142        
     142
    143143        return true;
    144144}
Note: See TracChangeset for help on using the changeset viewer.