Ignore:
Timestamp:
Mar 18, 2021, 8:57:36 PM (4 years ago)
Author:
David Azarewicz
Message:

Merge changes from Paul's uniaud32next branch.

Location:
GPL/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • GPL/trunk

  • GPL/trunk/include/linux/math64.h

    r479 r679  
    55#ifndef MATH64_COMPAT_H
    66#define MATH64_COMPAT_H
     7
     8#include <linux/types.h>
    79
    810#if BITS_PER_LONG >= 64
     
    1315        return n / div;
    1416}
     17
    1518
    1619static inline u64 div_u64(u64 n, u32 div)
     
    5356        } else
    5457                return low / div;
     58}
     59
     60/**
     61 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder
     62 */
     63static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
     64{
     65        *remainder = dividend % divisor;
     66        return dividend / divisor;
    5567}
    5668
     
    117129}
    118130
     131/**
     132 * div_s64_rem - signed 64bit divide with 32bit divisor with remainder
     133 */
     134static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
     135{
     136        *remainder = dividend % divisor;
     137        return dividend / divisor;
     138}
     139
    119140#endif
    120141
Note: See TracChangeset for help on using the changeset viewer.