Changeset a35b458 in mainline for uspace/drv/platform/sun4u/sun4u.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
  • uspace/drv/platform/sun4u/sun4u.c

    r3061bc1 ra35b458  
    154154{
    155155        sun4u_fun_t *fun = sun4u_fun(fnode);
    156        
     156
    157157        assert(fun != NULL);
    158158        return &fun->hw_resources;
     
    162162{
    163163        /* TODO */
    164        
     164
    165165        return false;
    166166}
     
    191191{
    192192        ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name);
    193        
     193
    194194        ddf_fun_t *fnode = NULL;
    195195        errno_t rc;
    196        
     196
    197197        /* Create new device. */
    198198        fnode = ddf_fun_create(dev, fun_inner, name);
    199199        if (fnode == NULL)
    200200                goto failure;
    201        
     201
    202202        sun4u_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(sun4u_fun_t));
    203203        *fun = *fun_proto;
    204        
     204
    205205        /* Add match ID */
    206206        rc = ddf_fun_add_match_id(fnode, str_match_id, 100);
    207207        if (rc != EOK)
    208208                goto failure;
    209        
     209
    210210        /* Set provided operations to the device. */
    211211        ddf_fun_set_ops(fnode, &sun4u_fun_ops);
    212        
     212
    213213        /* Register function. */
    214214        if (ddf_fun_bind(fnode) != EOK) {
     
    216216                goto failure;
    217217        }
    218        
     218
    219219        return true;
    220        
     220
    221221failure:
    222222        if (fnode != NULL)
    223223                ddf_fun_destroy(fnode);
    224        
     224
    225225        ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name);
    226        
     226
    227227        return false;
    228228}
     
    251251                ddf_msg(LVL_ERROR, "Failed to add functions for the Malta platform.");
    252252        }
    253        
     253
    254254        return EOK;
    255255}
Note: See TracChangeset for help on using the changeset viewer.