Coverage Report

Created: 2026-12-01 06:27

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/barebox/include/linux/compiler.h
Line
Count
Source
1
/* SPDX-License-Identifier: GPL-2.0 */
2
#ifndef __LINUX_COMPILER_H
3
#define __LINUX_COMPILER_H
4
5
#include <linux/compiler_types.h>
6
7
#ifndef __ASSEMBLY__
8
9
#ifdef __KERNEL__
10
11
/*
12
 * Note: DISABLE_BRANCH_PROFILING can be used by special lowlevel code
13
 * to disable branch tracing on a per file basis.
14
 */
15
#if defined(CONFIG_TRACE_BRANCH_PROFILING) \
16
    && !defined(DISABLE_BRANCH_PROFILING) && !defined(__CHECKER__)
17
void ftrace_likely_update(struct ftrace_likely_data *f, int val,
18
        int expect, int is_constant);
19
20
#define likely_notrace(x) __builtin_expect(!!(x), 1)
21
#define unlikely_notrace(x) __builtin_expect(!!(x), 0)
22
23
#define __branch_check__(x, expect, is_constant) ({     \
24
      long ______r;         \
25
      static struct ftrace_likely_data    \
26
        __attribute__((__aligned__(4)))   \
27
        __attribute__((section("_ftrace_annotated_branch"))) \
28
        ______f = {       \
29
        .data.func = __func__,      \
30
        .data.file = __FILE__,      \
31
        .data.line = __LINE__,      \
32
      };            \
33
      ______r = __builtin_expect(!!(x), expect);  \
34
      ftrace_likely_update(&______f, ______r,   \
35
               expect, is_constant);  \
36
      ______r;          \
37
    })
38
39
/*
40
 * Using __builtin_constant_p(x) to ignore cases where the return
41
 * value is always the same.  This idea is taken from a similar patch
42
 * written by Daniel Walker.
43
 */
44
# ifndef likely
45
#  define likely(x) (__branch_check__(x, 1, __builtin_constant_p(x)))
46
# endif
47
# ifndef unlikely
48
#  define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
49
# endif
50
51
#ifdef CONFIG_PROFILE_ALL_BRANCHES
52
/*
53
 * "Define 'is'", Bill Clinton
54
 * "Define 'if'", Steven Rostedt
55
 */
56
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
57
#define __trace_if(cond) \
58
  if (__builtin_constant_p(!!(cond)) ? !!(cond) :     \
59
  ({                \
60
    int ______r;            \
61
    static struct ftrace_branch_data      \
62
      __attribute__((__aligned__(4)))     \
63
      __attribute__((section("_ftrace_branch")))  \
64
      ______f = {         \
65
        .func = __func__,     \
66
        .file = __FILE__,     \
67
        .line = __LINE__,     \
68
      };            \
69
    ______r = !!(cond);         \
70
    ______f.miss_hit[______r]++;          \
71
    ______r;            \
72
  }))
73
#endif /* CONFIG_PROFILE_ALL_BRANCHES */
74
75
#else
76
13.9M
# define likely(x)  __builtin_expect(!!(x), 1)
77
302M
# define unlikely(x)  __builtin_expect(!!(x), 0)
78
#endif
79
80
/* Optimization barrier */
81
#ifndef barrier
82
# define barrier() __memory_barrier()
83
#endif
84
85
#ifndef barrier_data
86
0
# define barrier_data(ptr) barrier()
87
#endif
88
89
/* workaround for GCC PR82365 if needed */
90
#ifndef barrier_before_unreachable
91
# define barrier_before_unreachable() do { } while (0)
92
#endif
93
94
/* Unreachable code */
95
#ifdef CONFIG_STACK_VALIDATION
96
/*
97
 * These macros help objtool understand GCC code flow for unreachable code.
98
 * The __COUNTER__ based labels are a hack to make each instance of the macros
99
 * unique, to convince GCC not to merge duplicate inline asm statements.
100
 */
101
#define annotate_reachable() ({           \
102
  asm volatile("%c0:\n\t"           \
103
         ".pushsection .discard.reachable\n\t"    \
104
         ".long %c0b - .\n\t"       \
105
         ".popsection\n\t" : : "i" (__COUNTER__));    \
106
})
107
#define annotate_unreachable() ({         \
108
  asm volatile("%c0:\n\t"           \
109
         ".pushsection .discard.unreachable\n\t"    \
110
         ".long %c0b - .\n\t"       \
111
         ".popsection\n\t" : : "i" (__COUNTER__));    \
112
})
113
#define ASM_UNREACHABLE             \
114
  "999:\n\t"              \
