Lines Matching refs:p
64 struct pci_dev *p = d->dev; in insert_dev() local
68 if (p->known_fields & PCI_FILL_PARENT) in insert_dev()
69 parent = find_device(p->parent); in insert_dev()
75 bus = new_bus(parent->bridge, p->domain, p->bus); in insert_dev()
81 if (b->domain == (unsigned)p->domain) in insert_dev()
87 if (!bus && ! (bus = find_bus(b, p->domain, p->bus))) in insert_dev()
91 if (c->domain == (unsigned)p->domain && c->secondary <= p->bus && p->bus <= c->subordinate) in insert_dev()
96 bus = new_bus(b, p->domain, p->bus); in insert_dev()
243 print_it(char *line, char *p) in print_it() argument
245 *p = 0; in print_it()
247 if (p >= line + LINE_BUF_SIZE - 1) in print_it()
250 for (p=line; *p; p++) in print_it()
251 if (*p == '+' || *p == '|') in print_it()
252 *p = '|'; in print_it()
254 *p = ' '; in print_it()
260 tree_printf(char *line, char *p, char *fmt, ...) in tree_printf() argument
263 int space = line + LINE_BUF_SIZE - 1 - p; in tree_printf()
266 return p; in tree_printf()
269 int res = vsnprintf(p, space, fmt, args); in tree_printf()
273 *p = 0; in tree_printf()
274 p += space; in tree_printf()
279 *(p+space-1) = 0; in tree_printf()
280 p += space; in tree_printf()
283 p += res; in tree_printf()
286 return p; in tree_printf()
290 show_tree_dev(struct pci_filter *filter, struct device *d, char *line, char *p) in show_tree_dev() argument
296 p = tree_printf(line, p, "%02x.%x", q->dev, q->func); in show_tree_dev()
301 p = tree_printf(line, p, "-"); in show_tree_dev()
303 p = tree_printf(line, p, "-[%02x]-", b->secondary); in show_tree_dev()
305 p = tree_printf(line, p, "-[%02x-%02x]-", b->secondary, b->subordinate); in show_tree_dev()
306 show_tree_bridge(filter, b, line, p); in show_tree_dev()
310 p = tree_printf(line, p, " %s", in show_tree_dev()
314 print_it(line, p); in show_tree_dev()
372 show_tree_bus(struct pci_filter *filter, struct bus *b, char *line, char *p) in show_tree_bus() argument
375 print_it(line, p); in show_tree_bus()
380 p = tree_printf(line, p, "--"); in show_tree_bus()
381 show_tree_dev(get_filter_for_child(filter, b->first_dev), b->first_dev, line, p); in show_tree_bus()
384 print_it(line, p); in show_tree_bus()
403 char *p2 = tree_printf(line, p, count == 1 ? "--" : count == i+1 ? "\\-" : "+-"); in show_tree_bus()
409 print_it(line, p); in show_tree_bus()
414 show_tree_bridge(struct pci_filter *filter, struct bridge *b, char *line, char *p) in show_tree_bridge() argument
416 *p++ = '-'; in show_tree_bridge()
422 p = tree_printf(line, p, "[%04x:%02x]-", b->first_bus->domain, b->first_bus->number); in show_tree_bridge()
423 show_tree_bus(filter, b->first_bus, line, p); in show_tree_bridge()
426 print_it(line, p); in show_tree_bridge()
446 …k = tree_printf(line, p, count == 1 ? "[%04x:%02x]-" : count == i+1 ? "\\-[%04x:%02x]-" : "+-[%04x… in show_tree_bridge()
452 print_it(line, p); in show_tree_bridge()