git subrepo pull --force deps/lightrec
authorPaul Cercueil <paul@crapouillou.net>
Thu, 24 Feb 2022 18:47:59 +0000 (18:47 +0000)
committerPaul Cercueil <paul@crapouillou.net>
Thu, 24 Feb 2022 18:53:38 +0000 (18:53 +0000)
subrepo:
  subdir:   "deps/lightrec"
  merged:   "d3329782"
upstream:
  origin:   "https://github.com/pcercuei/lightrec.git"
  branch:   "master"
  commit:   "d3329782"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

deps/lightrec/.gitrepo
deps/lightrec/lightrec.c
deps/lightrec/slist.h

index 770ee66..fb3c6d2 100644 (file)
@@ -6,7 +6,7 @@
 [subrepo]
        remote = https://github.com/pcercuei/lightrec.git
        branch = master
-       commit = d90de68429bf9c2d67c5f5051d495d1e3131e636
-       parent = a9725dc07f40b39a5533d546b59e45377d1f9b66
+       commit = d3329782e806b9643239832f59e09d48ebc03d01
+       parent = fc75c5470b8d931ad59d66b27203f02c1d1e674d
        method = merge
        cmdver = 0.4.3
index 3d4e1a2..e83f0e7 100644 (file)
@@ -454,11 +454,14 @@ static void lightrec_mtc0(struct lightrec_state *state, u8 reg, u32 data)
 
 static u32 count_leading_bits(s32 data)
 {
-#if defined(__has_builtin) && __has_builtin(__builtin_clrsb)
-       return 1 + __builtin_clrsb(data);
-#else
        u32 cnt = 33;
 
+#ifdef __has_builtin
+#if __has_builtin(__builtin_clrsb)
+       return 1 + __builtin_clrsb(data);
+#endif
+#endif
+
        data = (data ^ (data >> 31)) << 1;
 
        do {
@@ -467,7 +470,6 @@ static u32 count_leading_bits(s32 data)
        } while (data);
 
        return cnt;
-#endif
 }
 
 static void lightrec_mtc2(struct lightrec_state *state, u8 reg, u32 data)
index ae7e5d3..37557e6 100644 (file)
@@ -6,6 +6,8 @@
 #ifndef __LIGHTREC_SLIST_H__
 #define __LIGHTREC_SLIST_H__
 
+#include <stddef.h>
+
 #define container_of(ptr, type, member)        \
        ((type *)((void *)(ptr) - offsetof(type, member)))