Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: fbdev: Convert to using %pOF instead of full_name

Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Rob Herring and committed by
Bartlomiej Zolnierkiewicz
6d7e6533 376b3ff5

+44 -55
+2 -2
drivers/video/fbdev/bw2.c
··· 333 333 334 334 dev_set_drvdata(&op->dev, info); 335 335 336 - printk(KERN_INFO "%s: bwtwo at %lx:%lx\n", 337 - dp->full_name, par->which_io, info->fix.smem_start); 336 + printk(KERN_INFO "%pOF: bwtwo at %lx:%lx\n", 337 + dp, par->which_io, info->fix.smem_start); 338 338 339 339 return 0; 340 340
+2 -2
drivers/video/fbdev/cg14.c
··· 553 553 554 554 dev_set_drvdata(&op->dev, info); 555 555 556 - printk(KERN_INFO "%s: cgfourteen at %lx:%lx, %dMB\n", 557 - dp->full_name, 556 + printk(KERN_INFO "%pOF: cgfourteen at %lx:%lx, %dMB\n", 557 + dp, 558 558 par->iospace, info->fix.smem_start, 559 559 par->ramsize >> 20); 560 560
+2 -2
drivers/video/fbdev/cg3.c
··· 412 412 413 413 dev_set_drvdata(&op->dev, info); 414 414 415 - printk(KERN_INFO "%s: cg3 at %lx:%lx\n", 416 - dp->full_name, par->which_io, info->fix.smem_start); 415 + printk(KERN_INFO "%pOF: cg3 at %lx:%lx\n", 416 + dp, par->which_io, info->fix.smem_start); 417 417 418 418 return 0; 419 419
+2 -2
drivers/video/fbdev/cg6.c
··· 810 810 811 811 dev_set_drvdata(&op->dev, info); 812 812 813 - printk(KERN_INFO "%s: CGsix [%s] at %lx:%lx\n", 814 - dp->full_name, info->fix.id, 813 + printk(KERN_INFO "%pOF: CGsix [%s] at %lx:%lx\n", 814 + dp, info->fix.id, 815 815 par->which_io, info->fix.smem_start); 816 816 817 817 return 0;
+2 -2
drivers/video/fbdev/core/fbmon.c
··· 1479 1479 if (ret) 1480 1480 return ret; 1481 1481 1482 - pr_debug("%s: got %dx%d display mode from %s\n", 1483 - of_node_full_name(np), vm.hactive, vm.vactive, np->name); 1482 + pr_debug("%pOF: got %dx%d display mode from %s\n", 1483 + np, vm.hactive, vm.vactive, np->name); 1484 1484 dump_fb_videomode(fb); 1485 1485 1486 1486 return 0;
+2 -2
drivers/video/fbdev/ffb.c
··· 997 997 998 998 dev_set_drvdata(&op->dev, info); 999 999 1000 - printk(KERN_INFO "%s: %s at %016lx, type %d, " 1000 + printk(KERN_INFO "%pOF: %s at %016lx, type %d, " 1001 1001 "DAC pnum[%x] rev[%d] manuf_rev[%d]\n", 1002 - dp->full_name, 1002 + dp, 1003 1003 ((par->flags & FFB_FLAG_AFB) ? "AFB" : "FFB"), 1004 1004 par->physbase, par->board_type, 1005 1005 dac_pnum, dac_rev, dac_mrev);
+2 -2
drivers/video/fbdev/leo.c
··· 619 619 620 620 dev_set_drvdata(&op->dev, info); 621 621 622 - printk(KERN_INFO "%s: leo at %lx:%lx\n", 623 - dp->full_name, 622 + printk(KERN_INFO "%pOF: leo at %lx:%lx\n", 623 + dp, 624 624 par->which_io, info->fix.smem_start); 625 625 626 626 return 0;
+4 -6
drivers/video/fbdev/offb.c
··· 383 383 FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_STATIC_PSEUDOCOLOR; 384 384 } 385 385 386 - static void __init offb_init_fb(const char *name, const char *full_name, 386 + static void __init offb_init_fb(const char *name, 387 387 int width, int height, int depth, 388 388 int pitch, unsigned long address, 389 389 int foreign_endian, struct device_node *dp) ··· 402 402 "Using unsupported %dx%d %s at %lx, depth=%d, pitch=%d\n", 403 403 width, height, name, address, depth, pitch); 404 404 if (depth != 8 && depth != 15 && depth != 16 && depth != 32) { 405 - printk(KERN_ERR "%s: can't use depth = %d\n", full_name, 406 - depth); 405 + printk(KERN_ERR "%pOF: can't use depth = %d\n", dp, depth); 407 406 release_mem_region(res_start, res_size); 408 407 return; 409 408 } 410 409 411 410 info = framebuffer_alloc(sizeof(u32) * 16, NULL); 412 - 411 + 413 412 if (info == 0) { 414 413 release_mem_region(res_start, res_size); 415 414 return; ··· 514 515 if (register_framebuffer(info) < 0) 515 516 goto out_err; 516 517 517 - fb_info(info, "Open Firmware frame buffer device on %s\n", full_name); 518 + fb_info(info, "Open Firmware frame buffer device on %pOF\n", dp); 518 519 return; 519 520 520 521 out_err: ··· 643 644 if (strcmp(dp->name, "valkyrie") == 0) 644 645 address += 0x1000; 645 646 offb_init_fb(no_real_node ? "bootx" : dp->name, 646 - no_real_node ? "display" : dp->full_name, 647 647 width, height, depth, pitch, address, 648 648 foreign_endian, no_real_node ? NULL : dp); 649 649 }
+2 -2
drivers/video/fbdev/p9100.c
··· 304 304 305 305 dev_set_drvdata(&op->dev, info); 306 306 307 - printk(KERN_INFO "%s: p9100 at %lx:%lx\n", 308 - dp->full_name, 307 + printk(KERN_INFO "%pOF: p9100 at %lx:%lx\n", 308 + dp, 309 309 par->which_io, info->fix.smem_start); 310 310 311 311 return 0;
+5 -5
drivers/video/fbdev/sunxvr1000.c
··· 33 33 gp->depth = of_getintprop_default(gp->of_node, "depth", 32); 34 34 35 35 if (!gp->width || !gp->height) { 36 - printk(KERN_ERR "gfb: Critical properties missing for %s\n", 37 - gp->of_node->full_name); 36 + printk(KERN_ERR "gfb: Critical properties missing for %pOF\n", 37 + gp->of_node); 38 38 return -EINVAL; 39 39 } 40 40 ··· 151 151 if (err) 152 152 goto err_unmap_fb; 153 153 154 - printk("gfb: Found device at %s\n", dp->full_name); 154 + printk("gfb: Found device at %pOF\n", dp); 155 155 156 156 err = register_framebuffer(info); 157 157 if (err < 0) { 158 - printk(KERN_ERR "gfb: Could not register framebuffer %s\n", 159 - dp->full_name); 158 + printk(KERN_ERR "gfb: Could not register framebuffer %pOF\n", 159 + dp); 160 160 goto err_unmap_fb; 161 161 } 162 162
+2 -2
drivers/video/fbdev/tcx.c
··· 467 467 468 468 dev_set_drvdata(&op->dev, info); 469 469 470 - printk(KERN_INFO "%s: TCX at %lx:%lx, %s\n", 471 - dp->full_name, 470 + printk(KERN_INFO "%pOF: TCX at %lx:%lx, %s\n", 471 + dp, 472 472 par->which_io, 473 473 info->fix.smem_start, 474 474 par->lowdepth ? "8-bit only" : "24-bit depth");
+16 -25
drivers/video/of_display_timing.c
··· 31 31 32 32 prop = of_find_property(np, name, &length); 33 33 if (!prop) { 34 - pr_err("%s: could not find property %s\n", 35 - of_node_full_name(np), name); 34 + pr_err("%pOF: could not find property %s\n", np, name); 36 35 return -EINVAL; 37 36 } 38 37 ··· 43 44 } else if (cells == 3) { 44 45 ret = of_property_read_u32_array(np, name, &result->min, cells); 45 46 } else { 46 - pr_err("%s: illegal timing specification in %s\n", 47 - of_node_full_name(np), name); 47 + pr_err("%pOF: illegal timing specification in %s\n", np, name); 48 48 return -EINVAL; 49 49 } 50 50 ··· 103 105 dt->flags |= DISPLAY_FLAGS_DOUBLECLK; 104 106 105 107 if (ret) { 106 - pr_err("%s: error reading timing properties\n", 107 - of_node_full_name(np)); 108 + pr_err("%pOF: error reading timing properties\n", np); 108 109 return -EINVAL; 109 110 } 110 111 ··· 126 129 127 130 timing_np = of_get_child_by_name(np, name); 128 131 if (!timing_np) { 129 - pr_err("%s: could not find node '%s'\n", 130 - of_node_full_name(np), name); 132 + pr_err("%pOF: could not find node '%s'\n", np, name); 131 133 return -ENOENT; 132 134 } 133 135 ··· 150 154 151 155 timings_np = of_get_child_by_name(np, "display-timings"); 152 156 if (!timings_np) { 153 - pr_err("%s: could not find display-timings node\n", 154 - of_node_full_name(np)); 157 + pr_err("%pOF: could not find display-timings node\n", np); 155 158 return NULL; 156 159 } 157 160 158 161 disp = kzalloc(sizeof(*disp), GFP_KERNEL); 159 162 if (!disp) { 160 - pr_err("%s: could not allocate struct disp'\n", 161 - of_node_full_name(np)); 163 + pr_err("%pOF: could not allocate struct disp'\n", np); 162 164 goto dispfail; 163 165 } 164 166 ··· 166 172 entry = of_get_next_child(timings_np, NULL); 167 173 /* if there is no child, it is useless to go on */ 168 174 if (!entry) { 169 - pr_err("%s: no timing specifications given\n", 170 - of_node_full_name(np)); 175 + pr_err("%pOF: no timing specifications given\n", np); 171 176 goto entryfail; 172 177 } 173 178 174 - pr_debug("%s: using %s as default timing\n", 175 - of_node_full_name(np), entry->name); 179 + pr_debug("%pOF: using %s as default timing\n", np, entry->name); 176 180 177 181 native_mode = entry; 178 182 179 183 disp->num_timings = of_get_child_count(timings_np); 180 184 if (disp->num_timings == 0) { 181 185 /* should never happen, as entry was already found above */ 182 - pr_err("%s: no timings specified\n", of_node_full_name(np)); 186 + pr_err("%pOF: no timings specified\n", np); 183 187 goto entryfail; 184 188 } 185 189 186 190 disp->timings = kzalloc(sizeof(struct display_timing *) * 187 191 disp->num_timings, GFP_KERNEL); 188 192 if (!disp->timings) { 189 - pr_err("%s: could not allocate timings array\n", 190 - of_node_full_name(np)); 193 + pr_err("%pOF: could not allocate timings array\n", np); 191 194 goto entryfail; 192 195 } 193 196 ··· 197 206 198 207 dt = kzalloc(sizeof(*dt), GFP_KERNEL); 199 208 if (!dt) { 200 - pr_err("%s: could not allocate display_timing struct\n", 201 - of_node_full_name(np)); 209 + pr_err("%pOF: could not allocate display_timing struct\n", 210 + np); 202 211 goto timingfail; 203 212 } 204 213 ··· 208 217 * to not encourage wrong devicetrees, fail in case of 209 218 * an error 210 219 */ 211 - pr_err("%s: error in timing %d\n", 212 - of_node_full_name(np), disp->num_timings + 1); 220 + pr_err("%pOF: error in timing %d\n", 221 + np, disp->num_timings + 1); 213 222 kfree(dt); 214 223 goto timingfail; 215 224 } ··· 227 236 */ 228 237 of_node_put(native_mode); 229 238 230 - pr_debug("%s: got %d timings. Using timing #%d as default\n", 231 - of_node_full_name(np), disp->num_timings, 239 + pr_debug("%pOF: got %d timings. Using timing #%d as default\n", 240 + np, disp->num_timings, 232 241 disp->native_mode + 1); 233 242 234 243 return disp;
+1 -1
drivers/video/of_videomode.c
··· 36 36 37 37 disp = of_get_display_timings(np); 38 38 if (!disp) { 39 - pr_err("%s: no timings specified\n", of_node_full_name(np)); 39 + pr_err("%pOF: no timings specified\n", np); 40 40 return -EINVAL; 41 41 } 42 42