Changeset a35b458 in mainline for uspace/drv/fb


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.

Location:
uspace/drv/fb
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/fb/amdm37x_dispc/amdm37x_dispc.c

    r3061bc1 ra35b458  
    284284        if (dispc->fb_data)
    285285                dmamem_unmap_anonymous(dispc->fb_data);
    286        
     286
    287287        dispc->fb_data = buffer;
    288288        amdm37x_dispc_setup_fb(dispc->regs, x, y, bpp *8, (uint32_t)pa);
  • uspace/drv/fb/kfb/port.c

    r3061bc1 ra35b458  
    7272        size_t scanline;
    7373        visual_t visual;
    74        
     74
    7575        pixel2visual_t pixel2visual;
    7676        visual2pixel_t visual2pixel;
    7777        visual_mask_t visual_mask;
    7878        size_t pixel_bytes;
    79        
     79
    8080        size_t size;
    8181        uint8_t *addr;
     
    186186        if (!present)
    187187                return ENOENT;
    188        
     188
    189189        sysarg_t kind;
    190190        rc = sysinfo_get_value("fb.kind", &kind);
    191191        if (rc != EOK)
    192192                kind = (sysarg_t) -1;
    193        
     193
    194194        if (kind != 1)
    195195                return EINVAL;
     
    199199        if (rc != EOK)
    200200                return rc;
    201        
     201
    202202        sysarg_t offset;
    203203        rc = sysinfo_get_value("fb.offset", &offset);
    204204        if (rc != EOK)
    205205                offset = 0;
    206        
     206
    207207        sysarg_t width;
    208208        rc = sysinfo_get_value("fb.width", &width);
    209209        if (rc != EOK)
    210210                return rc;
    211        
     211
    212212        sysarg_t height;
    213213        rc = sysinfo_get_value("fb.height", &height);
    214214        if (rc != EOK)
    215215                return rc;
    216        
     216
    217217        sysarg_t scanline;
    218218        rc = sysinfo_get_value("fb.scanline", &scanline);
    219219        if (rc != EOK)
    220220                return rc;
    221        
     221
    222222        sysarg_t visual;
    223223        rc = sysinfo_get_value("fb.visual", &visual);
    224224        if (rc != EOK)
    225225                return rc;
    226        
     226
    227227        kfb.width = width;
    228228        kfb.height = height;
     
    302302                return EINVAL;
    303303        }
    304        
     304
    305305        kfb.size = scanline * height;
    306306        kfb.addr = AS_AREA_ANY;
    307        
     307
    308308        ddf_fun_t *fun_vs = ddf_fun_create(dev, fun_exposed, "vsl0");
    309309        if (fun_vs == NULL) {
Note: See TracChangeset for help on using the changeset viewer.