115
  ".pushsection .discard.unreachable\n\t"       \
116
  ".long 999b - .\n\t"            \
117
  ".popsection\n\t"
118
#else
119
#define annotate_reachable()
120
#define annotate_unreachable()
121
#endif
122
123
#ifndef ASM_UNREACHABLE
124
# define ASM_UNREACHABLE
125
#endif
126
#ifndef unreachable
127
# define unreachable() do { annotate_reachable(); do { } while (1); } while (0)
128
#endif
129
130
/*
131
 * KENTRY - kernel entry point
132
 * This can be used to annotate symbols (functions or data) that are used
133
 * without their linker symbol being referenced explicitly. For example,
134
 * interrupt vector handlers, or functions in the kernel image that are found
135
 * programatically.
136
 *
137
 * Not required for symbols exported with EXPORT_SYMBOL, or initcalls. Those
138
 * are handled in their own way (with KEEP() in linker scripts).
139
 *
140
 * KENTRY can be avoided if the symbols in question are marked as KEEP() in the
141
 * linker script. For example an architecture could KEEP() its entire
142
 * boot/exception vector code rather than annotate each function and data.
143
 */
144
#ifndef KENTRY
145
# define KENTRY(sym)            \
146
  extern typeof(sym) sym;         \
147
  static const unsigned long __kentry_##sym   \
148
  __used              \
