Changeset 80d2bdb in mainline for arch/mips32


Ignore:
Timestamp:
2005-12-15T16:10:19Z (20 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b4cad8b2
Parents:
7dd2561
Message:

We are now almost -Wall clean.

  • redefined atomic_t
  • deleted many, many unused variables
  • some minor code cleanups found using compiler warning.
Location:
arch/mips32
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • arch/mips32/include/atomic.h

    r7dd2561 r80d2bdb  
    4242
    4343
    44 typedef volatile __u32 atomic_t;
     44typedef struct { volatile __u32 count; } atomic_t;
    4545
    4646/* Atomic addition of immediate value.
     
    6363                "       beq %0, %4, 1b\n"       /* if the atomic operation failed, try again */
    6464                /*      nop     */              /* nop is inserted automatically by compiler */
    65                 : "=r" (tmp), "=m" (*val), "=r" (v)
     65                : "=r" (tmp), "=m" (val->count), "=r" (v)
    6666                : "i" (i), "i" (0)
    6767                );
     
    7070}
    7171
     72/* Reads/writes are atomic on mips for 4-bytes */
     73
     74static inline void atomic_set(atomic_t *val, __u32 i)
     75{
     76        val->count = i;
     77}
     78
     79static inline __u32 atomic_get(atomic_t *val)
     80{
     81        return val->count;
     82}
    7283
    7384#endif
  • arch/mips32/src/drivers/arc.c

    r7dd2561 r80d2bdb  
    189189        arc_putchar('C');
    190190        arc_putchar('\n');
     191
     192        return 0;
    191193}
    192194
     
    287289        __address base;
    288290        size_t basesize;
    289         unsigned int i,j;
    290291
    291292        desc = arc_entry->getmemorydescriptor(NULL);
  • arch/mips32/src/drivers/serial.c

    r7dd2561 r80d2bdb  
    3939static void serial_write(chardev_t *d, const char ch)
    4040{
    41         int i;
    4241        serial_t *sd = (serial_t *)d->data;
    4342
Note: See TracChangeset for help on using the changeset viewer.