]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
delete dead code
authorKent Overstreet <kent.overstreet@gmail.com>
Sun, 13 Jan 2019 20:24:51 +0000 (15:24 -0500)
committerKent Overstreet <kent.overstreet@gmail.com>
Sun, 13 Jan 2019 20:24:51 +0000 (15:24 -0500)
include/linux/kernel.h
linux/vsprintf.c [deleted file]

index a281edcf40baa6589e5e56c9e0adf4c0be89dc80..9dc0fef1b89c9412b3b03d93048e90242fb46581 100644 (file)
 
 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d))
 
-#define mult_frac(x, numer, denom)(                    \
-{                                                      \
-       typeof(x) quot = (x) / (denom);                 \
-       typeof(x) rem  = (x) % (denom);                 \
-       (quot * (numer)) + ((rem * (numer)) / (denom)); \
-}                                                      \
-)
-
 #ifndef offsetof
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 #endif
 
 #define might_sleep()
 
-#define NR_CPUS                        32
-
 #define cpu_relax()            do {} while (0)
 #define cpu_relax_lowlatency() do {} while (0)
 
@@ -121,11 +111,6 @@ do {                                                       \
        BUG();                                          \
 } while (0)
 
-unsigned long simple_strtoul(const char *,char **,unsigned int);
-long simple_strtol(const char *,char **,unsigned int);
-unsigned long long simple_strtoull(const char *,char **,unsigned int);
-long long simple_strtoll(const char *,char **,unsigned int);
-
 int __must_check _kstrtoul(const char *s, unsigned int base, unsigned long *res);
 int __must_check _kstrtol(const char *s, unsigned int base, long *res);
 
@@ -213,19 +198,6 @@ static inline int __must_check kstrtos32(const char *s, unsigned int base, s32 *
        return kstrtoint(s, base, res);
 }
 
-/* Permissions on a sysfs file: you didn't miss the 0 prefix did you? */
-#define VERIFY_OCTAL_PERMISSIONS(perms)                                                \
-       (BUILD_BUG_ON_ZERO((perms) < 0) +                                       \
-        BUILD_BUG_ON_ZERO((perms) > 0777) +                                    \
-        /* USER_READABLE >= GROUP_READABLE >= OTHER_READABLE */                \
-        BUILD_BUG_ON_ZERO((((perms) >> 6) & 4) < (((perms) >> 3) & 4)) +       \
-        BUILD_BUG_ON_ZERO((((perms) >> 3) & 4) < ((perms) & 4)) +              \
-        /* USER_WRITABLE >= GROUP_WRITABLE */                                  \
-        BUILD_BUG_ON_ZERO((((perms) >> 6) & 2) < (((perms) >> 3) & 2)) +       \
-        /* OTHER_WRITABLE?  Generally considered a bad idea. */                \
-        BUILD_BUG_ON_ZERO((perms) & 2) +                                       \
-        (perms))
-
 /* The hash is always the low bits of hash_len */
 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  #define HASH_LEN_DECLARE u32 hash; u32 len
diff --git a/linux/vsprintf.c b/linux/vsprintf.c
deleted file mode 100644 (file)
index 1dca320..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#include <stdlib.h>
-
-unsigned long long simple_strtoull(const char *cp, char **endp, unsigned int base)
-{
-       return strtoull(cp, endp, base);
-}
-
-unsigned long simple_strtoul(const char *cp, char **endp, unsigned int base)
-{
-       return strtoul(cp, endp, base);
-}
-
-long long simple_strtoll(const char *cp, char **endp, unsigned int base)
-{
-       return strtoll(cp, endp, base);
-}
-
-long simple_strtol(const char *cp, char **endp, unsigned int base)
-{
-       return strtol(cp, endp, base);
-}