Lines Matching defs:ptr
86 * PTR_IF - evaluate to @ptr if @cond is true, or to NULL otherwise.
88 * @ptr: A pointer to assign if @cond is true.
90 * PTR_IF(IS_ENABLED(CONFIG_FOO), ptr) evaluates to @ptr if CONFIG_FOO is set
91 * to 'y' or 'm', or to NULL otherwise. The @ptr argument must be a pointer.
136 #define PTR_IF(cond, ptr) ((cond) ? (ptr) : NULL)
152 * is_insidevar - check if the @ptr points inside the @var memory range.
153 * @ptr: the pointer to a memory address.
156 * Evaluates to true if the address in @ptr lies within the memory
159 #define is_insidevar(ptr, var) \
160 ((uintptr_t)(ptr) >= (uintptr_t)(var) && \
161 (uintptr_t)(ptr) < (uintptr_t)(var) + sizeof(var))