Lines Matching refs:endp

54 #define is_contained(var, endp)				\  argument
55 (sizeof(*var) <= (endp) - (void *)(var))
56 #define has_headroom(ptr, headroom, endp) \ argument
57 ((headroom) <= (endp) - (void *)(ptr))
58 #define is_contained_with_headroom(var, headroom, endp) \ argument
59 (sizeof(*var) + (headroom) <= (endp) - (void *)(var))
64 const void *endp) in ccs_data_parse_length_specifier() argument
68 if (!is_contained(__len, endp)) in ccs_data_parse_length_specifier()
80 if (!is_contained(__len2, endp)) in ccs_data_parse_length_specifier()
93 if (!is_contained(__len3, endp)) in ccs_data_parse_length_specifier()
107 if (!has_headroom(__len, hlen + plen, endp)) in ccs_data_parse_length_specifier()
133 const void *payload, const void *endp) in ccs_data_parse_version() argument
138 if (v + 1 != endp) in ccs_data_parse_version()
175 const void *endp, struct device *dev, in ccs_data_block_parse_header() argument
182 if (!is_contained(block, endp)) in ccs_data_block_parse_header()
186 endp); in ccs_data_block_parse_header()
197 if (!has_headroom(&block->length, hlen + plen, endp)) in ccs_data_block_parse_header()
215 const void *endp, struct device *dev) in ccs_data_parse_regs() argument
227 while (payload < endp && num_regs < INT_MAX) { in ccs_data_parse_regs()
232 if (!is_contained(r, endp)) in ccs_data_parse_regs()
241 if (!is_contained_with_headroom(r, len, endp)) in ccs_data_parse_regs()
249 if (!is_contained(r2, endp)) in ccs_data_parse_regs()
258 if (!is_contained_with_headroom(r2, len, endp)) in ccs_data_parse_regs()
267 if (!is_contained(r3, endp)) in ccs_data_parse_regs()
273 if (!is_contained_with_headroom(r3, len, endp)) in ccs_data_parse_regs()
325 const void *endp, struct device *dev) in ccs_data_parse_reg_rules() argument
330 return ccs_data_parse_regs(bin, NULL, NULL, payload, endp, dev); in ccs_data_parse_reg_rules()
332 rval = ccs_data_parse_regs(bin, NULL, __num_regs, payload, endp, dev); in ccs_data_parse_reg_rules()
336 return ccs_data_parse_regs(bin, __regs, __num_regs, payload, endp, in ccs_data_parse_reg_rules()
350 const void *endp, struct device *dev) in ccs_data_parse_ffd() argument
356 if (!is_contained(__ffd, endp)) in ccs_data_parse_ffd()
362 sizeof(struct __ccs_data_block_ffd_entry) != endp) in ccs_data_parse_ffd()
399 if (__entry != endp) in ccs_data_parse_ffd()
408 const void *endp, struct device *dev) in ccs_data_parse_pdaf_readout() argument
412 if (!is_contained(__pdaf, endp)) in ccs_data_parse_pdaf_readout()
427 __pdaf + 1, endp, dev); in ccs_data_parse_pdaf_readout()
433 const void *endp, struct device *dev) in ccs_data_parse_rules() argument
447 while (__next_rule < endp) { in ccs_data_parse_rules()
454 &rule_plen, endp); in ccs_data_parse_rules()
461 if (!is_contained(__rule_type, endp)) in ccs_data_parse_rules()
578 const void *payload, const void *endp, in ccs_data_parse_pdaf() argument
589 if (!is_contained(__pdaf, endp)) in ccs_data_parse_pdaf()
636 if (!is_contained(__bdesc_group, endp)) in ccs_data_parse_pdaf()
667 if (!is_contained(__bdesc, endp)) in ccs_data_parse_pdaf()
709 if (!is_contained(__num_pixel_descs, endp)) in ccs_data_parse_pdaf()
731 if (!is_contained(__pixel_desc, endp)) in ccs_data_parse_pdaf()
755 const void *payload, const void *endp) in ccs_data_parse_license() argument
757 size_t size = endp - payload; in ccs_data_parse_license()
777 static int ccs_data_parse_end(bool *end, const void *payload, const void *endp, in ccs_data_parse_end() argument
782 if (__end + 1 != endp) { in ccs_data_parse_end()
784 (unsigned int)(endp - payload)); in ccs_data_parse_end()
799 const struct __ccs_data_block *endp = data + len; in __ccs_data_parse() local
816 while (block < endp) { in __ccs_data_parse()
822 &payload, &next_block, endp, in __ccs_data_parse()