Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 6ff23ff in mainline


Ignore:
Timestamp:
2018-05-17T13:46:56Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
Children:
4f8772d4
Parents:
7c3fb9b
git-author:
Jiri Svoboda <jiri@…> (2018-05-16 18:44:36)
git-committer:
Jiri Svoboda <jiri@…> (2018-05-17 13:46:56)
Message:

More comment fixing (ccheck).

Files:
18 edited

Legend:

Unmodified
Added
Removed
  • boot/generic/src/printf_core.c

    r7c3fb9b r6ff23ff  
    657657
    658658                        switch (uc) {
    659                         /*
    660                         * String and character conversions.
    661                         */
     659                                /*
     660                                * String and character conversions.
     661                                */
    662662                        case 's':
    663663                                retval = print_str(va_arg(ap, char *), width, precision, flags, ps);
     
    683683                                continue;
    684684
    685                         /*
    686                         * Integer values
    687                         */
     685                                /*
     686                                * Integer values
     687                                */
    688688                        case 'P':
    689689                                /* Pointer */
     
    715715                                break;
    716716
    717                         /* Percentile itself */
     717                                /* Percentile itself */
    718718                        case '%':
    719719                                j = i;
    720720                                continue;
    721721
    722                         /*
    723                         * Bad formatting.
    724                         */
     722                                /*
     723                                * Bad formatting.
     724                                */
    725725                        default:
    726726                                /*
  • kernel/arch/arm32/include/arch/barrier.h

    r7c3fb9b r6ff23ff  
    4949
    5050#if defined PROCESSOR_ARCH_armv7_a
    51 /* ARMv7 uses instructions for memory barriers see ARM Architecture reference
     51/*
     52 * ARMv7 uses instructions for memory barriers see ARM Architecture reference
    5253 * manual for details:
    5354 * DMB: ch. A8.8.43 page A8-376
     
    6970 * ARM Architecture Reference Manual version I ch. B.3.2.1 p. B3-4
    7071 */
    71 /* ARMv6- use system control coprocessor (CP15) for memory barrier instructions.
     72/*
     73 * ARMv6- use system control coprocessor (CP15) for memory barrier instructions.
    7274 * Although at least mcr p15, 0, r0, c7, c10, 4 is mentioned in earlier archs,
    7375 * CP15 implementation is mandatory only for armv6+.
     
    8688#endif
    8789#else
    88 /* Older manuals mention syscalls as a way to implement cache coherency and
     90/*
     91 * Older manuals mention syscalls as a way to implement cache coherency and
    8992 * barriers. See for example ARM Architecture Reference Manual Version D
    9093 * chapter 2.7.4 Prefetching and self-modifying code (p. A2-28)
     
    123126        inst_barrier();                /* Wait for Inst refetch */\
    124127} while (0)
    125 /* @note: Cache type register is not available in uspace. We would need
    126  * to export the cache line value, or use syscall for uspace smc_coherence */
     128/*
     129 * @note: Cache type register is not available in uspace. We would need
     130 * to export the cache line value, or use syscall for uspace smc_coherence
     131 */
    127132#define smc_coherence_block(a, l) \
    128133do { \
  • kernel/arch/arm32/src/fpu_context.c

    r7c3fb9b r6ff23ff  
    117117static int fpu_have_coprocessor_access(void)
    118118{
    119 /*
    120  * The register containing the information (CPACR) is not available on armv6-
    121  * rely on user decision to use CONFIG_FPU.
    122  */
     119        /*
     120         * The register containing the information (CPACR) is not available
     121         * on armv6-. Rely on user decision to use CONFIG_FPU.
     122        */
    123123#ifdef PROCESSOR_ARCH_armv7_a
    124124        const uint32_t cpacr = CPACR_read();
    125         /* FPU needs access to coprocessor 10 and 11.
    126          * Moreover they need to have same access enabled */
     125        /*
     126         * FPU needs access to coprocessor 10 and 11.
     127         * Moreover, they need to have same access enabled
     128         */
    127129        if (((cpacr & CPACR_CP_MASK(10)) != CPACR_CP_FULL_ACCESS(10)) &&
    128130            ((cpacr & CPACR_CP_MASK(11)) != CPACR_CP_FULL_ACCESS(11))) {
     
    131133        }
    132134#endif
     135
    133136        return 1;
    134137}
     
    147150static void fpu_enable_coprocessor_access(void)
    148151{
    149 /*
    150  * The register containing the information (CPACR) is not available on armv6-
    151  * rely on user decision to use CONFIG_FPU.
    152  */
     152        /*
     153         * The register containing the information (CPACR) is not available
     154         * on armv6-. Rely on user decision to use CONFIG_FPU.
     155        */
    153156#ifdef PROCESSOR_ARCH_armv7_a
    154157        /* Allow coprocessor access */
    155158        uint32_t cpacr = CPACR_read();
    156         /* FPU needs access to coprocessor 10 and 11.
    157          * Moreover, they need to have same access enabled */
     159        /*
     160         * FPU needs access to coprocessor 10 and 11.
     161         * Moreover, they need to have same access enabled
     162         */
    158163        cpacr &= ~(CPACR_CP_MASK(10) | CPACR_CP_MASK(11));
    159164        cpacr |= (CPACR_CP_FULL_ACCESS(10) | CPACR_CP_FULL_ACCESS(11));
     
    172177        fpexc_write(0);
    173178        fpu_enable();
    174         /* Mask all exception traps,
     179        /*
     180         * Mask all exception traps,
    175181         * The bits are RAZ/WI on archs that don't support fpu exc traps.
    176182         */
  • kernel/generic/src/ipc/sysipc.c

    r7c3fb9b r6ff23ff  
    119119
    120120
    121 /***********************************************************************
     121/*
    122122 * Functions that preprocess answer before sending it to the recepient.
    123  ***********************************************************************/
     123 */
    124124
    125125/** Decide if the caller (e.g. ipc_answer()) should save the old call contents
     
    228228}
    229229
    230 /*******************************************************************************
     230/*
    231231 * Functions called to process received call/answer before passing it to uspace.
    232  *******************************************************************************/
     232 */
    233233
    234234/** Do basic kernel processing of received call answer.
  • kernel/generic/src/printf/printf_core.c

    r7c3fb9b r6ff23ff  
    784784
    785785                        switch (uc) {
    786                         /*
    787                         * String and character conversions.
    788                         */
     786                                /*
     787                                * String and character conversions.
     788                                */
    789789                        case 's':
    790790                                if (qualifier == PrintfQualifierLong)
     
    816816                                continue;
    817817
    818                         /*
    819                         * Integer values
    820                         */
     818                                /*
     819                                * Integer values
     820                                */
    821821                        case 'P':
    822822                                /* Pointer */
     
    848848                                break;
    849849
    850                         /* Percentile itself */
    851850                        case '%':
     851                                /* Percentile itself */
    852852                                j = i;
    853853                                continue;
    854854
    855                         /*
    856                         * Bad formatting.
    857                         */
     855                                /*
     856                                * Bad formatting.
     857                                */
    858858                        default:
    859859                                /*
  • kernel/generic/src/udebug/udebug_ipc.c

    r7c3fb9b r6ff23ff  
    5454{
    5555        switch (IPC_GET_ARG1(call->data)) {
    56         /* future UDEBUG_M_REGS_WRITE, UDEBUG_M_MEM_WRITE: */
     56                /* future UDEBUG_M_REGS_WRITE, UDEBUG_M_MEM_WRITE: */
    5757        default:
    5858                break;
     
    193193
    194194        IPC_SET_RETVAL(call->data, 0);
    195         /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
    196            same code in process_answer() can be used
    197            (no way to distinguish method in answer) */
     195        /*
     196         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     197         * same code in process_answer() can be used
     198         * (no way to distinguish method in answer)
     199         */
    198200        IPC_SET_ARG1(call->data, uspace_addr);
    199201        IPC_SET_ARG2(call->data, copied);
     
    238240
    239241        IPC_SET_RETVAL(call->data, 0);
    240         /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
    241            same code in process_answer() can be used
    242            (no way to distinguish method in answer) */
     242        /*
     243         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     244         * same code in process_answer() can be used
     245         * (no way to distinguish method in answer)
     246         */
    243247        IPC_SET_ARG1(call->data, uspace_addr);
    244248        IPC_SET_ARG2(call->data, to_copy);
     
    285289
    286290        IPC_SET_RETVAL(call->data, 0);
    287         /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
    288            same code in process_answer() can be used
    289            (no way to distinguish method in answer) */
     291        /*
     292         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     293         * same code in process_answer() can be used
     294         * (no way to distinguish method in answer)
     295         */
    290296        IPC_SET_ARG1(call->data, uspace_addr);
    291297        IPC_SET_ARG2(call->data, to_copy);
     
    326332
    327333        IPC_SET_RETVAL(call->data, 0);
    328         /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
    329            same code in process_answer() can be used
    330            (no way to distinguish method in answer) */
     334        /*
     335         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     336         * same code in process_answer() can be used
     337         * (no way to distinguish method in answer)
     338         */
    331339        IPC_SET_ARG1(call->data, uspace_addr);
    332340        IPC_SET_ARG2(call->data, 6 * sizeof(sysarg_t));
     
    367375
    368376        IPC_SET_RETVAL(call->data, 0);
    369         /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
    370            same code in process_answer() can be used
    371            (no way to distinguish method in answer) */
     377        /*
     378         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     379         * same code in process_answer() can be used
     380         * (no way to distinguish method in answer)
     381         */
    372382        IPC_SET_ARG1(call->data, uspace_addr);
    373383        IPC_SET_ARG2(call->data, to_copy);
     
    406416
    407417        IPC_SET_RETVAL(call->data, 0);
    408         /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
    409            same code in process_answer() can be used
    410            (no way to distinguish method in answer) */
     418        /*
     419         * ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that
     420         * same code in process_answer() can be used
     421         * (no way to distinguish method in answer)
     422         */
    411423        IPC_SET_ARG1(call->data, uspace_dst);
    412424        IPC_SET_ARG2(call->data, size);
  • uspace/app/trace/trace.c

    r7c3fb9b r6ff23ff  
    723723        o = oper_new("vfs_mount", 2, arg_def, V_ERRNO, 0, resp_def);
    724724        proto_add_oper(p, VFS_IN_MOUNT, o);
    725 /*      o = oper_new("unmount", 0, arg_def);
    726         proto_add_oper(p, VFS_IN_UNMOUNT, o);*/
     725#if 0
     726        o = oper_new("unmount", 0, arg_def);
     727        proto_add_oper(p, VFS_IN_UNMOUNT, o);
     728#endif
    727729        o = oper_new("vfs_sync", 1, arg_def, V_ERRNO, 0, resp_def);
    728730        proto_add_oper(p, VFS_IN_SYNC, o);
  • uspace/app/websrv/websrv.c

    r7c3fb9b r6ff23ff  
    375375                verbose = true;
    376376                break;
    377         /* Long options with double dash */
    378377        case '-':
     378                /* Long options with double dash */
    379379                if (str_lcmp(argv[*index] + 2, "help", 5) == 0) {
    380380                        usage();
  • uspace/drv/hid/atkbd/atkbd.c

    r7c3fb9b r6ff23ff  
    309309                async_answer_0(icall_handle, ENOTSUP);
    310310                break;
    311         /*
    312          * This might be ugly but async_callback_receive_start makes no
    313          * difference for incorrect call and malloc failure.
    314          */
    315311        case IPC_M_CONNECT_TO_ME:
     312                /*
     313                 * This might be ugly but async_callback_receive_start makes no
     314                 * difference for incorrect call and malloc failure.
     315                 */
    316316                sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    317317
  • uspace/drv/hid/ps2mouse/ps2mouse.c

    r7c3fb9b r6ff23ff  
    324324
    325325                /* Buttons */
    326                 /* NOTE: Parsing 4th and 5th button works even if this extension
     326                /*
     327                 * NOTE: Parsing 4th and 5th button works even if this extension
    327328                 * is not supported and whole 4th byte should be interpreted
    328329                 * as Z-axis movement. the upper 4 bits are just a sign
     
    330331                 * (i.e no change since that is the default) and - sign fails
    331332                 * the "imb" condition. Thus 4th and 5th buttons are never
    332                  * down on wheel only extension. */
     333                 * down on wheel only extension.
     334                 */
    333335                const bool imb = (packet[3] & INTELLIMOUSE_ALWAYS_ZERO) == 0;
    334336                const bool status[] = {
     
    411413
    412414        switch (method) {
    413         /* This might be ugly but async_callback_receive_start makes no
    414          * difference for incorrect call and malloc failure. */
    415415        case IPC_M_CONNECT_TO_ME:
     416                /*
     417                 * This might be ugly but async_callback_receive_start makes no
     418                 * difference for incorrect call and malloc failure.
     419                 */
    416420                sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    417421                /* Probably ENOMEM error, try again. */
  • uspace/drv/hid/xtkbd/xtkbd.c

    r7c3fb9b r6ff23ff  
    364364                async_answer_0(icall_handle, rc);
    365365                break;
    366         /*
    367          * This might be ugly but async_callback_receive_start makes no
    368          * difference for incorrect call and malloc failure.
    369          */
    370366        case IPC_M_CONNECT_TO_ME:
     367                /*
     368                 * This might be ugly but async_callback_receive_start makes no
     369                 * difference for incorrect call and malloc failure.
     370                 */
    371371                sess = async_callback_receive_start(EXCHANGE_SERIALIZE, icall);
    372372
  • uspace/lib/c/arch/mips32/src/syscall.c

    r7c3fb9b r6ff23ff  
    3131 */
    3232/** @file
    33   * @ingroup libcmips32
     33 * @ingroup libcmips32
    3434 */
    3535
     
    5757              "r" (__mips_reg_t1),
    5858              "r" (__mips_reg_v0)
    59                 /*
    60                 * We are a function call, although C
    61                 * does not know it.
    62                 */
     59              /*
     60              * We are a function call, although C
     61              * does not know it.
     62              */
    6363            : "%ra"
    6464        );
  • uspace/lib/c/generic/io/printf_core.c

    r7c3fb9b r6ff23ff  
    14991499
    15001500                        switch (uc) {
    1501                         /*
    1502                         * String and character conversions.
    1503                         */
     1501                                /*
     1502                                * String and character conversions.
     1503                                */
    15041504                        case 's':
    15051505                                precision = max(0,  precision);
     
    15331533                                continue;
    15341534
    1535                         /*
    1536                         * Floating point values
    1537                         */
     1535                                /*
     1536                                * Floating point values
     1537                                */
    15381538                        case 'G':
    15391539                        case 'g':
     
    15541554                                continue;
    15551555
    1556                         /*
    1557                         * Integer values
    1558                         */
     1556                                /*
     1557                                * Integer values
     1558                                */
    15591559                        case 'P':
    15601560                                /* Pointer */
     
    15861586                                break;
    15871587
    1588                         /* Percentile itself */
    15891588                        case '%':
     1589                                /* Percentile itself */
    15901590                                j = i;
    15911591                                continue;
    15921592
    1593                         /*
    1594                         * Bad formatting.
    1595                         */
     1593                                /*
     1594                                * Bad formatting.
     1595                                */
    15961596                        default:
    15971597                                /*
  • uspace/lib/posix/src/internal/common.h

    r7c3fb9b r6ff23ff  
    5353#define _HIDE_LIBC_SYMBOL(symbol)
    5454
    55 /* Checks if the value is a failing error code.
     55/** Checks if the value is a failing error code.
     56 *
    5657 * If so, writes the error code to errno and returns true.
    5758 */
  • uspace/lib/usb/src/port.c

    r7c3fb9b r6ff23ff  
    224224                break;
    225225
    226         /* We first have to stop the fibril in progress. */
    227226        case PORT_CONNECTING:
     227                /* We first have to stop the fibril in progress. */
    228228                port->state = PORT_ERROR;
    229229                fibril_condvar_broadcast(&port->enabled_cv);
  • uspace/lib/usbhid/include/usb/hid/usages/kbdgen.h

    r7c3fb9b r6ff23ff  
    3232/** @file
    3333 * @brief USB HID key codes.
    34  * @details
     34 *
    3535 * This is not a typical header as by default it is equal to empty file.
    3636 * However, by cleverly defining the USB_HIDUT_KBD_KEY you can use it
     
    3939 * For example, this creates enum for known keys:
    4040 * @code
    41 #define USB_HIDUT_KBD_KEY(name, usage_id, l, lc, l1, l2) \
    42         USB_KBD_KEY_##name = usage_id,
    43 typedef enum {
    44         #include <usb/hidutkbd.h>
    45 } usb_key_code_t;
    46  @endcode
     41 * #define USB_HIDUT_KBD_KEY(name, usage_id, l, lc, l1, l2) \
     42 *     USB_KBD_KEY_##name = usage_id,
     43 *
     44 * typedef enum {
     45 *         #include <usb/hidutkbd.h>
     46 * } usb_key_code_t;
     47 * @endcode
    4748 *
    4849 * Maybe, it might be better that you would place such enums into separate
  • uspace/lib/usbhid/src/hidpath.c

    r7c3fb9b r6ff23ff  
    213213
    214214        switch (flags) {
    215         /* Path is somewhere in report_path */
    216215        case USB_HID_PATH_COMPARE_ANYWHERE:
     216                /*
     217                 * Path is somewhere in report_path
     218                 */
    217219                if (path->depth != 1) {
    218220                        return 1;
     
    239241
    240242                return 1;
    241                 break;
    242 
    243         /* The paths must be identical */
     243
    244244        case USB_HID_PATH_COMPARE_STRICT:
     245                /*
     246                 * The paths must be identical
     247                 */
    245248                if (report_path->depth != path->depth) {
    246249                        return 1;
     
    248251                /* Fallthrough */
    249252
    250         /* Path is prefix of the report_path */
    251253        case USB_HID_PATH_COMPARE_BEGIN:
     254                /*
     255                 * Path is prefix of the report_path
     256                 */
    252257                report_link = report_path->items.head.next;
    253258                path_link = path->items.head.next;
     
    283288                break;
    284289
    285         /* Path is suffix of report_path */
    286290        case USB_HID_PATH_COMPARE_END:
     291                /*
     292                 * Path is suffix of report_path
     293                 */
    287294                report_link = report_path->items.head.prev;
    288295                path_link = path->items.head.prev;
  • uspace/srv/fs/udf/udf_volume.c

    r7c3fb9b r6ff23ff  
    655655
    656656                switch (FLE16(vol->common.tag.id)) {
    657                 /* One sector size descriptors */
     657                        /*
     658                         * One sector size descriptors
     659                         */
     660
    658661                case UDF_TAG_PVD:
    659662                        log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume: Primary volume descriptor found");
     
    728731                        break;
    729732
    730                 /* Relative size descriptors */
     733                        /*
     734                         * Relative size descriptors
     735                         */
     736
    731737                case UDF_TAG_LVD:
    732738                        log_msg(LOG_DEFAULT, LVL_DEBUG, "Volume: Logical volume descriptor found");
Note: See TracChangeset for help on using the changeset viewer.