Changeset e8975278 in mainline


Ignore:
Timestamp:
2018-05-10T15:14:02Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1420cae9
Parents:
ae7d03c
git-author:
Jiri Svoboda <jiri@…> (2018-05-10 07:53:56)
git-committer:
Jiri Svoboda <jiri@…> (2018-05-10 15:14:02)
Message:

A few more cstyle fixes.

Files:
14 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/src/putchar.c

    rae7d03c re8975278  
    5151{
    5252        volatile uint32_t *thr =
    53                 (volatile uint32_t *) BBONE_SCONS_THR;
     53            (volatile uint32_t *) BBONE_SCONS_THR;
    5454        volatile uint32_t *ssr =
    55                 (volatile uint32_t *) BBONE_SCONS_SSR;
     55            (volatile uint32_t *) BBONE_SCONS_SSR;
    5656
    5757        /* Wait until transmitter is empty */
    58         while (*ssr & BBONE_TXFIFO_FULL);
     58        while (*ssr & BBONE_TXFIFO_FULL)
     59                ;
    5960
    6061        /* Transmit byte */
     
    7879
    7980        /* Wait until transmitter is empty. */
    80         while ((*ssr & BBXM_THR_FULL) == 1) ;
     81        while ((*ssr & BBXM_THR_FULL) == 1)
     82                ;
    8183
    8284        /* Transmit byte. */
     
    144146        write32(BCM2835_UART0_FBRD, 40);        /* Set fractional baud rate */
    145147        write32(BCM2835_UART0_LCRH,
    146                 BCM2835_UART0_LCRH_FEN |        /* Enable FIFOs */
    147                 BCM2835_UART0_LCRH_WL8);        /* Word length: 8 */
     148            BCM2835_UART0_LCRH_FEN |            /* Enable FIFOs */
     149            BCM2835_UART0_LCRH_WL8);            /* Word length: 8 */
    148150        write32(BCM2835_UART0_CR,
    149                 BCM2835_UART0_CR_UARTEN |       /* Enable UART */
    150                 BCM2835_UART0_CR_TXE |          /* Enable TX */
    151                 BCM2835_UART0_CR_RXE);          /* Enable RX */
     151            BCM2835_UART0_CR_UARTEN |           /* Enable UART */
     152            BCM2835_UART0_CR_TXE |              /* Enable TX */
     153            BCM2835_UART0_CR_RXE);              /* Enable RX */
    152154}
    153155
     
    159161        }
    160162
    161         while (read32(BCM2835_UART0_FR) & BCM2835_UART0_FR_TXFF);
     163        while (read32(BCM2835_UART0_FR) & BCM2835_UART0_FR_TXFF)
     164                ;
    162165
    163166        write32(BCM2835_UART0_DR, byte);
  • uspace/app/sbi/src/bigint.c

    rae7d03c re8975278  
    202202
    203203        if (bigint->negative)
    204                 val = - val;
     204                val = -val;
    205205
    206206        /* If the value did not fit @c val now contains garbage. Verify. */
     
    368368{
    369369        static const char digits[] = { '0', '1', '2', '3', '4', '5', '6',
    370             '7', '8', '9' };
     370                '7', '8', '9' };
    371371
    372372        bigint_t val, tmp;
     
    632632                db = b;
    633633
    634                 tmp = (da * db) + (bigint_word_t) carry;
     634                tmp = da * db + (bigint_word_t) carry;
    635635
    636636                carry = (bigint_word_t) (tmp / BIGINT_BASE);
  • uspace/app/usbinfo/info.c

    rae7d03c re8975278  
    269269        }
    270270
    271         /*printf("Found string in %s->%s: %zu\n",
    272             #descr_struct, #descr_item, __str_index); */
    273271#define SET_STRING_INDEX(descr, mask, descr_type, descr_struct, descr_item) \
    274272        do { \
  • uspace/app/vuhid/hids/logitech_wireless.c

    rae7d03c re8975278  
    5858#define iface1_input_size 8
    5959static uint8_t iface1_in_data[] = {
    60                 /*0, 0, 0, 0, 0, 0, 0, 0,
    61                 0, 9, 0, 0, 0, 0, 0, 0,
    62                 0, 0, 9, 0, 0, 0, 0, 0,
    63                 0, 9, 9, 0, 0, 0, 0, 0,*/
    64                 0, 0, 0, 0, 0, 0, 0, 0
     60        0, 0, 0, 0, 0, 0, 0, 0
    6561};
    6662
    6763static vuhid_interface_life_t iface1_life = {
    6864        .data_in = iface1_in_data,
    69         .data_in_count = sizeof(iface1_in_data)/iface1_input_size,
     65        .data_in_count = sizeof(iface1_in_data) / iface1_input_size,
    7066        .data_in_pos_change_delay = 50,
    7167        .msg_born = "Mouse of Logitech Unifying Receiver comes to life...",
  • uspace/drv/audio/hdaudio/codec.c

    rae7d03c re8975278  
    6767        }
    6868        errno_t rc = hda_cmd(codec->hda, verb, resp);
    69 /*
     69
     70#if 0
    7071        if (resp != NULL) {
    7172                ddf_msg(LVL_NOTE, "verb 0x%" PRIx32 " -> 0x%" PRIx32, verb,
     
    7475                ddf_msg(LVL_NOTE, "verb 0x%" PRIx32, verb);
    7576        }
    76 */
     77#endif
    7778        return rc;
    7879}
     
    448449        }
    449450
    450 /*      if ((pcaps & BIT_V(uint32_t, pwc_input)) != 0) {
     451#if 0
     452        if ((pcaps & BIT_V(uint32_t, pwc_input)) != 0) {
    451453                ddf_msg(LVL_NOTE, "PIN %d will enable input");
    452                 pctl = pctl | BIT_V(uint8_t, pctl_input_enable);
    453         }
    454 */
     454                pctl = pctl | BIT_V(uint8_t, pctl_input_enable);
     455        }
     456#endif
    455457        ddf_msg(LVL_NOTE, "Setting PIN %d ctl to 0x%x", aw, pctl);
    456458        rc = hda_set_pin_ctl(codec, aw, pctl);
  • uspace/lib/c/arch/ia32/src/rtld/reloc.c

    rae7d03c re8975278  
    9393                sym = &sym_table[sym_idx];
    9494
    95 /*              DPRINTF("name '%s', value 0x%x, size 0x%x\n",
    96                     str_tab + sym->st_name,
    97                     sym->st_value,
    98                     sym->st_size);
    99 */
     95#if 0
     96                DPRINTF("name '%s', value 0x%x, size 0x%x\n",
     97                    str_tab + sym->st_name, sym->st_value, sym->st_size);
     98#endif
    10099                rel_type = ELF32_R_TYPE(r_info);
    101100                r_ptr = (uint32_t *)(r_offset + m->bias);
  • uspace/lib/c/arch/ia32/src/tls.c

    rae7d03c re8975278  
    3333 */
    3434/** @file
    35   * @ingroup libcia32
     35 * @ingroup libcia32
    3636 */
    3737
  • uspace/lib/posix/src/stdio/scanf.c

    rae7d03c re8975278  
    6161        _PROV_READY,
    6262        /** Cursor is temporarily lent to the external entity. No action is
    63           * possible until the cursor is returned.  */
     63         * possible until the cursor is returned.  */
    6464        _PROV_CURSOR_LENT,
    6565};
     
    7474        int fetched;
    7575        /** Elements are fetched from the source in batches (e.g. by getline())
    76           * to allow using strtol/strtod family even on streams. */
     76         * to allow using strtol/strtod family even on streams. */
    7777        char *window;
    7878        /** Size of the current window. */
     
    8484
    8585        /** Take control over data source. Finish initialization of the internal
    86           * structures (e.g. allocation of window). */
     86         * structures (e.g. allocation of window). */
    8787        void (*capture)(struct __input_provider *);
    8888        /** Get a single element from the source and update the internal structures
    89           * accordingly (e.g. greedy update of the window). Return -1 if the
    90           * element cannot be obtained. */
     89         * accordingly (e.g. greedy update of the window). Return -1 if the
     90         * element cannot be obtained. */
    9191        int (*pop)(struct __input_provider *);
    9292        /** Undo the most recent not-undone pop operation. Might be necesarry to
    93           * flush current window and seek data source backwards. Return 0 if the
    94           * pop history is exhausted, non-zero on success. */
     93         * flush current window and seek data source backwards. Return 0 if the
     94         * pop history is exhausted, non-zero on success. */
    9595        int (*undo)(struct __input_provider *);
    9696        /** Lend the cursor to the caller.  */
    9797        const char *(*borrow_cursor)(struct __input_provider *);
    9898        /** Take control over possibly incremented cursor and update the internal
    99           * structures if necessary. */
     99         * structures if necessary. */
    100100        void (*return_cursor)(struct __input_provider *, const char *);
    101101        /** Release the control over the source. That is, synchronize any
    102           * fetched but non-consumed elements (e.g. by seeking) and destruct
    103           * internal structures (e.g. window deallocation). */
     102         * fetched but non-consumed elements (e.g. by seeking) and destruct
     103         * internal structures (e.g. window deallocation). */
    104104        void (*release)(struct __input_provider *);
    105105} _input_provider;
     
    411411                *base = 10;
    412412                return 1;
    413         case 'p': /* According to POSIX, %p modifier is implementation defined but
    414                            * must correspond to its printf counterpart. */
     413        case 'p':
     414                /* According to POSIX, %p modifier is implementation defined but
     415                 * must correspond to its printf counterpart. */
    415416        case 'x':
    416417        case 'X':
  • uspace/lib/trackmod/trackmod.c

    rae7d03c re8975278  
    6262
    6363/** Table for finetune computation.
    64   *
    65   * Finetune is a number ft in [-8 .. 7]. The pitch should be adjusted by
    66   * ft/8 semitones. To adjust pitch by 1/8 semitone down we can mutiply the
    67   * period by 2^(1/12/8) =. 1.0072, one semitone up: 2^-(1/12/8) =. 0.9928,
    68   * to adjust by ft/8 semitones, multiply by 2^(-ft/12/8).
    69   *
    70   * finetune_factor[ft] := 10000 * 2^(-ft/12/8)
    71   * res_period = clip(period * fineture_factor[ft+8] / 10000)
    72   */
     64 *
     65 * Finetune is a number ft in [-8 .. 7]. The pitch should be adjusted by
     66 * ft/8 semitones. To adjust pitch by 1/8 semitone down we can mutiply the
     67 * period by 2^(1/12/8) =. 1.0072, one semitone up: 2^-(1/12/8) =. 0.9928,
     68 * to adjust by ft/8 semitones, multiply by 2^(-ft/12/8).
     69 *
     70 * finetune_factor[ft] := 10000 * 2^(-ft/12/8)
     71 * res_period = clip(period * fineture_factor[ft+8] / 10000)
     72 */
    7373static unsigned finetune_factor[16] = {
    7474        10595, 10518, 10443, 10368, 10293, 10219, 10145, 10072,
     
    731731                }
    732732
    733 /*              if (np < period_min)
     733#if 0
     734                /* XXX */
     735                if (np < period_min)
    734736                        np = period_min;
    735737                if (np > period_max)
    736738                        np = period_max;
    737 */
     739#endif
    738740                modplay->chan[i].period = np;
    739741        }
  • uspace/lib/trackmod/types/trackmod.h

    rae7d03c re8975278  
    153153        int vol_slide;
    154154        /** Portamento amount (positive for tone and up portamento,
    155           * negative for down portamento. */
     155         * negative for down portamento. */
    156156        int portamento;
    157157        /** Tone portamento target period. */
  • uspace/srv/fs/exfat/exfat_directory.c

    rae7d03c re8975278  
    7171
    7272        di->bs = block_bb_get(di->service_id);
    73 /*      di->blocks = nodep->size / BPS(di->bs); */
    7473        di->blocks = ROUND_UP(nodep->size, BPS(di->bs)) / BPS(di->bs);
    7574        return EOK;
  • uspace/srv/fs/exfat/exfat_ops.c

    rae7d03c re8975278  
    11981198        }
    11991199
    1200         /* exfat_fsinfo(bs, service_id); */
     1200        if (0)
     1201                exfat_fsinfo(bs, service_id);
    12011202
    12021203        *rrfn = FS_NODE(rootp);
     
    12371238
    12381239/* Print debug info */
    1239 /*
    12401240static void exfat_fsinfo(exfat_bs_t *bs, service_id_t service_id)
    12411241{
     
    12521252        printf("Bytes per sector: %d\n", BPS(bs));
    12531253        printf("Sectors per cluster: %d\n", SPC(bs));
    1254         printf("KBytes per cluster: %d\n", SPC(bs)*BPS(bs)/1024);
     1254        printf("KBytes per cluster: %d\n", SPC(bs) * BPS(bs) / 1024);
    12551255
    12561256        int i, rc;
    12571257        exfat_cluster_t clst;
    1258         for (i=0; i<=7; i++) {
     1258        for (i = 0; i <= 7; i++) {
    12591259                rc = exfat_get_cluster(bs, service_id, i, &clst);
    12601260                if (rc != EOK)
    12611261                        return;
    12621262                printf("Clst %d: %x", i, clst);
    1263                 if (i>=2)
    1264                         printf(", Bitmap: %d\n", bitmap_is_free(bs, service_id, i)!=EOK);
     1263                if (i >= 2)
     1264                        printf(", Bitmap: %d\n", bitmap_is_free(bs, service_id, i) != EOK);
    12651265                else
    12661266                        printf("\n");
    12671267        }
    12681268}
    1269 */
    12701269
    12711270static errno_t exfat_fsprobe(service_id_t service_id, vfs_fs_probe_info_t *info)
  • uspace/srv/hid/isdv4_tablet/isdv4.c

    rae7d03c re8975278  
    5454#define CMD_QUERY_TOUCH '%'
    5555
    56 /* packet_consumer_fn(uint8_t *packet, size_t size, isdv4_state_t *state,
    57    void *data)
    58    return true if reading of packets should continue */
    59 typedef bool (*packet_consumer_fn)(uint8_t *, size_t, isdv4_state_t *);
     56/** Packet consumer function
     57 *
     58 * @return true if reading of packets should continue
     59 */
     60typedef bool (*packet_consumer_fn)(uint8_t *packet, size_t size,
     61    isdv4_state_t *state);
    6062
    6163static void isdv4_event_init(isdv4_event_t *event)
  • uspace/srv/net/tcp/conn.c

    rae7d03c re8975278  
    11861186        tcp_segment_dump(seg);
    11871187
    1188         /* Check whether segment is acceptable */
    1189         /* XXX Permit valid ACKs, URGs and RSTs */
    1190 /*      if (!seq_no_segment_acceptable(conn, seg)) {
    1191                 log_msg(LOG_DEFAULT, LVL_WARN, "Segment not acceptable, dropping.");
    1192                 if ((seg->ctrl & CTL_RST) == 0) {
    1193                         tcp_tqueue_ctrl_seg(conn, CTL_ACK);
    1194                 }
    1195                 return;
    1196         }
    1197 */
    1198 
    11991188        if (tcp_conn_seg_proc_rst(conn, seg) == cp_done)
    12001189                return;
Note: See TracChangeset for help on using the changeset viewer.