aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/brcm2708/patches-4.19/950-0118-sound-bcm-Fix-memset-dereference-warning.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-12-23 21:49:48 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2019-12-24 18:04:32 +0100
commit47a93a810f78adce5a130d287f82b28e9b54313c (patch)
tree5cde01de4743a0664dd221dcf55a43e9bd38c53e /target/linux/brcm2708/patches-4.19/950-0118-sound-bcm-Fix-memset-dereference-warning.patch
parent25b422a0412d88345c911875fd4413c46c913d4e (diff)
downloadupstream-47a93a810f78adce5a130d287f82b28e9b54313c.tar.gz
upstream-47a93a810f78adce5a130d287f82b28e9b54313c.tar.bz2
upstream-47a93a810f78adce5a130d287f82b28e9b54313c.zip
kernel: bump 4.9 to 4.9.207
Refreshed all patches. Compile-tested on: ar7 Runtime-tested on: none Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0118-sound-bcm-Fix-memset-dereference-warning.patch')
0 files changed, 0 insertions, 0 deletions
color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#ifndef _BYTESWAP_H_
#define _BYTESWAP_H_

/* Unfortunately not provided by newlib.  */

#include <mini-os/types.h>
static inline uint16_t bswap_16(uint16_t x)
{
    return
    ((((x) & 0xff00) >> 8) | (((x) & 0xff) << 8));
}

static inline uint32_t bswap_32(uint32_t x)
{
    return
    ((((x) & 0xff000000) >> 24) | (((x) & 0x00ff0000) >>  8) |
     (((x) & 0x0000ff00) <<  8) | (((x) & 0x000000ff) << 24));
}

static inline uint64_t bswap_64(uint64_t x)
{
    return
    ((((x) & 0xff00000000000000ULL) >> 56) |
     (((x) & 0x00ff000000000000ULL) >> 40) |
     (((x) & 0x0000ff0000000000ULL) >> 24) |
     (((x) & 0x000000ff00000000ULL) >>  8) |
     (((x) & 0x00000000ff000000ULL) <<  8) |
     (((x) & 0x0000000000ff0000ULL) << 24) |
     (((x) & 0x000000000000ff00ULL) << 40) |
     (((x) & 0x00000000000000ffULL) << 56));
}

#endif /* _BYTESWAP_H */