149
  __attribute__((section("___kentry" "+" #sym ), used)) \
150
  = (unsigned long)&sym;
151
#endif
152
153
#ifndef RELOC_HIDE
154
# define RELOC_HIDE(ptr, off)         \
155
  ({ unsigned long __ptr;         \
156
     __ptr = (unsigned long) (ptr);       \
157
    (typeof(ptr)) (__ptr + (off)); })
158
#endif
159
160
#ifndef OPTIMIZER_HIDE_VAR
161
3.74k
#define OPTIMIZER_HIDE_VAR(var) barrier()
162
#endif
163
164
/* Not-quite-unique ID. */
165
#ifndef __UNIQUE_ID
166
# define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __LINE__)
167
#endif
168
169
#include <linux/types.h>
170
171
#endif /* __KERNEL__ */
172
173
/**
174
 * offset_to_ptr - convert a relative memory offset to an absolute pointer
175
 * @off:  the address of the 32-bit offset value
176
 */
177
static inline void *offset_to_ptr(const int *off)
178
0
{
179
0
  return (void *)((unsigned long)off + *off);
180
0
}
Unexecuted instantiation: memory.c:offset_to_ptr
Unexecuted instantiation: structio.c:offset_to_ptr
Unexecuted instantiation: memory_display.c:offset_to_ptr
Unexecuted instantiation: clock.c:offset_to_ptr
Unexecuted instantiation: console_common.c:offset_to_ptr
Unexecuted instantiation: deep-probe.c:offset_to_ptr
Unexecuted instantiation: startup.c:offset_to_ptr
Unexecuted instantiation: misc.c:offset_to_ptr
Unexecuted instantiation: resource.c:offset_to_ptr
Unexecuted instantiation: restart.c:offset_to_ptr
Unexecuted instantiation: poweroff.c:offset_to_ptr
Unexecuted instantiation: slice.c:offset_to_ptr
Unexecuted instantiation: workqueue.c:offset_to_ptr
Unexecuted instantiation: complete.c:offset_to_ptr
Unexecuted instantiation: version.c:offset_to_ptr
Unexecuted instantiation: binfmt.c:offset_to_ptr
Unexecuted instantiation: block.c:offset_to_ptr
Unexecuted instantiation: bootm.c:offset_to_ptr
Unexecuted instantiation: booti.c:offset_to_ptr
Unexecuted instantiation: bootm-overrides.c:offset_to_ptr
Unexecuted instantiation: s_record.c:offset_to_ptr
Unexecuted instantiation: memtest.c:offset_to_ptr
Unexecuted instantiation: command.c:offset_to_ptr
Unexecuted instantiation: console.c:offset_to_ptr
Unexecuted instantiation: console_ctrlc.c:offset_to_ptr
Unexecuted instantiation: console_countdown.c:offset_to_ptr
Unexecuted instantiation: environment.c:offset_to_ptr
Unexecuted instantiation: envfs-core.c:offset_to_ptr
Unexecuted instantiation: env.c:offset_to_ptr
Unexecuted instantiation: bootargs.c:offset_to_ptr
Unexecuted instantiation: globalvar.c:offset_to_ptr
Unexecuted instantiation: date.c:offset_to_ptr
Unexecuted instantiation: malloc.c:offset_to_ptr
Unexecuted instantiation: meminfo.c:offset_to_ptr
Unexecuted instantiation: menu.c:offset_to_ptr
Unexecuted instantiation: oftree.c:offset_to_ptr
Unexecuted instantiation: partitions.c:offset_to_ptr
Unexecuted instantiation: dos.c:offset_to_ptr
Unexecuted instantiation: efi.c:offset_to_ptr
Unexecuted instantiation: sched.c:offset_to_ptr
Unexecuted instantiation: poller.c:offset_to_ptr
Unexecuted instantiation: reset_source.c:offset_to_ptr
Unexecuted instantiation: hush.c:offset_to_ptr
Unexecuted instantiation: state.c:offset_to_ptr
Unexecuted instantiation: state_variables.c:offset_to_ptr
Unexecuted instantiation: backend_format_dtb.c:offset_to_ptr
Unexecuted instantiation: backend_format_raw.c:offset_to_ptr
Unexecuted instantiation: backend_storage.c:offset_to_ptr
Unexecuted instantiation: backend_bucket_direct.c:offset_to_ptr
Unexecuted instantiation: backend_bucket_circular.c:offset_to_ptr
Unexecuted instantiation: state_fuzz.c:offset_to_ptr
Unexecuted instantiation: parser.c:offset_to_ptr
Unexecuted instantiation: bus.c:offset_to_ptr
Unexecuted instantiation: register.c:offset_to_ptr
Unexecuted instantiation: drv.c:offset_to_ptr
Unexecuted instantiation: barebox.c:offset_to_ptr
Unexecuted instantiation: uimage_types.c:offset_to_ptr
Unexecuted instantiation: uimage.c:offset_to_ptr
Unexecuted instantiation: bootm-uimage.c:offset_to_ptr
Unexecuted instantiation: image-fit.c:offset_to_ptr
Unexecuted instantiation: bootm-fit.c:offset_to_ptr
Unexecuted instantiation: menutree.c:offset_to_ptr
Unexecuted instantiation: imd.c:offset_to_ptr
Unexecuted instantiation: file-list.c:offset_to_ptr
Unexecuted instantiation: firmware.c:offset_to_ptr
Unexecuted instantiation: boot.c:offset_to_ptr
Unexecuted instantiation: bootscan.c:offset_to_ptr
Unexecuted instantiation: fastboot.c:offset_to_ptr
Unexecuted instantiation: memsize.c:offset_to_ptr
Unexecuted instantiation: bootsource.c:offset_to_ptr
Unexecuted instantiation: ddr_spd.c:offset_to_ptr
Unexecuted instantiation: ddr1_dimm_params.c:offset_to_ptr
Unexecuted instantiation: ddr2_dimm_params.c:offset_to_ptr
Unexecuted instantiation: ddr3_dimm_params.c:offset_to_ptr
Unexecuted instantiation: ddr4_dimm_params.c:offset_to_ptr
Unexecuted instantiation: filetype.c:offset_to_ptr
Unexecuted instantiation: driver.c:offset_to_ptr
Unexecuted instantiation: platform.c:offset_to_ptr
Unexecuted instantiation: class.c:offset_to_ptr
Unexecuted instantiation: regmap.c:offset_to_ptr
Unexecuted instantiation: regmap-multi.c:offset_to_ptr
Unexecuted instantiation: regmap-mmio.c:offset_to_ptr
Unexecuted instantiation: featctrl.c:offset_to_ptr
Unexecuted instantiation: ramdisk.c:offset_to_ptr
Unexecuted instantiation: linux_console.c:offset_to_ptr
Unexecuted instantiation: spi-nor.c:offset_to_ptr
Unexecuted instantiation: m25p80.c:offset_to_ptr
Unexecuted instantiation: core.c:offset_to_ptr
Unexecuted instantiation: partition.c:offset_to_ptr
Unexecuted instantiation: peb.c:offset_to_ptr
Unexecuted instantiation: mtdoob.c:offset_to_ptr
Unexecuted instantiation: usb.c:offset_to_ptr
Unexecuted instantiation: hub.c:offset_to_ptr
Unexecuted instantiation: common.c:offset_to_ptr
Unexecuted instantiation: of.c:offset_to_ptr
Unexecuted instantiation: spi.c:offset_to_ptr
Unexecuted instantiation: spi-mem.c:offset_to_ptr
Unexecuted instantiation: gpio_spi.c:offset_to_ptr
Unexecuted instantiation: i2c-gpio.c:offset_to_ptr
Unexecuted instantiation: i2c.c:offset_to_ptr
Unexecuted instantiation: i2c-smbus.c:offset_to_ptr
Unexecuted instantiation: i2c-algo-bit.c:offset_to_ptr
Unexecuted instantiation: fb.c:offset_to_ptr
Unexecuted instantiation: mode-helpers.c:offset_to_ptr
Unexecuted instantiation: drm_modes.c:offset_to_ptr
Unexecuted instantiation: of_display_timing.c:offset_to_ptr
Unexecuted instantiation: fbconsole.c:offset_to_ptr
Unexecuted instantiation: wrpll-cln28hpc.c:offset_to_ptr
Unexecuted instantiation: syscon.c:offset_to_ptr
Unexecuted instantiation: led-gpio.c:offset_to_ptr
Unexecuted instantiation: led-triggers.c:offset_to_ptr
Unexecuted instantiation: at25.c:offset_to_ptr
Unexecuted instantiation: at24.c:offset_to_ptr
Unexecuted instantiation: mem.c:offset_to_ptr
Unexecuted instantiation: ubootvar.c:offset_to_ptr
Unexecuted instantiation: layouts.c:offset_to_ptr
Unexecuted instantiation: rmem.c:offset_to_ptr
Unexecuted instantiation: map.c:offset_to_ptr
Unexecuted instantiation: wd_core.c:offset_to_ptr
Unexecuted instantiation: gpiolib.c:offset_to_ptr
Unexecuted instantiation: dev-random.c:offset_to_ptr
Unexecuted instantiation: address.c:offset_to_ptr
Unexecuted instantiation: base.c:offset_to_ptr
Unexecuted instantiation: fdt.c:offset_to_ptr
Unexecuted instantiation: of_path.c:offset_to_ptr
Unexecuted instantiation: device.c:offset_to_ptr
Unexecuted instantiation: mem_generic.c:offset_to_ptr
Unexecuted instantiation: of_gpio.c:offset_to_ptr
Unexecuted instantiation: of_net.c:offset_to_ptr
Unexecuted instantiation: reserved-mem.c:offset_to_ptr
Unexecuted instantiation: of_mtd.c:offset_to_ptr
Unexecuted instantiation: overlay.c:offset_to_ptr
Unexecuted instantiation: resolver.c:offset_to_ptr
Unexecuted instantiation: of_firmware.c:offset_to_ptr
Unexecuted instantiation: ti-sysc.c:offset_to_ptr
Unexecuted instantiation: rtc-lib.c:offset_to_ptr
Unexecuted instantiation: nvmem.c:offset_to_ptr
Unexecuted instantiation: rtc-ds1307.c:offset_to_ptr
Unexecuted instantiation: reboot-mode.c:offset_to_ptr
Unexecuted instantiation: syscon-reboot-mode.c:offset_to_ptr
Unexecuted instantiation: nvmem-reboot-mode.c:offset_to_ptr
Unexecuted instantiation: synth.c:offset_to_ptr
Unexecuted instantiation: stddev.c:offset_to_ptr
Unexecuted instantiation: digest.c:offset_to_ptr
Unexecuted instantiation: hashsum.c:offset_to_ptr
Unexecuted instantiation: loadb.c:offset_to_ptr
Unexecuted instantiation: loadxy.c:offset_to_ptr
Unexecuted instantiation: loads.c:offset_to_ptr
Unexecuted instantiation: echo.c:offset_to_ptr
Unexecuted instantiation: md.c:offset_to_ptr
Unexecuted instantiation: mm.c:offset_to_ptr
Unexecuted instantiation: mw.c:offset_to_ptr
Unexecuted instantiation: memcmp.c:offset_to_ptr
Unexecuted instantiation: memcpy.c:offset_to_ptr
Unexecuted instantiation: memset.c:offset_to_ptr
Unexecuted instantiation: edit.c:offset_to_ptr
Unexecuted instantiation: sleep.c:offset_to_ptr
Unexecuted instantiation: msleep.c:offset_to_ptr
Unexecuted instantiation: reset.c:offset_to_ptr
Unexecuted instantiation: go.c:offset_to_ptr
Unexecuted instantiation: ls.c:offset_to_ptr
Unexecuted instantiation: tree.c:offset_to_ptr
Unexecuted instantiation: cd.c:offset_to_ptr
Unexecuted instantiation: pwd.c:offset_to_ptr
Unexecuted instantiation: mkdir.c:offset_to_ptr
Unexecuted instantiation: rmdir.c:offset_to_ptr
Unexecuted instantiation: cp.c:offset_to_ptr
Unexecuted instantiation: rm.c:offset_to_ptr
Unexecuted instantiation: cat.c:offset_to_ptr
Unexecuted instantiation: mount.c:offset_to_ptr
Unexecuted instantiation: umount.c:offset_to_ptr
Unexecuted instantiation: crc.c:offset_to_ptr
Unexecuted instantiation: clear.c:offset_to_ptr
Unexecuted instantiation: test.c:offset_to_ptr
Unexecuted instantiation: flash.c:offset_to_ptr
Unexecuted instantiation: timeout.c:offset_to_ptr
Unexecuted instantiation: readline.c:offset_to_ptr
Unexecuted instantiation: setenv.c:offset_to_ptr
Unexecuted instantiation: export.c:offset_to_ptr
Unexecuted instantiation: printenv.c:offset_to_ptr
Unexecuted instantiation: saveenv.c:offset_to_ptr
Unexecuted instantiation: loadenv.c:offset_to_ptr
Unexecuted instantiation: true.c:offset_to_ptr
Unexecuted instantiation: false.c:offset_to_ptr
Unexecuted instantiation: bfetch.c:offset_to_ptr
Unexecuted instantiation: help.c:offset_to_ptr
Unexecuted instantiation: splash.c:offset_to_ptr
Unexecuted instantiation: fbtest.c:offset_to_ptr
Unexecuted instantiation: beep.c:offset_to_ptr
Unexecuted instantiation: gpio.c:offset_to_ptr
Unexecuted instantiation: uncompress.c:offset_to_ptr
Unexecuted instantiation: passwd.c:offset_to_ptr
Unexecuted instantiation: login.c:offset_to_ptr
Unexecuted instantiation: led.c:offset_to_ptr
Unexecuted instantiation: wd.c:offset_to_ptr
Unexecuted instantiation: trigger.c:offset_to_ptr
Unexecuted instantiation: time.c:offset_to_ptr
Unexecuted instantiation: uptime.c:offset_to_ptr
Unexecuted instantiation: of_diff.c:offset_to_ptr
Unexecuted instantiation: of_property.c:offset_to_ptr
Unexecuted instantiation: of_node.c:offset_to_ptr
Unexecuted instantiation: of_dump.c:offset_to_ptr
Unexecuted instantiation: of_display_timings.c:offset_to_ptr
Unexecuted instantiation: of_fixup_status.c:offset_to_ptr
Unexecuted instantiation: of_overlay.c:offset_to_ptr
Unexecuted instantiation: magicvar.c:offset_to_ptr
Unexecuted instantiation: iomemport.c:offset_to_ptr
Unexecuted instantiation: linux_exec.c:offset_to_ptr
Unexecuted instantiation: automount.c:offset_to_ptr
Unexecuted instantiation: global.c:offset_to_ptr
Unexecuted instantiation: dmesg.c:offset_to_ptr
Unexecuted instantiation: basename.c:offset_to_ptr
Unexecuted instantiation: dirname.c:offset_to_ptr
Unexecuted instantiation: readlink.c:offset_to_ptr
Unexecuted instantiation: let.c:offset_to_ptr
Unexecuted instantiation: ln.c:offset_to_ptr
Unexecuted instantiation: keystore.c:offset_to_ptr
Unexecuted instantiation: tftp.c:offset_to_ptr
Unexecuted instantiation: detect.c:offset_to_ptr
Unexecuted instantiation: devinfo.c:offset_to_ptr
Unexecuted instantiation: drvinfo.c:offset_to_ptr
Unexecuted instantiation: readf.c:offset_to_ptr
Unexecuted instantiation: 2048.c:offset_to_ptr
Unexecuted instantiation: hwclock.c:offset_to_ptr
Unexecuted instantiation: cmp.c:offset_to_ptr
Unexecuted instantiation: nv.c:offset_to_ptr
Unexecuted instantiation: defaultenv.c:offset_to_ptr
Unexecuted instantiation: dhcp.c:offset_to_ptr
Unexecuted instantiation: dhrystone.c:offset_to_ptr
Unexecuted instantiation: spd_decode.c:offset_to_ptr
Unexecuted instantiation: seed.c:offset_to_ptr
Unexecuted instantiation: ip-route-get.c:offset_to_ptr
Unexecuted instantiation: fuzz.c:offset_to_ptr
Unexecuted instantiation: tutorial.c:offset_to_ptr
Unexecuted instantiation: host.c:offset_to_ptr
Unexecuted instantiation: bobject.c:offset_to_ptr
Unexecuted instantiation: bcd.c:offset_to_ptr
Unexecuted instantiation: term.c:offset_to_ptr
Unexecuted instantiation: rbtree.c:offset_to_ptr
Unexecuted instantiation: display_options.c:offset_to_ptr
Unexecuted instantiation: string.c:offset_to_ptr
Unexecuted instantiation: string_helpers.c:offset_to_ptr
Unexecuted instantiation: strtox.c:offset_to_ptr
Unexecuted instantiation: kstrtox.c:offset_to_ptr
Unexecuted instantiation: vsprintf.c:offset_to_ptr
Unexecuted instantiation: talloc.c:offset_to_ptr
Unexecuted instantiation: parameter.c:offset_to_ptr
Unexecuted instantiation: xfuncs.c:offset_to_ptr
Unexecuted instantiation: getopt.c:offset_to_ptr
Unexecuted instantiation: readkey.c:offset_to_ptr
Unexecuted instantiation: kfifo.c:offset_to_ptr
Unexecuted instantiation: libbb.c:offset_to_ptr
Unexecuted instantiation: libgen.c:offset_to_ptr
Unexecuted instantiation: jsmn.c:offset_to_ptr
Unexecuted instantiation: stringlist.c:offset_to_ptr
Unexecuted instantiation: scatterlist.c:offset_to_ptr
Unexecuted instantiation: cmdlinepart.c:offset_to_ptr
Unexecuted instantiation: recursive_action.c:offset_to_ptr
Unexecuted instantiation: make_directory.c:offset_to_ptr
Unexecuted instantiation: arith.c:offset_to_ptr
Unexecuted instantiation: idr.c:offset_to_ptr
Unexecuted instantiation: iov_iter.c:offset_to_ptr
Unexecuted instantiation: div64.c:offset_to_ptr
Unexecuted instantiation: int_pow.c:offset_to_ptr
Unexecuted instantiation: int_sqrt.c:offset_to_ptr
Unexecuted instantiation: rational.c:offset_to_ptr
Unexecuted instantiation: uuid.c:offset_to_ptr
Unexecuted instantiation: xxhash.c:offset_to_ptr
Unexecuted instantiation: decompress_bunzip2.c:offset_to_ptr
Unexecuted instantiation: decompress_inflate.c:offset_to_ptr
Unexecuted instantiation: inffast.c:offset_to_ptr
Unexecuted instantiation: inflate.c:offset_to_ptr
Unexecuted instantiation: inftrees.c:offset_to_ptr
Unexecuted instantiation: decompress_unxz.c:offset_to_ptr
Unexecuted instantiation: xz_crc32.c:offset_to_ptr
Unexecuted instantiation: xz_dec_bcj.c:offset_to_ptr
Unexecuted instantiation: xz_dec_lzma2.c:offset_to_ptr
Unexecuted instantiation: xz_dec_stream.c:offset_to_ptr
Unexecuted instantiation: fnmatch.c:offset_to_ptr
Unexecuted instantiation: find_next_bit.c:offset_to_ptr
Unexecuted instantiation: find_last_bit.c:offset_to_ptr
Unexecuted instantiation: glob.c:offset_to_ptr
Unexecuted instantiation: notifier.c:offset_to_ptr
Unexecuted instantiation: random.c:offset_to_ptr
Unexecuted instantiation: image-sparse.c:offset_to_ptr
Unexecuted instantiation: lzo1x_decompress_safe.c:offset_to_ptr
Unexecuted instantiation: lz4_decompress.c:offset_to_ptr
Unexecuted instantiation: huf_decompress.c:offset_to_ptr
Unexecuted instantiation: decompress.c:offset_to_ptr
Unexecuted instantiation: entropy_common.c:offset_to_ptr
Unexecuted instantiation: fse_decompress.c:offset_to_ptr
Unexecuted instantiation: zstd_common.c:offset_to_ptr
Unexecuted instantiation: show_progress.c:offset_to_ptr
Unexecuted instantiation: decompress_unlzo.c:offset_to_ptr
Unexecuted instantiation: decompress_unlz4.c:offset_to_ptr
Unexecuted instantiation: decompress_unzstd.c:offset_to_ptr
Unexecuted instantiation: process_escape_sequence.c:offset_to_ptr
Unexecuted instantiation: base64.c:offset_to_ptr
Unexecuted instantiation: qsort.c:offset_to_ptr
Unexecuted instantiation: bmp.c:offset_to_ptr
Unexecuted instantiation: image_renderer.c:offset_to_ptr
Unexecuted instantiation: graphic_utils.c:offset_to_ptr
Unexecuted instantiation: 2d-primitives.c:offset_to_ptr
Unexecuted instantiation: xymodem.c:offset_to_ptr
Unexecuted instantiation: unlink-recursive.c:offset_to_ptr
Unexecuted instantiation: ucs2_string.c:offset_to_ptr
Unexecuted instantiation: wchar.c:offset_to_ptr
Unexecuted instantiation: libfile.c:offset_to_ptr
Unexecuted instantiation: loadable.c:offset_to_ptr
Unexecuted instantiation: loadable-mem.c:offset_to_ptr
Unexecuted instantiation: loadable-file.c:offset_to_ptr
Unexecuted instantiation: loadable-compressed.c:offset_to_ptr
Unexecuted instantiation: bitmap.c:offset_to_ptr
Unexecuted instantiation: gcd.c:offset_to_ptr
Unexecuted instantiation: bsearch.c:offset_to_ptr
Unexecuted instantiation: fonts.c:offset_to_ptr
Unexecuted instantiation: font_8x16.c:offset_to_ptr
Unexecuted instantiation: font_7x14.c:offset_to_ptr
Unexecuted instantiation: font_mini_4x6.c:offset_to_ptr
Unexecuted instantiation: list_debug.c:offset_to_ptr
Unexecuted instantiation: list_sort.c:offset_to_ptr
Unexecuted instantiation: refcount.c:offset_to_ptr
Unexecuted instantiation: parseopt.c:offset_to_ptr
Unexecuted instantiation: clz_ctz.c:offset_to_ptr
Unexecuted instantiation: charset.c:offset_to_ptr
Unexecuted instantiation: ctype.c:offset_to_ptr
Unexecuted instantiation: stackprot.c:offset_to_ptr
Unexecuted instantiation: hexdump.c:offset_to_ptr
Unexecuted instantiation: jwt.c:offset_to_ptr
Unexecuted instantiation: password.c:offset_to_ptr
Unexecuted instantiation: hmac.c:offset_to_ptr
Unexecuted instantiation: md5.c:offset_to_ptr
Unexecuted instantiation: sha1.c:offset_to_ptr
Unexecuted instantiation: sha2.c:offset_to_ptr
Unexecuted instantiation: sha4.c:offset_to_ptr
Unexecuted instantiation: pbkdf2.c:offset_to_ptr
Unexecuted instantiation: rsa.c:offset_to_ptr
Unexecuted instantiation: public-keys.c:offset_to_ptr
Unexecuted instantiation: crc32.c:offset_to_ptr
Unexecuted instantiation: memneq.c:offset_to_ptr
Unexecuted instantiation: lib.c:offset_to_ptr
Unexecuted instantiation: eth.c:offset_to_ptr
Unexecuted instantiation: skbuff.c:offset_to_ptr
Unexecuted instantiation: net.c:offset_to_ptr
Unexecuted instantiation: sntp.c:offset_to_ptr
Unexecuted instantiation: ping.c:offset_to_ptr
Unexecuted instantiation: dns.c:offset_to_ptr
Unexecuted instantiation: ifup.c:offset_to_ptr
Unexecuted instantiation: cramfs.c:offset_to_ptr
Unexecuted instantiation: ext4fs.c:offset_to_ptr
Unexecuted instantiation: ext4_common.c:offset_to_ptr
Unexecuted instantiation: ext_barebox.c:offset_to_ptr
Unexecuted instantiation: ramfs.c:offset_to_ptr
Unexecuted instantiation: devfs-core.c:offset_to_ptr
Unexecuted instantiation: legacy.c:offset_to_ptr
Unexecuted instantiation: devfs.c:offset_to_ptr
Unexecuted instantiation: fs.c:offset_to_ptr
Unexecuted instantiation: libfs.c:offset_to_ptr
Unexecuted instantiation: fs-fuzz.c:offset_to_ptr
Unexecuted instantiation: netfs.c:offset_to_ptr
Unexecuted instantiation: compr.c:offset_to_ptr
Unexecuted instantiation: dir.c:offset_to_ptr
Unexecuted instantiation: nodelist.c:offset_to_ptr
Unexecuted instantiation: read.c:offset_to_ptr
Unexecuted instantiation: readinode.c:offset_to_ptr
Unexecuted instantiation: scan.c:offset_to_ptr
Unexecuted instantiation: build.c:offset_to_ptr
Unexecuted instantiation: super.c:offset_to_ptr
Unexecuted instantiation: debug.c:offset_to_ptr
Unexecuted instantiation: nfs.c:offset_to_ptr
Unexecuted instantiation: bpkfs.c:offset_to_ptr
Unexecuted instantiation: uimagefs.c:offset_to_ptr
Unexecuted instantiation: squashfs.c:offset_to_ptr
Unexecuted instantiation: cache.c:offset_to_ptr
Unexecuted instantiation: decompressor.c:offset_to_ptr
Unexecuted instantiation: decompressor_single.c:offset_to_ptr
Unexecuted instantiation: file.c:offset_to_ptr
Unexecuted instantiation: file_cache.c:offset_to_ptr
Unexecuted instantiation: fragment.c:offset_to_ptr
Unexecuted instantiation: id.c:offset_to_ptr
Unexecuted instantiation: inode.c:offset_to_ptr
Unexecuted instantiation: namei.c:offset_to_ptr
Unexecuted instantiation: symlink.c:offset_to_ptr
Unexecuted instantiation: xz_wrapper.c:offset_to_ptr
Unexecuted instantiation: lzo_wrapper.c:offset_to_ptr
Unexecuted instantiation: lz4_wrapper.c:offset_to_ptr
Unexecuted instantiation: zlib_wrapper.c:offset_to_ptr
Unexecuted instantiation: zstd_wrapper.c:offset_to_ptr
Unexecuted instantiation: ubootvarfs.c:offset_to_ptr
Unexecuted instantiation: fat.c:offset_to_ptr
Unexecuted instantiation: ff.c:offset_to_ptr
Unexecuted instantiation: fat-diskio.c:offset_to_ptr
Unexecuted instantiation: io-ports.c:offset_to_ptr
Unexecuted instantiation: board.c:offset_to_ptr
Unexecuted instantiation: hostfile.c:offset_to_ptr
Unexecuted instantiation: devices.c:offset_to_ptr
Unexecuted instantiation: dtb.c:offset_to_ptr
Unexecuted instantiation: power.c:offset_to_ptr
Unexecuted instantiation: watchdog.c:offset_to_ptr
Unexecuted instantiation: cpuinfo.c:offset_to_ptr
Unexecuted instantiation: pe.c:offset_to_ptr
Unexecuted instantiation: snakeoil_rsa4096.pem.c:offset_to_ptr
Unexecuted instantiation: handoff-data.c:offset_to_ptr
Unexecuted instantiation: imd-barebox.c:offset_to_ptr
Unexecuted instantiation: fat-pbl.c:offset_to_ptr
Unexecuted instantiation: sha.c:offset_to_ptr
181
182
#endif /* __ASSEMBLY__ */
183
184
#ifndef __optimize
185
# define __optimize(level)
186
#endif
187
188
/* Compile time object size, -1 for unknown */
189
#ifndef __compiletime_object_size
190
# define __compiletime_object_size(obj) -1
191
#endif
192
#ifndef __compiletime_warning
193
# define __compiletime_warning(message)
194
#endif
195
#ifndef __compiletime_error
196
# define __compiletime_error(message)
197
/*
198
 * Sparse complains of variable sized arrays due to the temporary variable in
199
 * __compiletime_assert. Unfortunately we can't just expand it out to make
200
 * sparse see a constant array size without breaking compiletime_assert on old
201
 * versions of GCC (e.g. 4.2.4), so hide the array from sparse altogether.
202
 */
203
# ifndef __CHECKER__
204
#  define __compiletime_error_fallback(condition) \
205
5.92M
  do { ((void)sizeof(char[1 - 2 * condition])); } while (0)
206
# endif
207
#endif
208
#ifndef __compiletime_error_fallback
209
# define __compiletime_error_fallback(condition) do { } while (0)
210
#endif
211
212
#ifdef __OPTIMIZE__
213
# define __compiletime_assert(condition, msg, prefix, suffix)   \
214
5.92M
  do {               \
215
23.6M
    int __cond = !(condition);        \
216
5.92M
    extern void prefix ## suffix(void) __compiletime_error(msg); \
217
5.92M
    if (__cond)           \
218
5.92M
      prefix ## suffix();       \
219
5.92M
    __compiletime_error_fallback(__cond);     \
220
5.92M
  } while (0)
221
#else
222
# define __compiletime_assert(condition, msg, prefix, suffix) do { } while (0)
223
#endif
224
225
#define _compiletime_assert(condition, msg, prefix, suffix) \
226
5.92M
  __compiletime_assert(condition, msg, prefix, suffix)
227
228
/**
229
 * compiletime_assert - break build and emit msg if condition is false
230
 * @condition: a compile-time constant condition to check
231
 * @msg:       a message to emit if condition is false
232
 *
233
 * In tradition of POSIX assert, this macro will break the build if the
234
 * supplied condition is *false*, emitting the supplied error message if the
235
 * compiler has support to do so.
236
 */
237
#define compiletime_assert(condition, msg) \
238
5.92M
  _compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
239
240
#define compiletime_assert_atomic_type(t)       \
241
  compiletime_assert(__native_word(t),        \
242
    "Need native word sized stores/loads for atomicity.")
243
244
#endif /* __LINUX_COMPILER_H */