diff options
author | Geoff Levand <geoff@infradead.org> | 2011-12-01 03:58:58 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-12-07 22:05:55 -0500 |
commit | 4bf94ae39c5bfab234ab1bd8b2b44d1f0d2dd5ab (patch) | |
tree | 931fda2b73ad0a18f11e5690251857b1b6e3798e /arch/powerpc/platforms | |
parent | 7f8cd3523078f59f0da4561ee725d05008b0a80c (diff) |
powerpc/ps3: Fix PS3 repository build warnings
Fix some PS3 repository.c build warnings when DEBUG is
defined. Also change most pr_debug calls to pr_devel calls.
Fixes warnings like these:
format '%lx' expects type 'long unsigned int', but argument 7 has type 'u64'
Signed-off-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
-rw-r--r-- | arch/powerpc/platforms/ps3/repository.c | 135 |
1 files changed, 68 insertions, 67 deletions
diff --git a/arch/powerpc/platforms/ps3/repository.c b/arch/powerpc/platforms/ps3/repository.c index cb68729f0a10..7bdfea336f5e 100644 --- a/arch/powerpc/platforms/ps3/repository.c +++ b/arch/powerpc/platforms/ps3/repository.c | |||
@@ -44,7 +44,7 @@ static void _dump_field(const char *hdr, u64 n, const char *func, int line) | |||
44 | s[i] = (in[i] <= 126 && in[i] >= 32) ? in[i] : '.'; | 44 | s[i] = (in[i] <= 126 && in[i] >= 32) ? in[i] : '.'; |
45 | s[i] = 0; | 45 | s[i] = 0; |
46 | 46 | ||
47 | pr_debug("%s:%d: %s%016llx : %s\n", func, line, hdr, n, s); | 47 | pr_devel("%s:%d: %s%016llx : %s\n", func, line, hdr, n, s); |
48 | #endif | 48 | #endif |
49 | } | 49 | } |
50 | 50 | ||
@@ -53,7 +53,7 @@ static void _dump_field(const char *hdr, u64 n, const char *func, int line) | |||
53 | static void _dump_node_name(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, | 53 | static void _dump_node_name(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, |
54 | u64 n4, const char *func, int line) | 54 | u64 n4, const char *func, int line) |
55 | { | 55 | { |
56 | pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id); | 56 | pr_devel("%s:%d: lpar: %u\n", func, line, lpar_id); |
57 | _dump_field("n1: ", n1, func, line); | 57 | _dump_field("n1: ", n1, func, line); |
58 | _dump_field("n2: ", n2, func, line); | 58 | _dump_field("n2: ", n2, func, line); |
59 | _dump_field("n3: ", n3, func, line); | 59 | _dump_field("n3: ", n3, func, line); |
@@ -65,13 +65,13 @@ static void _dump_node_name(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, | |||
65 | static void _dump_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4, | 65 | static void _dump_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4, |
66 | u64 v1, u64 v2, const char *func, int line) | 66 | u64 v1, u64 v2, const char *func, int line) |
67 | { | 67 | { |
68 | pr_debug("%s:%d: lpar: %u\n", func, line, lpar_id); | 68 | pr_devel("%s:%d: lpar: %u\n", func, line, lpar_id); |
69 | _dump_field("n1: ", n1, func, line); | 69 | _dump_field("n1: ", n1, func, line); |
70 | _dump_field("n2: ", n2, func, line); | 70 | _dump_field("n2: ", n2, func, line); |
71 | _dump_field("n3: ", n3, func, line); | 71 | _dump_field("n3: ", n3, func, line); |
72 | _dump_field("n4: ", n4, func, line); | 72 | _dump_field("n4: ", n4, func, line); |
73 | pr_debug("%s:%d: v1: %016llx\n", func, line, v1); | 73 | pr_devel("%s:%d: v1: %016llx\n", func, line, v1); |
74 | pr_debug("%s:%d: v2: %016llx\n", func, line, v2); | 74 | pr_devel("%s:%d: v2: %016llx\n", func, line, v2); |
75 | } | 75 | } |
76 | 76 | ||
77 | /** | 77 | /** |
@@ -135,7 +135,7 @@ static int read_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4, | |||
135 | &v2); | 135 | &v2); |
136 | 136 | ||
137 | if (result) { | 137 | if (result) { |
138 | pr_debug("%s:%d: lv1_read_repository_node failed: %s\n", | 138 | pr_warn("%s:%d: lv1_read_repository_node failed: %s\n", |
139 | __func__, __LINE__, ps3_result(result)); | 139 | __func__, __LINE__, ps3_result(result)); |
140 | dump_node_name(lpar_id, n1, n2, n3, n4); | 140 | dump_node_name(lpar_id, n1, n2, n3, n4); |
141 | return -ENOENT; | 141 | return -ENOENT; |
@@ -149,10 +149,10 @@ static int read_node(unsigned int lpar_id, u64 n1, u64 n2, u64 n3, u64 n4, | |||
149 | *_v2 = v2; | 149 | *_v2 = v2; |
150 | 150 | ||
151 | if (v1 && !_v1) | 151 | if (v1 && !_v1) |
152 | pr_debug("%s:%d: warning: discarding non-zero v1: %016llx\n", | 152 | pr_devel("%s:%d: warning: discarding non-zero v1: %016llx\n", |
153 | __func__, __LINE__, v1); | 153 | __func__, __LINE__, v1); |
154 | if (v2 && !_v2) | 154 | if (v2 && !_v2) |
155 | pr_debug("%s:%d: warning: discarding non-zero v2: %016llx\n", | 155 | pr_devel("%s:%d: warning: discarding non-zero v2: %016llx\n", |
156 | __func__, __LINE__, v2); | 156 | __func__, __LINE__, v2); |
157 | 157 | ||
158 | return 0; | 158 | return 0; |
@@ -323,16 +323,16 @@ int ps3_repository_find_device(struct ps3_repository_device *repo) | |||
323 | result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev); | 323 | result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev); |
324 | 324 | ||
325 | if (result) { | 325 | if (result) { |
326 | pr_debug("%s:%d read_bus_num_dev failed\n", __func__, __LINE__); | 326 | pr_devel("%s:%d read_bus_num_dev failed\n", __func__, __LINE__); |
327 | return result; | 327 | return result; |
328 | } | 328 | } |
329 | 329 | ||
330 | pr_debug("%s:%d: bus_type %u, bus_index %u, bus_id %llu, num_dev %u\n", | 330 | pr_devel("%s:%d: bus_type %u, bus_index %u, bus_id %llu, num_dev %u\n", |
331 | __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id, | 331 | __func__, __LINE__, tmp.bus_type, tmp.bus_index, tmp.bus_id, |
332 | num_dev); | 332 | num_dev); |
333 | 333 | ||
334 | if (tmp.dev_index >= num_dev) { | 334 | if (tmp.dev_index >= num_dev) { |
335 | pr_debug("%s:%d: no device found\n", __func__, __LINE__); | 335 | pr_devel("%s:%d: no device found\n", __func__, __LINE__); |
336 | return -ENODEV; | 336 | return -ENODEV; |
337 | } | 337 | } |
338 | 338 | ||
@@ -340,7 +340,7 @@ int ps3_repository_find_device(struct ps3_repository_device *repo) | |||
340 | &tmp.dev_type); | 340 | &tmp.dev_type); |
341 | 341 | ||
342 | if (result) { | 342 | if (result) { |
343 | pr_debug("%s:%d read_dev_type failed\n", __func__, __LINE__); | 343 | pr_devel("%s:%d read_dev_type failed\n", __func__, __LINE__); |
344 | return result; | 344 | return result; |
345 | } | 345 | } |
346 | 346 | ||
@@ -348,12 +348,12 @@ int ps3_repository_find_device(struct ps3_repository_device *repo) | |||
348 | &tmp.dev_id); | 348 | &tmp.dev_id); |
349 | 349 | ||
350 | if (result) { | 350 | if (result) { |
351 | pr_debug("%s:%d ps3_repository_read_dev_id failed\n", __func__, | 351 | pr_devel("%s:%d ps3_repository_read_dev_id failed\n", __func__, |
352 | __LINE__); | 352 | __LINE__); |
353 | return result; | 353 | return result; |
354 | } | 354 | } |
355 | 355 | ||
356 | pr_debug("%s:%d: found: dev_type %u, dev_index %u, dev_id %llu\n", | 356 | pr_devel("%s:%d: found: dev_type %u, dev_index %u, dev_id %llu\n", |
357 | __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id); | 357 | __func__, __LINE__, tmp.dev_type, tmp.dev_index, tmp.dev_id); |
358 | 358 | ||
359 | *repo = tmp; | 359 | *repo = tmp; |
@@ -367,14 +367,14 @@ int ps3_repository_find_device_by_id(struct ps3_repository_device *repo, | |||
367 | struct ps3_repository_device tmp; | 367 | struct ps3_repository_device tmp; |
368 | unsigned int num_dev; | 368 | unsigned int num_dev; |
369 | 369 | ||
370 | pr_debug(" -> %s:%u: find device by id %llu:%llu\n", __func__, __LINE__, | 370 | pr_devel(" -> %s:%u: find device by id %llu:%llu\n", __func__, __LINE__, |
371 | bus_id, dev_id); | 371 | bus_id, dev_id); |
372 | 372 | ||
373 | for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) { | 373 | for (tmp.bus_index = 0; tmp.bus_index < 10; tmp.bus_index++) { |
374 | result = ps3_repository_read_bus_id(tmp.bus_index, | 374 | result = ps3_repository_read_bus_id(tmp.bus_index, |
375 | &tmp.bus_id); | 375 | &tmp.bus_id); |
376 | if (result) { | 376 | if (result) { |
377 | pr_debug("%s:%u read_bus_id(%u) failed\n", __func__, | 377 | pr_devel("%s:%u read_bus_id(%u) failed\n", __func__, |
378 | __LINE__, tmp.bus_index); | 378 | __LINE__, tmp.bus_index); |
379 | return result; | 379 | return result; |
380 | } | 380 | } |
@@ -382,23 +382,23 @@ int ps3_repository_find_device_by_id(struct ps3_repository_device *repo, | |||
382 | if (tmp.bus_id == bus_id) | 382 | if (tmp.bus_id == bus_id) |
383 | goto found_bus; | 383 | goto found_bus; |
384 | 384 | ||
385 | pr_debug("%s:%u: skip, bus_id %llu\n", __func__, __LINE__, | 385 | pr_devel("%s:%u: skip, bus_id %llu\n", __func__, __LINE__, |
386 | tmp.bus_id); | 386 | tmp.bus_id); |
387 | } | 387 | } |
388 | pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__); | 388 | pr_devel(" <- %s:%u: bus not found\n", __func__, __LINE__); |
389 | return result; | 389 | return result; |
390 | 390 | ||
391 | found_bus: | 391 | found_bus: |
392 | result = ps3_repository_read_bus_type(tmp.bus_index, &tmp.bus_type); | 392 | result = ps3_repository_read_bus_type(tmp.bus_index, &tmp.bus_type); |
393 | if (result) { | 393 | if (result) { |
394 | pr_debug("%s:%u read_bus_type(%u) failed\n", __func__, | 394 | pr_devel("%s:%u read_bus_type(%u) failed\n", __func__, |
395 | __LINE__, tmp.bus_index); | 395 | __LINE__, tmp.bus_index); |
396 | return result; | 396 | return result; |
397 | } | 397 | } |
398 | 398 | ||
399 | result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev); | 399 | result = ps3_repository_read_bus_num_dev(tmp.bus_index, &num_dev); |
400 | if (result) { | 400 | if (result) { |
401 | pr_debug("%s:%u read_bus_num_dev failed\n", __func__, | 401 | pr_devel("%s:%u read_bus_num_dev failed\n", __func__, |
402 | __LINE__); | 402 | __LINE__); |
403 | return result; | 403 | return result; |
404 | } | 404 | } |
@@ -408,7 +408,7 @@ found_bus: | |||
408 | tmp.dev_index, | 408 | tmp.dev_index, |
409 | &tmp.dev_id); | 409 | &tmp.dev_id); |
410 | if (result) { | 410 | if (result) { |
411 | pr_debug("%s:%u read_dev_id(%u:%u) failed\n", __func__, | 411 | pr_devel("%s:%u read_dev_id(%u:%u) failed\n", __func__, |
412 | __LINE__, tmp.bus_index, tmp.dev_index); | 412 | __LINE__, tmp.bus_index, tmp.dev_index); |
413 | return result; | 413 | return result; |
414 | } | 414 | } |
@@ -416,21 +416,21 @@ found_bus: | |||
416 | if (tmp.dev_id == dev_id) | 416 | if (tmp.dev_id == dev_id) |
417 | goto found_dev; | 417 | goto found_dev; |
418 | 418 | ||
419 | pr_debug("%s:%u: skip, dev_id %llu\n", __func__, __LINE__, | 419 | pr_devel("%s:%u: skip, dev_id %llu\n", __func__, __LINE__, |
420 | tmp.dev_id); | 420 | tmp.dev_id); |
421 | } | 421 | } |
422 | pr_debug(" <- %s:%u: dev not found\n", __func__, __LINE__); | 422 | pr_devel(" <- %s:%u: dev not found\n", __func__, __LINE__); |
423 | return result; | 423 | return result; |
424 | 424 | ||
425 | found_dev: | 425 | found_dev: |
426 | result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index, | 426 | result = ps3_repository_read_dev_type(tmp.bus_index, tmp.dev_index, |
427 | &tmp.dev_type); | 427 | &tmp.dev_type); |
428 | if (result) { | 428 | if (result) { |
429 | pr_debug("%s:%u read_dev_type failed\n", __func__, __LINE__); | 429 | pr_devel("%s:%u read_dev_type failed\n", __func__, __LINE__); |
430 | return result; | 430 | return result; |
431 | } | 431 | } |
432 | 432 | ||
433 | pr_debug(" <- %s:%u: found: type (%u:%u) index (%u:%u) id (%llu:%llu)\n", | 433 | pr_devel(" <- %s:%u: found: type (%u:%u) index (%u:%u) id (%llu:%llu)\n", |
434 | __func__, __LINE__, tmp.bus_type, tmp.dev_type, tmp.bus_index, | 434 | __func__, __LINE__, tmp.bus_type, tmp.dev_type, tmp.bus_index, |
435 | tmp.dev_index, tmp.bus_id, tmp.dev_id); | 435 | tmp.dev_index, tmp.bus_id, tmp.dev_id); |
436 | *repo = tmp; | 436 | *repo = tmp; |
@@ -443,18 +443,18 @@ int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type, | |||
443 | int result = 0; | 443 | int result = 0; |
444 | struct ps3_repository_device repo; | 444 | struct ps3_repository_device repo; |
445 | 445 | ||
446 | pr_debug(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type); | 446 | pr_devel(" -> %s:%d: find bus_type %u\n", __func__, __LINE__, bus_type); |
447 | 447 | ||
448 | repo.bus_type = bus_type; | 448 | repo.bus_type = bus_type; |
449 | result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index); | 449 | result = ps3_repository_find_bus(repo.bus_type, 0, &repo.bus_index); |
450 | if (result) { | 450 | if (result) { |
451 | pr_debug(" <- %s:%u: bus not found\n", __func__, __LINE__); | 451 | pr_devel(" <- %s:%u: bus not found\n", __func__, __LINE__); |
452 | return result; | 452 | return result; |
453 | } | 453 | } |
454 | 454 | ||
455 | result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id); | 455 | result = ps3_repository_read_bus_id(repo.bus_index, &repo.bus_id); |
456 | if (result) { | 456 | if (result) { |
457 | pr_debug("%s:%d read_bus_id(%u) failed\n", __func__, __LINE__, | 457 | pr_devel("%s:%d read_bus_id(%u) failed\n", __func__, __LINE__, |
458 | repo.bus_index); | 458 | repo.bus_index); |
459 | return result; | 459 | return result; |
460 | } | 460 | } |
@@ -469,13 +469,13 @@ int __devinit ps3_repository_find_devices(enum ps3_bus_type bus_type, | |||
469 | 469 | ||
470 | result = callback(&repo); | 470 | result = callback(&repo); |
471 | if (result) { | 471 | if (result) { |
472 | pr_debug("%s:%d: abort at callback\n", __func__, | 472 | pr_devel("%s:%d: abort at callback\n", __func__, |
473 | __LINE__); | 473 | __LINE__); |
474 | break; | 474 | break; |
475 | } | 475 | } |
476 | } | 476 | } |
477 | 477 | ||
478 | pr_debug(" <- %s:%d\n", __func__, __LINE__); | 478 | pr_devel(" <- %s:%d\n", __func__, __LINE__); |
479 | return result; | 479 | return result; |
480 | } | 480 | } |
481 | 481 | ||
@@ -489,7 +489,7 @@ int ps3_repository_find_bus(enum ps3_bus_type bus_type, unsigned int from, | |||
489 | for (i = from; i < 10; i++) { | 489 | for (i = from; i < 10; i++) { |
490 | error = ps3_repository_read_bus_type(i, &type); | 490 | error = ps3_repository_read_bus_type(i, &type); |
491 | if (error) { | 491 | if (error) { |
492 | pr_debug("%s:%d read_bus_type failed\n", | 492 | pr_devel("%s:%d read_bus_type failed\n", |
493 | __func__, __LINE__); | 493 | __func__, __LINE__); |
494 | *bus_index = UINT_MAX; | 494 | *bus_index = UINT_MAX; |
495 | return error; | 495 | return error; |
@@ -509,7 +509,7 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *repo, | |||
509 | int result = 0; | 509 | int result = 0; |
510 | unsigned int res_index; | 510 | unsigned int res_index; |
511 | 511 | ||
512 | pr_debug("%s:%d: find intr_type %u\n", __func__, __LINE__, intr_type); | 512 | pr_devel("%s:%d: find intr_type %u\n", __func__, __LINE__, intr_type); |
513 | 513 | ||
514 | *interrupt_id = UINT_MAX; | 514 | *interrupt_id = UINT_MAX; |
515 | 515 | ||
@@ -521,7 +521,7 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *repo, | |||
521 | repo->dev_index, res_index, &t, &id); | 521 | repo->dev_index, res_index, &t, &id); |
522 | 522 | ||
523 | if (result) { | 523 | if (result) { |
524 | pr_debug("%s:%d read_dev_intr failed\n", | 524 | pr_devel("%s:%d read_dev_intr failed\n", |
525 | __func__, __LINE__); | 525 | __func__, __LINE__); |
526 | return result; | 526 | return result; |
527 | } | 527 | } |
@@ -535,7 +535,7 @@ int ps3_repository_find_interrupt(const struct ps3_repository_device *repo, | |||
535 | if (res_index == 10) | 535 | if (res_index == 10) |
536 | return -ENODEV; | 536 | return -ENODEV; |
537 | 537 | ||
538 | pr_debug("%s:%d: found intr_type %u at res_index %u\n", | 538 | pr_devel("%s:%d: found intr_type %u at res_index %u\n", |
539 | __func__, __LINE__, intr_type, res_index); | 539 | __func__, __LINE__, intr_type, res_index); |
540 | 540 | ||
541 | return result; | 541 | return result; |
@@ -547,7 +547,7 @@ int ps3_repository_find_reg(const struct ps3_repository_device *repo, | |||
547 | int result = 0; | 547 | int result = 0; |
548 | unsigned int res_index; | 548 | unsigned int res_index; |
549 | 549 | ||
550 | pr_debug("%s:%d: find reg_type %u\n", __func__, __LINE__, reg_type); | 550 | pr_devel("%s:%d: find reg_type %u\n", __func__, __LINE__, reg_type); |
551 | 551 | ||
552 | *bus_addr = *len = 0; | 552 | *bus_addr = *len = 0; |
553 | 553 | ||
@@ -560,7 +560,7 @@ int ps3_repository_find_reg(const struct ps3_repository_device *repo, | |||
560 | repo->dev_index, res_index, &t, &a, &l); | 560 | repo->dev_index, res_index, &t, &a, &l); |
561 | 561 | ||
562 | if (result) { | 562 | if (result) { |
563 | pr_debug("%s:%d read_dev_reg failed\n", | 563 | pr_devel("%s:%d read_dev_reg failed\n", |
564 | __func__, __LINE__); | 564 | __func__, __LINE__); |
565 | return result; | 565 | return result; |
566 | } | 566 | } |
@@ -575,7 +575,7 @@ int ps3_repository_find_reg(const struct ps3_repository_device *repo, | |||
575 | if (res_index == 10) | 575 | if (res_index == 10) |
576 | return -ENODEV; | 576 | return -ENODEV; |
577 | 577 | ||
578 | pr_debug("%s:%d: found reg_type %u at res_index %u\n", | 578 | pr_devel("%s:%d: found reg_type %u at res_index %u\n", |
579 | __func__, __LINE__, reg_type, res_index); | 579 | __func__, __LINE__, reg_type, res_index); |
580 | 580 | ||
581 | return result; | 581 | return result; |
@@ -1009,7 +1009,7 @@ int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo) | |||
1009 | int result = 0; | 1009 | int result = 0; |
1010 | unsigned int res_index; | 1010 | unsigned int res_index; |
1011 | 1011 | ||
1012 | pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__, | 1012 | pr_devel(" -> %s:%d: (%u:%u)\n", __func__, __LINE__, |
1013 | repo->bus_index, repo->dev_index); | 1013 | repo->bus_index, repo->dev_index); |
1014 | 1014 | ||
1015 | for (res_index = 0; res_index < 10; res_index++) { | 1015 | for (res_index = 0; res_index < 10; res_index++) { |
@@ -1021,13 +1021,13 @@ int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo) | |||
1021 | 1021 | ||
1022 | if (result) { | 1022 | if (result) { |
1023 | if (result != LV1_NO_ENTRY) | 1023 | if (result != LV1_NO_ENTRY) |
1024 | pr_debug("%s:%d ps3_repository_read_dev_intr" | 1024 | pr_devel("%s:%d ps3_repository_read_dev_intr" |
1025 | " (%u:%u) failed\n", __func__, __LINE__, | 1025 | " (%u:%u) failed\n", __func__, __LINE__, |
1026 | repo->bus_index, repo->dev_index); | 1026 | repo->bus_index, repo->dev_index); |
1027 | break; | 1027 | break; |
1028 | } | 1028 | } |
1029 | 1029 | ||
1030 | pr_debug("%s:%d (%u:%u) intr_type %u, interrupt_id %u\n", | 1030 | pr_devel("%s:%d (%u:%u) intr_type %u, interrupt_id %u\n", |
1031 | __func__, __LINE__, repo->bus_index, repo->dev_index, | 1031 | __func__, __LINE__, repo->bus_index, repo->dev_index, |
1032 | intr_type, interrupt_id); | 1032 | intr_type, interrupt_id); |
1033 | } | 1033 | } |
@@ -1042,18 +1042,18 @@ int ps3_repository_dump_resource_info(const struct ps3_repository_device *repo) | |||
1042 | 1042 | ||
1043 | if (result) { | 1043 | if (result) { |
1044 | if (result != LV1_NO_ENTRY) | 1044 | if (result != LV1_NO_ENTRY) |
1045 | pr_debug("%s:%d ps3_repository_read_dev_reg" | 1045 | pr_devel("%s:%d ps3_repository_read_dev_reg" |
1046 | " (%u:%u) failed\n", __func__, __LINE__, | 1046 | " (%u:%u) failed\n", __func__, __LINE__, |
1047 | repo->bus_index, repo->dev_index); | 1047 | repo->bus_index, repo->dev_index); |
1048 | break; | 1048 | break; |
1049 | } | 1049 | } |
1050 | 1050 | ||
1051 | pr_debug("%s:%d (%u:%u) reg_type %u, bus_addr %lxh, len %lxh\n", | 1051 | pr_devel("%s:%d (%u:%u) reg_type %u, bus_addr %llxh, len %llxh\n", |
1052 | __func__, __LINE__, repo->bus_index, repo->dev_index, | 1052 | __func__, __LINE__, repo->bus_index, repo->dev_index, |
1053 | reg_type, bus_addr, len); | 1053 | reg_type, bus_addr, len); |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | pr_debug(" <- %s:%d\n", __func__, __LINE__); | 1056 | pr_devel(" <- %s:%d\n", __func__, __LINE__); |
1057 | return result; | 1057 | return result; |
1058 | } | 1058 | } |
1059 | 1059 | ||
@@ -1063,22 +1063,22 @@ static int dump_stor_dev_info(struct ps3_repository_device *repo) | |||
1063 | unsigned int num_regions, region_index; | 1063 | unsigned int num_regions, region_index; |
1064 | u64 port, blk_size, num_blocks; | 1064 | u64 port, blk_size, num_blocks; |
1065 | 1065 | ||
1066 | pr_debug(" -> %s:%d: (%u:%u)\n", __func__, __LINE__, | 1066 | pr_devel(" -> %s:%d: (%u:%u)\n", __func__, __LINE__, |
1067 | repo->bus_index, repo->dev_index); | 1067 | repo->bus_index, repo->dev_index); |
1068 | 1068 | ||
1069 | result = ps3_repository_read_stor_dev_info(repo->bus_index, | 1069 | result = ps3_repository_read_stor_dev_info(repo->bus_index, |
1070 | repo->dev_index, &port, &blk_size, &num_blocks, &num_regions); | 1070 | repo->dev_index, &port, &blk_size, &num_blocks, &num_regions); |
1071 | if (result) { | 1071 | if (result) { |
1072 | pr_debug("%s:%d ps3_repository_read_stor_dev_info" | 1072 | pr_devel("%s:%d ps3_repository_read_stor_dev_info" |
1073 | " (%u:%u) failed\n", __func__, __LINE__, | 1073 | " (%u:%u) failed\n", __func__, __LINE__, |
1074 | repo->bus_index, repo->dev_index); | 1074 | repo->bus_index, repo->dev_index); |
1075 | goto out; | 1075 | goto out; |
1076 | } | 1076 | } |
1077 | 1077 | ||
1078 | pr_debug("%s:%d (%u:%u): port %lu, blk_size %lu, num_blocks " | 1078 | pr_devel("%s:%d (%u:%u): port %llu, blk_size %llu, num_blocks " |
1079 | "%lu, num_regions %u\n", | 1079 | "%llu, num_regions %u\n", |
1080 | __func__, __LINE__, repo->bus_index, repo->dev_index, port, | 1080 | __func__, __LINE__, repo->bus_index, repo->dev_index, |
1081 | blk_size, num_blocks, num_regions); | 1081 | port, blk_size, num_blocks, num_regions); |
1082 | 1082 | ||
1083 | for (region_index = 0; region_index < num_regions; region_index++) { | 1083 | for (region_index = 0; region_index < num_regions; region_index++) { |
1084 | unsigned int region_id; | 1084 | unsigned int region_id; |
@@ -1088,19 +1088,20 @@ static int dump_stor_dev_info(struct ps3_repository_device *repo) | |||
1088 | repo->dev_index, region_index, ®ion_id, | 1088 | repo->dev_index, region_index, ®ion_id, |
1089 | ®ion_start, ®ion_size); | 1089 | ®ion_start, ®ion_size); |
1090 | if (result) { | 1090 | if (result) { |
1091 | pr_debug("%s:%d ps3_repository_read_stor_dev_region" | 1091 | pr_devel("%s:%d ps3_repository_read_stor_dev_region" |
1092 | " (%u:%u) failed\n", __func__, __LINE__, | 1092 | " (%u:%u) failed\n", __func__, __LINE__, |
1093 | repo->bus_index, repo->dev_index); | 1093 | repo->bus_index, repo->dev_index); |
1094 | break; | 1094 | break; |
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | pr_debug("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n", | 1097 | pr_devel("%s:%d (%u:%u) region_id %u, start %lxh, size %lxh\n", |
1098 | __func__, __LINE__, repo->bus_index, repo->dev_index, | 1098 | __func__, __LINE__, repo->bus_index, repo->dev_index, |
1099 | region_id, region_start, region_size); | 1099 | region_id, (unsigned long)region_start, |
1100 | (unsigned long)region_size); | ||
1100 | } | 1101 | } |
1101 | 1102 | ||
1102 | out: | 1103 | out: |
1103 | pr_debug(" <- %s:%d\n", __func__, __LINE__); | 1104 | pr_devel(" <- %s:%d\n", __func__, __LINE__); |
1104 | return result; | 1105 | return result; |
1105 | } | 1106 | } |
1106 | 1107 | ||
@@ -1109,7 +1110,7 @@ static int dump_device_info(struct ps3_repository_device *repo, | |||
1109 | { | 1110 | { |
1110 | int result = 0; | 1111 | int result = 0; |
1111 | 1112 | ||
1112 | pr_debug(" -> %s:%d: bus_%u\n", __func__, __LINE__, repo->bus_index); | 1113 | pr_devel(" -> %s:%d: bus_%u\n", __func__, __LINE__, repo->bus_index); |
1113 | 1114 | ||
1114 | for (repo->dev_index = 0; repo->dev_index < num_dev; | 1115 | for (repo->dev_index = 0; repo->dev_index < num_dev; |
1115 | repo->dev_index++) { | 1116 | repo->dev_index++) { |
@@ -1118,7 +1119,7 @@ static int dump_device_info(struct ps3_repository_device *repo, | |||
1118 | repo->dev_index, &repo->dev_type); | 1119 | repo->dev_index, &repo->dev_type); |
1119 | 1120 | ||
1120 | if (result) { | 1121 | if (result) { |
1121 | pr_debug("%s:%d ps3_repository_read_dev_type" | 1122 | pr_devel("%s:%d ps3_repository_read_dev_type" |
1122 | " (%u:%u) failed\n", __func__, __LINE__, | 1123 | " (%u:%u) failed\n", __func__, __LINE__, |
1123 | repo->bus_index, repo->dev_index); | 1124 | repo->bus_index, repo->dev_index); |
1124 | break; | 1125 | break; |
@@ -1128,15 +1129,15 @@ static int dump_device_info(struct ps3_repository_device *repo, | |||
1128 | repo->dev_index, &repo->dev_id); | 1129 | repo->dev_index, &repo->dev_id); |
1129 | 1130 | ||
1130 | if (result) { | 1131 | if (result) { |
1131 | pr_debug("%s:%d ps3_repository_read_dev_id" | 1132 | pr_devel("%s:%d ps3_repository_read_dev_id" |
1132 | " (%u:%u) failed\n", __func__, __LINE__, | 1133 | " (%u:%u) failed\n", __func__, __LINE__, |
1133 | repo->bus_index, repo->dev_index); | 1134 | repo->bus_index, repo->dev_index); |
1134 | continue; | 1135 | continue; |
1135 | } | 1136 | } |
1136 | 1137 | ||
1137 | pr_debug("%s:%d (%u:%u): dev_type %u, dev_id %lu\n", __func__, | 1138 | pr_devel("%s:%d (%u:%u): dev_type %u, dev_id %lu\n", __func__, |
1138 | __LINE__, repo->bus_index, repo->dev_index, | 1139 | __LINE__, repo->bus_index, repo->dev_index, |
1139 | repo->dev_type, repo->dev_id); | 1140 | repo->dev_type, (unsigned long)repo->dev_id); |
1140 | 1141 | ||
1141 | ps3_repository_dump_resource_info(repo); | 1142 | ps3_repository_dump_resource_info(repo); |
1142 | 1143 | ||
@@ -1144,7 +1145,7 @@ static int dump_device_info(struct ps3_repository_device *repo, | |||
1144 | dump_stor_dev_info(repo); | 1145 | dump_stor_dev_info(repo); |
1145 | } | 1146 | } |
1146 | 1147 | ||
1147 | pr_debug(" <- %s:%d\n", __func__, __LINE__); | 1148 | pr_devel(" <- %s:%d\n", __func__, __LINE__); |
1148 | return result; | 1149 | return result; |
1149 | } | 1150 | } |
1150 | 1151 | ||
@@ -1153,7 +1154,7 @@ int ps3_repository_dump_bus_info(void) | |||
1153 | int result = 0; | 1154 | int result = 0; |
1154 | struct ps3_repository_device repo; | 1155 | struct ps3_repository_device repo; |
1155 | 1156 | ||
1156 | pr_debug(" -> %s:%d\n", __func__, __LINE__); | 1157 | pr_devel(" -> %s:%d\n", __func__, __LINE__); |
1157 | 1158 | ||
1158 | memset(&repo, 0, sizeof(repo)); | 1159 | memset(&repo, 0, sizeof(repo)); |
1159 | 1160 | ||
@@ -1164,7 +1165,7 @@ int ps3_repository_dump_bus_info(void) | |||
1164 | &repo.bus_type); | 1165 | &repo.bus_type); |
1165 | 1166 | ||
1166 | if (result) { | 1167 | if (result) { |
1167 | pr_debug("%s:%d read_bus_type(%u) failed\n", | 1168 | pr_devel("%s:%d read_bus_type(%u) failed\n", |
1168 | __func__, __LINE__, repo.bus_index); | 1169 | __func__, __LINE__, repo.bus_index); |
1169 | break; | 1170 | break; |
1170 | } | 1171 | } |
@@ -1173,32 +1174,32 @@ int ps3_repository_dump_bus_info(void) | |||
1173 | &repo.bus_id); | 1174 | &repo.bus_id); |
1174 | 1175 | ||
1175 | if (result) { | 1176 | if (result) { |
1176 | pr_debug("%s:%d read_bus_id(%u) failed\n", | 1177 | pr_devel("%s:%d read_bus_id(%u) failed\n", |
1177 | __func__, __LINE__, repo.bus_index); | 1178 | __func__, __LINE__, repo.bus_index); |
1178 | continue; | 1179 | continue; |
1179 | } | 1180 | } |
1180 | 1181 | ||
1181 | if (repo.bus_index != repo.bus_id) | 1182 | if (repo.bus_index != repo.bus_id) |
1182 | pr_debug("%s:%d bus_index != bus_id\n", | 1183 | pr_devel("%s:%d bus_index != bus_id\n", |
1183 | __func__, __LINE__); | 1184 | __func__, __LINE__); |
1184 | 1185 | ||
1185 | result = ps3_repository_read_bus_num_dev(repo.bus_index, | 1186 | result = ps3_repository_read_bus_num_dev(repo.bus_index, |
1186 | &num_dev); | 1187 | &num_dev); |
1187 | 1188 | ||
1188 | if (result) { | 1189 | if (result) { |
1189 | pr_debug("%s:%d read_bus_num_dev(%u) failed\n", | 1190 | pr_devel("%s:%d read_bus_num_dev(%u) failed\n", |
1190 | __func__, __LINE__, repo.bus_index); | 1191 | __func__, __LINE__, repo.bus_index); |
1191 | continue; | 1192 | continue; |
1192 | } | 1193 | } |
1193 | 1194 | ||
1194 | pr_debug("%s:%d bus_%u: bus_type %u, bus_id %lu, num_dev %u\n", | 1195 | pr_devel("%s:%d bus_%u: bus_type %u, bus_id %lu, num_dev %u\n", |
1195 | __func__, __LINE__, repo.bus_index, repo.bus_type, | 1196 | __func__, __LINE__, repo.bus_index, repo.bus_type, |
1196 | repo.bus_id, num_dev); | 1197 | (unsigned long)repo.bus_id, num_dev); |
1197 | 1198 | ||
1198 | dump_device_info(&repo, num_dev); | 1199 | dump_device_info(&repo, num_dev); |
1199 | } | 1200 | } |
1200 | 1201 | ||
1201 | pr_debug(" <- %s:%d\n", __func__, __LINE__); | 1202 | pr_devel(" <- %s:%d\n", __func__, __LINE__); |
1202 | return result; | 1203 | return result; |
1203 | } | 1204 | } |
1204 | 1205 | ||