Changeset a35b458 in mainline for uspace/srv/bd/sata_bd/sata_bd.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/srv/bd/sata_bd/sata_bd.c

    r3061bc1 ra35b458  
    9494        size_t count, i;
    9595        errno_t rc;
    96                
     96
    9797        /* If device is SATA, add device to the disk array. */
    9898        disk[disk_count].sess = ahci_get_sess(funh, &disk[disk_count].dev_name);
    9999        if(disk[disk_count].sess != NULL) {
    100                
     100
    101101                ahci_get_sata_device_name(disk[disk_count].sess,
    102102                    SATA_DEV_NAME_LENGTH, disk[disk_count].sata_dev_name);
    103                
     103
    104104                ahci_get_block_size(disk[disk_count].sess,
    105105                    &disk[disk_count].block_size);
    106                
     106
    107107                ahci_get_num_blocks(disk[disk_count].sess, &disk[disk_count].blocks);
    108                
     108
    109109                bd_srvs_init(&disk[disk_count].bds);
    110110                disk[disk_count].bds.ops = &sata_bd_ops;
    111111                disk[disk_count].bds.sarg = &disk[disk_count];
    112                
     112
    113113                printf("Device %s - %s , blocks: %lu, block_size: %lu\n",
    114114                    disk[disk_count].dev_name, disk[disk_count].sata_dev_name,
     
    118118                ++disk_count;
    119119        }
    120        
     120
    121121        /* search children */
    122122        rc = devman_fun_get_child(funh, &devh);
     
    152152        devman_handle_t root_fun;
    153153        errno_t rc;
    154        
     154
    155155        disk_count = 0;
    156156
     
    160160                return EIO;
    161161        }
    162        
     162
    163163        scan_device_tree(root_fun);
    164        
     164
    165165        return EOK;
    166166}
     
    248248        errno_t rc;
    249249        category_id_t disk_cat;
    250        
     250
    251251        async_set_fallback_port_handler(sata_bd_connection, NULL);
    252252        rc = loc_server_register(NAME);
     
    255255                return rc;
    256256        }
    257        
     257
    258258        rc = get_sata_disks();
    259259        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.