Changeset 118


Ignore:
Timestamp:
Jun 4, 2007, 3:50:19 AM (18 years ago)
Author:
Brendan Oakley
Message:

Muted some compile warnings, moved atomic_dec_and_test from compat_22.h to atomic.h

Location:
GPL/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk/alsa-kernel/core/control.c

    r84 r118  
    957957}
    958958
     959#if 0 /* Uniaud: Not used until Alsa version 1.0.9 */
    959960static int snd_ctl_elem_add_user(struct snd_ctl_file *file,
    960961                                 struct snd_ctl_elem_info __user *_info, int replace)
     
    965966        return snd_ctl_elem_add(file, &info, replace);
    966967}
     968#endif /* Uniaud */
    967969
    968970static int snd_ctl_elem_remove(struct snd_ctl_file *file, struct snd_ctl_elem_id *_id)
  • GPL/trunk/alsa-kernel/core/hwdep.c

    r34 r118  
    128128        schedule();
    129129        down(&hw->open_mutex);
     130#ifndef TARGET_OS2
     131/* MKG quiet OW:
     132   see include/linux/signal.h
     133   #define signal_pending(p) 0
     134   Never returns true */
    130135        if (signal_pending(current)) {
    131136            err = -ERESTARTSYS;
    132137            break;
    133138        }
     139#endif /* TARGET_OS2 */
    134140    }
    135141    remove_wait_queue(&hw->open_wait, &wait);
  • GPL/trunk/alsa-kernel/core/info.c

    r32 r118  
    190190    snd_assert(data != NULL, return -ENXIO);
    191191    pos = *offset;
     192#ifndef TARGET_OS2
     193/* MKG: pos is loff_t (see include/linux/types.h) which is
     194   typedef unsigned long - check later */
    192195    if (pos < 0 || (long) pos != pos || (ssize_t) count < 0)
    193196        return -EIO;
     197#endif /* TARGET_OS2 */
    194198    if ((unsigned long) pos + (unsigned long) count < (unsigned long) pos)
    195199        return -EIO;
     
    232236    entry = data->entry;
    233237    pos = *offset;
     238#ifndef TARGET_OS2
     239/* MKG: pos is loff_t (see include/linux/types.h) which is
     240   typedef unsigned long - check later */
    234241    if (pos < 0 || (long) pos != pos || (ssize_t) count < 0)
    235242        return -EIO;
     243#endif /* TARGET_OS2 */
    236244    if ((unsigned long) pos + (unsigned long) count < (unsigned long) pos)
    237245        return -EIO;
  • GPL/trunk/alsa-kernel/include/sound/compat_22.h

    r77 r118  
    406406#endif
    407407
    408 #define ATOMIC_INIT(i)  { (i) }
    409 
    410 /**
    411  * atomic_dec_and_test - decrement and test
    412  * @v: pointer of type atomic_t
    413  *
    414  * Atomically decrements @v by 1 and
    415  * returns true if the result is 0, or false for all other
    416  * cases.  Note that the guaranteed
    417  * useful range of an atomic_t is only 24 bits.
    418  */
    419 static inline int atomic_dec_and_test(volatile atomic_t *v)
    420 {
    421     atomic_dec(v);
    422     if (v->counter == 0)
    423         return 1;
    424     return 0;
    425 }
    426 
    427408/**
    428409 * list_for_each_safe   -       iterate over a list safe against removal of list entry
  • GPL/trunk/include/asm/atomic.h

    r32 r118  
    2424  parm [eax];
    2525
    26 int atomic_dec_and_test(volatile atomic_t *v);
     26/**
     27 * atomic_dec_and_test - decrement and test
     28 * @v: pointer of type atomic_t
     29 *
     30 * Atomically decrements @v by 1 and
     31 * returns true if the result is 0, or false for all other
     32 * cases.  Note that the guaranteed
     33 * useful range of an atomic_t is only 24 bits.
     34 */
     35static inline int atomic_dec_and_test(volatile atomic_t *v)
     36{
     37    atomic_dec(v);
     38    if (v->counter == 0)
     39        return 1;
     40    return 0;
     41}
     42
    2743extern int atomic_add_negative(int i, volatile atomic_t *v);
    2844
Note: See TracChangeset for help on using the changeset viewer.