Changeset 8565a42 in mainline for uspace/drv/platform


Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

Location:
uspace/drv/platform
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/platform/amdm37x/main.c

    r3061bc1 r8565a42  
    176176        if (fnode == NULL)
    177177                return ENOMEM;
    178        
     178
    179179        /* Add match id */
    180180        errno_t ret = ddf_fun_add_match_id(fnode, fun->id, fun->score);
     
    183183                return ret;
    184184        }
    185        
     185
    186186        /* Alloc needed data */
    187187        amdm37x_fun_t *rf =
     
    195195        /* Set provided operations to the device. */
    196196        ddf_fun_set_ops(fnode, &amdm37x_fun_ops);
    197        
     197
    198198        /* Register function. */
    199199        ret = ddf_fun_bind(fnode);
     
    203203                return ret;
    204204        }
    205        
     205
    206206        return EOK;
    207207}
  • uspace/drv/platform/mac/mac.c

    r3061bc1 r8565a42  
    130130        ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name);
    131131        printf("mac: Adding new function '%s'.\n", name);
    132        
     132
    133133        ddf_fun_t *fnode = NULL;
    134134        errno_t rc;
    135        
     135
    136136        /* Create new device. */
    137137        fnode = ddf_fun_create(dev, fun_inner, name);
    138138        if (fnode == NULL)
    139139                goto failure;
    140        
     140
    141141        mac_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(mac_fun_t));
    142142        *fun = *fun_proto;
    143        
     143
    144144        /* Add match ID */
    145145        rc = ddf_fun_add_match_id(fnode, str_match_id, 100);
    146146        if (rc != EOK)
    147147                goto failure;
    148        
     148
    149149        /* Set provided operations to the device. */
    150150        ddf_fun_set_ops(fnode, &mac_fun_ops);
    151        
     151
    152152        /* Register function. */
    153153        if (ddf_fun_bind(fnode) != EOK) {
     
    155155                goto failure;
    156156        }
    157        
     157
    158158        printf("mac: Added new function '%s' (str=%s).\n", name, str_match_id);
    159159        return true;
    160        
     160
    161161failure:
    162162        if (fnode != NULL)
    163163                ddf_fun_destroy(fnode);
    164        
     164
    165165        ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name);
    166        
     166
    167167        return false;
    168168}
     
    223223        mac_fun_t *fun = mac_fun(fnode);
    224224        assert(fun != NULL);
    225        
     225
    226226        return &fun->hw_resources;
    227227}
     
    230230{
    231231        /* TODO */
    232        
     232
    233233        return false;
    234234}
  • uspace/drv/platform/malta/malta.c

    r3061bc1 r8565a42  
    138138{
    139139        malta_fun_t *fun = malta_fun(fnode);
    140        
     140
    141141        assert(fun != NULL);
    142142        return &fun->hw_resources;
     
    146146{
    147147        /* TODO */
    148        
     148
    149149        return false;
    150150}
     
    175175{
    176176        ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name);
    177        
     177
    178178        ddf_fun_t *fnode = NULL;
    179179        errno_t rc;
    180        
     180
    181181        /* Create new device. */
    182182        fnode = ddf_fun_create(dev, fun_inner, name);
    183183        if (fnode == NULL)
    184184                goto failure;
    185        
     185
    186186        malta_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(malta_fun_t));
    187187        *fun = *fun_proto;
    188        
     188
    189189        /* Add match ID */
    190190        rc = ddf_fun_add_match_id(fnode, str_match_id, 100);
    191191        if (rc != EOK)
    192192                goto failure;
    193        
     193
    194194        /* Set provided operations to the device. */
    195195        ddf_fun_set_ops(fnode, &malta_fun_ops);
    196        
     196
    197197        /* Register function. */
    198198        if (ddf_fun_bind(fnode) != EOK) {
     
    200200                goto failure;
    201201        }
    202        
     202
    203203        return true;
    204        
     204
    205205failure:
    206206        if (fnode != NULL)
    207207                ddf_fun_destroy(fnode);
    208        
     208
    209209        ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name);
    210        
     210
    211211        return false;
    212212}
     
    246246            &gt[GT_PCI_CMD / sizeof(ioport32_t)], host2uint32_t_le(val));
    247247
    248        
     248
    249249        /* Register functions. */
    250250        if (!malta_add_functions(dev)) {
    251251                ddf_msg(LVL_ERROR, "Failed to add functions for the Malta platform.");
    252252        }
    253        
     253
    254254        return EOK;
    255255}
  • uspace/drv/platform/msim/msim.c

    r3061bc1 r8565a42  
    147147{
    148148        msim_fun_t *fun = msim_fun(fnode);
    149        
     149
    150150        assert(fun != NULL);
    151151        return &fun->hw_resources;
     
    184184{
    185185        ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name);
    186        
     186
    187187        ddf_fun_t *fnode = NULL;
    188188        errno_t rc;
    189        
     189
    190190        /* Create new device. */
    191191        fnode = ddf_fun_create(dev, fun_inner, name);
    192192        if (fnode == NULL)
    193193                goto failure;
    194        
     194
    195195        msim_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(msim_fun_t));
    196196        if (fun == NULL)
    197197                goto failure;
    198        
     198
    199199        *fun = *fun_proto;
    200        
     200
    201201        /* Add match ID */
    202202        rc = ddf_fun_add_match_id(fnode, str_match_id, 100);
    203203        if (rc != EOK)
    204204                goto failure;
    205        
     205
    206206        /* Set provided operations to the device. */
    207207        ddf_fun_set_ops(fnode, &msim_fun_ops);
    208        
     208
    209209        /* Register function. */
    210210        if (ddf_fun_bind(fnode) != EOK) {
     
    212212                goto failure;
    213213        }
    214        
     214
    215215        return true;
    216        
     216
    217217failure:
    218218        if (fnode != NULL)
    219219                ddf_fun_destroy(fnode);
    220        
     220
    221221        ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name);
    222        
     222
    223223        return false;
    224224}
     
    246246        if (!msim_add_functions(dev))
    247247                ddf_msg(LVL_ERROR, "Failed to add functions for the MSIM platform.");
    248        
     248
    249249        return EOK;
    250250}
  • uspace/drv/platform/pc/pc.c

    r3061bc1 r8565a42  
    120120{
    121121        pc_fun_t *fun = pc_fun(fnode);
    122        
     122
    123123        assert(fun != NULL);
    124124        return &fun->hw_resources;
     
    128128{
    129129        /* TODO */
    130        
     130
    131131        return false;
    132132}
     
    135135{
    136136        pc_fun_t *fun = pc_fun(fnode);
    137        
     137
    138138        assert(fun != NULL);
    139139        return &fun->pio_window;
     
    157157{
    158158        ddf_msg(LVL_DEBUG, "Adding new function '%s'.", name);
    159        
     159
    160160        ddf_fun_t *fnode = NULL;
    161161        errno_t rc;
    162        
     162
    163163        /* Create new device. */
    164164        fnode = ddf_fun_create(dev, fun_inner, name);
    165165        if (fnode == NULL)
    166166                goto failure;
    167        
     167
    168168        pc_fun_t *fun = ddf_fun_data_alloc(fnode, sizeof(pc_fun_t));
    169169        *fun = *fun_proto;
    170        
     170
    171171        /* Add match ID */
    172172        rc = ddf_fun_add_match_id(fnode, str_match_id, 100);
    173173        if (rc != EOK)
    174174                goto failure;
    175        
     175
    176176        /* Set provided operations to the device. */
    177177        ddf_fun_set_ops(fnode, &pc_fun_ops);
    178        
     178
    179179        /* Register function. */
    180180        if (ddf_fun_bind(fnode) != EOK) {
     
    182182                goto failure;
    183183        }
    184        
     184
    185185        return true;
    186        
     186
    187187failure:
    188188        if (fnode != NULL)
    189189                ddf_fun_destroy(fnode);
    190        
     190
    191191        ddf_msg(LVL_ERROR, "Failed adding function '%s'.", name);
    192        
     192
    193193        return false;
    194194}
     
    209209        ddf_msg(LVL_DEBUG, "pc_dev_add, device handle = %d",
    210210            (int)ddf_dev_get_handle(dev));
    211        
     211
    212212        /* Register functions. */
    213213        if (!pc_add_functions(dev)) {
    214214                ddf_msg(LVL_ERROR, "Failed to add functions for PC platform.");
    215215        }
    216        
     216
    217217        return EOK;
    218218}
  • uspace/drv/platform/sun4u/sun4u.c

    r3061bc1 r8565a42  
    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.