Changeset bf0a791 in mainline


Ignore:
Timestamp:
2024-11-27T11:19:10Z (5 months ago)
Author:
Miroslav Cimerman <mc@…>
Children:
8160e4c0
Parents:
aa7864b
Message:

hr: cstyle

Location:
uspace
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/hrctl/hrctl.c

    raa7864b rbf0a791  
    341341                case 'n':
    342342                        cfg->dev_no = strtol(optarg, NULL, 10);
    343                         if ((int) cfg->dev_no + optind != argc)
     343                        if ((int)cfg->dev_no + optind != argc)
    344344                                goto bad;
    345345                        rc = fill_config_devs(argc, argv, optind, cfg);
  • uspace/srv/bd/hr/hr.c

    raa7864b rbf0a791  
    264264
    265265        svc_id = ipc_get_arg1(icall);
    266         fail_extent = (long) ipc_get_arg2(icall);
     266        fail_extent = (long)ipc_get_arg2(icall);
    267267
    268268        vol = hr_get_volume(svc_id);
  • uspace/srv/bd/hr/raid0.c

    raa7864b rbf0a791  
    128128{
    129129        fibril_mutex_lock(&vol->lock);
    130         (void) hr_raid0_update_vol_status(vol);
     130        (void)hr_raid0_update_vol_status(vol);
    131131        fibril_mutex_unlock(&vol->lock);
    132132}
     
    291291
    292292error:
    293         (void) hr_raid0_update_vol_status(vol);
     293        (void)hr_raid0_update_vol_status(vol);
    294294        fibril_mutex_unlock(&vol->lock);
    295295        return rc;
  • uspace/srv/bd/hr/raid1.c

    raa7864b rbf0a791  
    129129{
    130130        fibril_mutex_lock(&vol->lock);
    131         (void) hr_raid1_update_vol_status(vol);
     131        (void)hr_raid1_update_vol_status(vol);
    132132        fibril_mutex_unlock(&vol->lock);
    133133}
     
    359359                rc = EIO;
    360360
    361         (void) hr_raid1_update_vol_status(vol);
     361        (void)hr_raid1_update_vol_status(vol);
    362362        fibril_mutex_unlock(&vol->lock);
    363363        return rc;
     
    486486        hr_write_meta_to_ext(vol, bad);
    487487end:
    488         (void) hr_raid1_update_vol_status(vol);
     488        (void)hr_raid1_update_vol_status(vol);
    489489
    490490        fibril_mutex_unlock(&vol->lock);
  • uspace/srv/bd/hr/raid4.c

    raa7864b rbf0a791  
    143143{
    144144        fibril_mutex_lock(&vol->lock);
    145         (void) hr_raid4_update_vol_status(vol);
     145        (void)hr_raid4_update_vol_status(vol);
    146146        fibril_mutex_unlock(&vol->lock);
    147147}
     
    387387        }
    388388
    389         if (extent == (size_t) bad) {
     389        if (extent == (size_t)bad) {
    390390                /*
    391391                 * new parity = read other and xor in new data
     
    395395                memset(xorbuf, 0, len);
    396396                for (i = 1; i < vol->dev_no; i++) {
    397                         if (i == (size_t) bad) {
     397                        if (i == (size_t)bad)
    398398                                continue;
    399399                        } else {
     
    545545                retry_read:
    546546                        ssize_t bad = hr_raid4_get_bad_ext(vol);
    547                         if (bad > 0 && extent == (size_t) bad) {
     547                        if (bad > 0 && extent == (size_t)bad) {
    548548                                rc = hr_raid4_read_degraded(vol, bad,
    549549                                    phys_block, data_read, cnt);
     
    600600
    601601error:
    602         (void) hr_raid4_update_vol_status(vol);
     602        (void)hr_raid4_update_vol_status(vol);
    603603        fibril_mutex_unlock(&vol->lock);
    604604        return rc;
     
    725725        hr_write_meta_to_ext(vol, bad);
    726726end:
    727         (void) hr_raid4_update_vol_status(vol);
     727        (void)hr_raid4_update_vol_status(vol);
    728728
    729729        fibril_mutex_unlock(&vol->lock);
  • uspace/srv/bd/hr/raid5.c

    raa7864b rbf0a791  
    140140{
    141141        fibril_mutex_lock(&vol->lock);
    142         (void) hr_raid5_update_vol_status(vol);
     142        (void)hr_raid5_update_vol_status(vol);
    143143        fibril_mutex_unlock(&vol->lock);
    144144}
     
    385385        }
    386386
    387         if (extent == (size_t) bad) {
     387        if (extent == (size_t)bad) {
    388388                /*
    389389                 * new parity = read other and xor in new data
     
    393393                memset(xorbuf, 0, len);
    394394                for (i = 1; i < vol->dev_no; i++) {
    395                         if (i == (size_t) bad) {
     395                        if (i == (size_t)bad)
    396396                                continue;
    397397                        } else {
     
    547547                retry_read:
    548548                        ssize_t bad = hr_raid5_get_bad_ext(vol);
    549                         if (bad > 0 && extent == (size_t) bad) {
     549                        if (bad > 0 && extent == (size_t)bad) {
    550550                                rc = hr_raid5_read_degraded(vol, bad,
    551551                                    phys_block, data_read, cnt);
     
    606606
    607607error:
    608         (void) hr_raid5_update_vol_status(vol);
     608        (void)hr_raid5_update_vol_status(vol);
    609609        fibril_mutex_unlock(&vol->lock);
    610610        return rc;
     
    731731        hr_write_meta_to_ext(vol, bad);
    732732end:
    733         (void) hr_raid5_update_vol_status(vol);
     733        (void)hr_raid5_update_vol_status(vol);
    734734
    735735        fibril_mutex_unlock(&vol->lock);
  • uspace/srv/bd/hr/superblock.c

    raa7864b rbf0a791  
    212212        for (size_t i = 0; i < vol->dev_no; i++) {
    213213                for (size_t j = 0; j < vol->dev_no; j++) {
    214                         if (i == (uint32_t) md_order[j]) {
     214                        if (i == (uint32_t)md_order[j]) {
    215215                                vol->extents[i].svc_id = cfg_svc_id_order[j];
    216216                                vol->extents[i].status = HR_EXT_ONLINE;
Note: See TracChangeset for help on using the changeset viewer.