MCPcopy Create free account
hub / github.com/F-Stack/f-stack / check_compatible

Function check_compatible

dpdk/drivers/common/dpaax/dpaa_of.c:280–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280static int
281check_compatible(const struct dt_file *f, const char *compatible)
282{
283 const char *c = (char *)f->buf;
284 unsigned int len, remains = f->len;
285
286 while (remains) {
287 len = strlen(c);
288 if (!strcmp(c, compatible))
289 return 1;
290
291 if (remains < len + 1)
292 break;
293
294 c += (len + 1);
295 remains -= (len + 1);
296 }
297 return 0;
298}
299
300const struct device_node *
301of_find_compatible_node(const struct device_node *from,

Callers 2

of_find_compatible_nodeFunction · 0.85
of_device_is_compatibleFunction · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected