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

staging: vc04_services: don't print pointers directly

kernel pointers should be printed with %pK and are not unsigned int big
on all architectures. So fix this up to get rid of a bunch of warning
messages.

Note, there are other assumptions in this code that a pointer fits into
an int that need to be fixed up later.

Cc: Daniel Stone <daniels@collabora.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Cc: Pranith Kumar <bobby.prani@gmail.com>
Cc: popcornmix <popcornmix@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+124 -189
+6 -6
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
··· 171 171 } 172 172 173 173 vchiq_log_info(vchiq_arm_log_level, 174 - "vchiq_init - done (slots %x, phys %pad)", 175 - (unsigned int)vchiq_slot_zero, &slot_phys); 174 + "vchiq_init - done (slots %pK, phys %pad)", 175 + vchiq_slot_zero, &slot_phys); 176 176 177 177 vchiq_call_connected_callbacks(); 178 178 ··· 386 386 (num_pages * sizeof(pages[0])), 387 387 GFP_KERNEL); 388 388 389 - vchiq_log_trace(vchiq_arm_log_level, 390 - "create_pagelist - %x", (unsigned int)pagelist); 389 + vchiq_log_trace(vchiq_arm_log_level, "create_pagelist - %pK", 390 + pagelist); 391 391 if (!pagelist) 392 392 return -ENOMEM; 393 393 ··· 511 511 struct page **pages; 512 512 unsigned int num_pages, i; 513 513 514 - vchiq_log_trace(vchiq_arm_log_level, 515 - "free_pagelist - %x, %d", (unsigned int)pagelist, actual); 514 + vchiq_log_trace(vchiq_arm_log_level, "free_pagelist - %pK, %d", 515 + pagelist, actual); 516 516 517 517 num_pages = 518 518 (pagelist->length + pagelist->offset + PAGE_SIZE - 1) /
+15 -21
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
··· 418 418 DEBUG_INITIALISE(g_state.local) 419 419 420 420 vchiq_log_trace(vchiq_arm_log_level, 421 - "vchiq_ioctl - instance %x, cmd %s, arg %lx", 422 - (unsigned int)instance, 421 + "vchiq_ioctl - instance %pK, cmd %s, arg %lx", 422 + instance, 423 423 ((_IOC_TYPE(cmd) == VCHIQ_IOC_MAGIC) && 424 424 (_IOC_NR(cmd) <= VCHIQ_IOC_MAX)) ? 425 425 ioctl_names[_IOC_NR(cmd)] : "<invalid>", arg); ··· 713 713 break; 714 714 } 715 715 vchiq_log_info(vchiq_arm_log_level, 716 - "found bulk_waiter %x for pid %d", 717 - (unsigned int)waiter, current->pid); 716 + "found bulk_waiter %pK for pid %d", waiter, 717 + current->pid); 718 718 args.userdata = &waiter->bulk_waiter; 719 719 } 720 720 status = vchiq_bulk_transfer ··· 743 743 list_add(&waiter->list, &instance->bulk_waiter_list); 744 744 mutex_unlock(&instance->bulk_waiter_list_mutex); 745 745 vchiq_log_info(vchiq_arm_log_level, 746 - "saved bulk_waiter %x for pid %d", 747 - (unsigned int)waiter, current->pid); 746 + "saved bulk_waiter %pK for pid %d", 747 + waiter, current->pid); 748 748 749 749 if (copy_to_user((void __user *) 750 750 &(((VCHIQ_QUEUE_BULK_TRANSFER_T __user *) ··· 826 826 if (args.msgbufsize < msglen) { 827 827 vchiq_log_error( 828 828 vchiq_arm_log_level, 829 - "header %x: msgbufsize" 830 - " %x < msglen %x", 831 - (unsigned int)header, 832 - args.msgbufsize, 829 + "header %pK: msgbufsize %x < msglen %x", 830 + header, args.msgbufsize, 833 831 msglen); 834 832 WARN(1, "invalid message " 835 833 "size\n"); ··· 978 980 ret = -EFAULT; 979 981 } else { 980 982 vchiq_log_error(vchiq_arm_log_level, 981 - "header %x: bufsize %x < size %x", 982 - (unsigned int)header, args.bufsize, 983 - header->size); 983 + "header %pK: bufsize %x < size %x", 984 + header, args.bufsize, header->size); 984 985 WARN(1, "invalid size\n"); 985 986 ret = -EMSGSIZE; 986 987 } ··· 1281 1284 list); 1282 1285 list_del(pos); 1283 1286 vchiq_log_info(vchiq_arm_log_level, 1284 - "bulk_waiter - cleaned up %x " 1285 - "for pid %d", 1286 - (unsigned int)waiter, waiter->pid); 1287 + "bulk_waiter - cleaned up %pK for pid %d", 1288 + waiter, waiter->pid); 1287 1289 kfree(waiter); 1288 1290 } 1289 1291 } ··· 1381 1385 instance = service->instance; 1382 1386 if (instance && !instance->mark) { 1383 1387 len = snprintf(buf, sizeof(buf), 1384 - "Instance %x: pid %d,%s completions " 1385 - "%d/%d", 1386 - (unsigned int)instance, instance->pid, 1388 + "Instance %pK: pid %d,%s completions %d/%d", 1389 + instance, instance->pid, 1387 1390 instance->connected ? " connected, " : 1388 1391 "", 1389 1392 instance->completion_insert - ··· 1410 1415 char buf[80]; 1411 1416 int len; 1412 1417 1413 - len = snprintf(buf, sizeof(buf), " instance %x", 1414 - (unsigned int)service->instance); 1418 + len = snprintf(buf, sizeof(buf), " instance %pK", service->instance); 1415 1419 1416 1420 if ((service->base.callback == service_callback) && 1417 1421 user_service->is_vchi) {
+99 -157
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_core.c
··· 380 380 VCHIQ_HEADER_T *header, void *bulk_userdata) 381 381 { 382 382 VCHIQ_STATUS_T status; 383 - vchiq_log_trace(vchiq_core_log_level, "%d: callback:%d (%s, %x, %x)", 383 + vchiq_log_trace(vchiq_core_log_level, "%d: callback:%d (%s, %pK, %pK)", 384 384 service->state->id, service->localport, reason_names[reason], 385 - (unsigned int)header, (unsigned int)bulk_userdata); 385 + header, bulk_userdata); 386 386 status = service->base.callback(reason, header, service->handle, 387 387 bulk_userdata); 388 388 if (status == VCHIQ_ERROR) { ··· 620 620 char *data = (char *)SLOT_DATA_FROM_INDEX(state, slot_index); 621 621 int data_found = 0; 622 622 623 - vchiq_log_trace(vchiq_core_log_level, "%d: pfq %d=%x %x %x", 624 - state->id, slot_index, (unsigned int)data, 623 + vchiq_log_trace(vchiq_core_log_level, "%d: pfq %d=%pK %x %x", 624 + state->id, slot_index, data, 625 625 local->slot_queue_recycle, slot_queue_available); 626 626 627 627 /* Initialise the bitmask for services which have used this ··· 653 653 up(&service_quota->quota_event); 654 654 else if (count == 0) { 655 655 vchiq_log_error(vchiq_core_log_level, 656 - "service %d " 657 - "message_use_count=%d " 658 - "(header %x, msgid %x, " 659 - "header->msgid %x, " 660 - "header->size %x)", 656 + "service %d message_use_count=%d (header %pK, msgid %x, header->msgid %x, header->size %x)", 661 657 port, 662 - service_quota-> 663 - message_use_count, 664 - (unsigned int)header, msgid, 665 - header->msgid, 658 + service_quota->message_use_count, 659 + header, msgid, header->msgid, 666 660 header->size); 667 661 WARN(1, "invalid message use count\n"); 668 662 } ··· 678 684 up(&service_quota->quota_event); 679 685 vchiq_log_trace( 680 686 vchiq_core_log_level, 681 - "%d: pfq:%d %x@%x - " 682 - "slot_use->%d", 687 + "%d: pfq:%d %x@%pK - slot_use->%d", 683 688 state->id, port, 684 - header->size, 685 - (unsigned int)header, 689 + header->size, header, 686 690 count - 1); 687 691 } else { 688 692 vchiq_log_error( 689 693 vchiq_core_log_level, 690 - "service %d " 691 - "slot_use_count" 692 - "=%d (header %x" 693 - ", msgid %x, " 694 - "header->msgid" 695 - " %x, header->" 696 - "size %x)", 697 - port, count, 698 - (unsigned int)header, 699 - msgid, 700 - header->msgid, 694 + "service %d slot_use_count=%d (header %pK, msgid %x, header->msgid %x, header->size %x)", 695 + port, count, header, 696 + msgid, header->msgid, 701 697 header->size); 702 698 WARN(1, "bad slot use count\n"); 703 699 } ··· 699 715 pos += calc_stride(header->size); 700 716 if (pos > VCHIQ_SLOT_SIZE) { 701 717 vchiq_log_error(vchiq_core_log_level, 702 - "pfq - pos %x: header %x, msgid %x, " 703 - "header->msgid %x, header->size %x", 704 - pos, (unsigned int)header, msgid, 705 - header->msgid, header->size); 718 + "pfq - pos %x: header %pK, msgid %x, header->msgid %x, header->size %x", 719 + pos, header, msgid, header->msgid, 720 + header->size); 706 721 WARN(1, "invalid slot position\n"); 707 722 } 708 723 } ··· 845 862 int slot_use_count; 846 863 847 864 vchiq_log_info(vchiq_core_log_level, 848 - "%d: qm %s@%x,%x (%d->%d)", 849 - state->id, 850 - msg_type_str(VCHIQ_MSG_TYPE(msgid)), 851 - (unsigned int)header, size, 852 - VCHIQ_MSG_SRCPORT(msgid), 865 + "%d: qm %s@%pK,%x (%d->%d)", 866 + state->id, msg_type_str(VCHIQ_MSG_TYPE(msgid)), 867 + header, size, VCHIQ_MSG_SRCPORT(msgid), 853 868 VCHIQ_MSG_DSTPORT(msgid)); 854 869 855 870 BUG_ON(!service); ··· 911 930 VCHIQ_SERVICE_STATS_ADD(service, ctrl_tx_bytes, size); 912 931 } else { 913 932 vchiq_log_info(vchiq_core_log_level, 914 - "%d: qm %s@%x,%x (%d->%d)", state->id, 933 + "%d: qm %s@%pK,%x (%d->%d)", state->id, 915 934 msg_type_str(VCHIQ_MSG_TYPE(msgid)), 916 - (unsigned int)header, size, 917 - VCHIQ_MSG_SRCPORT(msgid), 935 + header, size, VCHIQ_MSG_SRCPORT(msgid), 918 936 VCHIQ_MSG_DSTPORT(msgid)); 919 937 if (size != 0) { 920 938 WARN_ON(!((count == 1) && (size == elements[0].size))); ··· 995 1015 int i, pos; 996 1016 997 1017 vchiq_log_info(vchiq_sync_log_level, 998 - "%d: qms %s@%x,%x (%d->%d)", state->id, 1018 + "%d: qms %s@%pK,%x (%d->%d)", state->id, 999 1019 msg_type_str(VCHIQ_MSG_TYPE(msgid)), 1000 - (unsigned int)header, size, 1001 - VCHIQ_MSG_SRCPORT(msgid), 1020 + header, size, VCHIQ_MSG_SRCPORT(msgid), 1002 1021 VCHIQ_MSG_DSTPORT(msgid)); 1003 1022 1004 1023 for (i = 0, pos = 0; i < (unsigned int)count; ··· 1026 1047 VCHIQ_SERVICE_STATS_ADD(service, ctrl_tx_bytes, size); 1027 1048 } else { 1028 1049 vchiq_log_info(vchiq_sync_log_level, 1029 - "%d: qms %s@%x,%x (%d->%d)", state->id, 1050 + "%d: qms %s@%pK,%x (%d->%d)", state->id, 1030 1051 msg_type_str(VCHIQ_MSG_TYPE(msgid)), 1031 - (unsigned int)header, size, 1032 - VCHIQ_MSG_SRCPORT(msgid), 1052 + header, size, VCHIQ_MSG_SRCPORT(msgid), 1033 1053 VCHIQ_MSG_DSTPORT(msgid)); 1034 1054 if (size != 0) { 1035 1055 WARN_ON(!((count == 1) && (size == elements[0].size))); ··· 1328 1350 "Send Bulk to" : "Recv Bulk from"; 1329 1351 if (bulk->actual != VCHIQ_BULK_ACTUAL_ABORTED) 1330 1352 vchiq_log_info(SRVTRACE_LEVEL(service), 1331 - "%s %c%c%c%c d:%d len:%d %x<->%x", 1353 + "%s %c%c%c%c d:%d len:%d %pK<->%pK", 1332 1354 header, 1333 1355 VCHIQ_FOURCC_AS_4CHARS( 1334 1356 service->base.fourcc), 1335 - service->remoteport, 1336 - bulk->size, 1337 - (unsigned int)bulk->data, 1338 - (unsigned int)bulk->remote_data); 1357 + service->remoteport, bulk->size, 1358 + bulk->data, bulk->remote_data); 1339 1359 else 1340 1360 vchiq_log_info(SRVTRACE_LEVEL(service), 1341 1361 "%s %c%c%c%c d:%d ABORTED - tx len:%d," 1342 - " rx len:%d %x<->%x", 1362 + " rx len:%d %pK<->%pK", 1343 1363 header, 1344 1364 VCHIQ_FOURCC_AS_4CHARS( 1345 1365 service->base.fourcc), 1346 1366 service->remoteport, 1347 - bulk->size, 1348 - bulk->remote_size, 1349 - (unsigned int)bulk->data, 1350 - (unsigned int)bulk->remote_data); 1367 + bulk->size, bulk->remote_size, 1368 + bulk->data, bulk->remote_data); 1351 1369 } 1352 1370 1353 1371 vchiq_complete_bulk(bulk); ··· 1479 1505 1480 1506 fourcc = payload->fourcc; 1481 1507 vchiq_log_info(vchiq_core_log_level, 1482 - "%d: prs OPEN@%x (%d->'%c%c%c%c')", 1483 - state->id, (unsigned int)header, 1484 - localport, 1508 + "%d: prs OPEN@%pK (%d->'%c%c%c%c')", 1509 + state->id, header, localport, 1485 1510 VCHIQ_FOURCC_AS_4CHARS(fourcc)); 1486 1511 1487 1512 service = get_listening_service(state, fourcc); ··· 1651 1678 remoteport); 1652 1679 if (service) 1653 1680 vchiq_log_warning(vchiq_core_log_level, 1654 - "%d: prs %s@%x (%d->%d) - " 1655 - "found connected service %d", 1681 + "%d: prs %s@%pK (%d->%d) - found connected service %d", 1656 1682 state->id, msg_type_str(type), 1657 - (unsigned int)header, 1658 - remoteport, localport, 1683 + header, remoteport, localport, 1659 1684 service->localport); 1660 1685 } 1661 1686 1662 1687 if (!service) { 1663 1688 vchiq_log_error(vchiq_core_log_level, 1664 - "%d: prs %s@%x (%d->%d) - " 1665 - "invalid/closed service %d", 1689 + "%d: prs %s@%pK (%d->%d) - invalid/closed service %d", 1666 1690 state->id, msg_type_str(type), 1667 - (unsigned int)header, 1668 - remoteport, localport, localport); 1691 + header, remoteport, localport, 1692 + localport); 1669 1693 goto skip_message; 1670 1694 } 1671 1695 break; ··· 1690 1720 if (((unsigned int)header & VCHIQ_SLOT_MASK) + calc_stride(size) 1691 1721 > VCHIQ_SLOT_SIZE) { 1692 1722 vchiq_log_error(vchiq_core_log_level, 1693 - "header %x (msgid %x) - size %x too big for " 1694 - "slot", 1695 - (unsigned int)header, (unsigned int)msgid, 1723 + "header %pK (msgid %x) - size %x too big for slot", 1724 + header, (unsigned int)msgid, 1696 1725 (unsigned int)size); 1697 1726 WARN(1, "oversized for slot\n"); 1698 1727 } ··· 1710 1741 service->peer_version = payload->version; 1711 1742 } 1712 1743 vchiq_log_info(vchiq_core_log_level, 1713 - "%d: prs OPENACK@%x,%x (%d->%d) v:%d", 1714 - state->id, (unsigned int)header, size, 1715 - remoteport, localport, service->peer_version); 1744 + "%d: prs OPENACK@%pK,%x (%d->%d) v:%d", 1745 + state->id, header, size, remoteport, localport, 1746 + service->peer_version); 1716 1747 if (service->srvstate == 1717 1748 VCHIQ_SRVSTATE_OPENING) { 1718 1749 service->remoteport = remoteport; ··· 1728 1759 WARN_ON(size != 0); /* There should be no data */ 1729 1760 1730 1761 vchiq_log_info(vchiq_core_log_level, 1731 - "%d: prs CLOSE@%x (%d->%d)", 1732 - state->id, (unsigned int)header, 1733 - remoteport, localport); 1762 + "%d: prs CLOSE@%pK (%d->%d)", 1763 + state->id, header, remoteport, localport); 1734 1764 1735 1765 mark_service_closing_internal(service, 1); 1736 1766 ··· 1745 1777 break; 1746 1778 case VCHIQ_MSG_DATA: 1747 1779 vchiq_log_info(vchiq_core_log_level, 1748 - "%d: prs DATA@%x,%x (%d->%d)", 1749 - state->id, (unsigned int)header, size, 1750 - remoteport, localport); 1780 + "%d: prs DATA@%pK,%x (%d->%d)", 1781 + state->id, header, size, remoteport, localport); 1751 1782 1752 1783 if ((service->remoteport == remoteport) 1753 1784 && (service->srvstate == ··· 1769 1802 break; 1770 1803 case VCHIQ_MSG_CONNECT: 1771 1804 vchiq_log_info(vchiq_core_log_level, 1772 - "%d: prs CONNECT@%x", 1773 - state->id, (unsigned int)header); 1805 + "%d: prs CONNECT@%pK", state->id, header); 1774 1806 state->version_common = ((VCHIQ_SLOT_ZERO_T *) 1775 1807 state->slot_data)->version; 1776 1808 up(&state->connect); ··· 1803 1837 wmb(); 1804 1838 1805 1839 vchiq_log_info(vchiq_core_log_level, 1806 - "%d: prs %s@%x (%d->%d) %x@%x", 1840 + "%d: prs %s@%pK (%d->%d) %x@%pK", 1807 1841 state->id, msg_type_str(type), 1808 - (unsigned int)header, 1809 - remoteport, localport, 1810 - bulk->remote_size, 1811 - (unsigned int)bulk->remote_data); 1842 + header, remoteport, localport, 1843 + bulk->remote_size, bulk->remote_data); 1812 1844 1813 1845 queue->remote_insert++; 1814 1846 ··· 1859 1895 if ((int)(queue->remote_insert - 1860 1896 queue->local_insert) >= 0) { 1861 1897 vchiq_log_error(vchiq_core_log_level, 1862 - "%d: prs %s@%x (%d->%d) " 1898 + "%d: prs %s@%pK (%d->%d) " 1863 1899 "unexpected (ri=%d,li=%d)", 1864 1900 state->id, msg_type_str(type), 1865 - (unsigned int)header, 1866 - remoteport, localport, 1901 + header, remoteport, localport, 1867 1902 queue->remote_insert, 1868 1903 queue->local_insert); 1869 1904 mutex_unlock(&service->bulk_mutex); ··· 1878 1915 queue->remote_insert++; 1879 1916 1880 1917 vchiq_log_info(vchiq_core_log_level, 1881 - "%d: prs %s@%x (%d->%d) %x@%x", 1918 + "%d: prs %s@%pK (%d->%d) %x@%pK", 1882 1919 state->id, msg_type_str(type), 1883 - (unsigned int)header, 1884 - remoteport, localport, 1885 - bulk->actual, (unsigned int)bulk->data); 1920 + header, remoteport, localport, 1921 + bulk->actual, bulk->data); 1886 1922 1887 1923 vchiq_log_trace(vchiq_core_log_level, 1888 1924 "%d: prs:%d %cx li=%x ri=%x p=%x", ··· 1903 1941 break; 1904 1942 case VCHIQ_MSG_PADDING: 1905 1943 vchiq_log_trace(vchiq_core_log_level, 1906 - "%d: prs PADDING@%x,%x", 1907 - state->id, (unsigned int)header, size); 1944 + "%d: prs PADDING@%pK,%x", 1945 + state->id, header, size); 1908 1946 break; 1909 1947 case VCHIQ_MSG_PAUSE: 1910 1948 /* If initiated, signal the application thread */ 1911 1949 vchiq_log_trace(vchiq_core_log_level, 1912 - "%d: prs PAUSE@%x,%x", 1913 - state->id, (unsigned int)header, size); 1950 + "%d: prs PAUSE@%pK,%x", 1951 + state->id, header, size); 1914 1952 if (state->conn_state == VCHIQ_CONNSTATE_PAUSED) { 1915 1953 vchiq_log_error(vchiq_core_log_level, 1916 1954 "%d: PAUSE received in state PAUSED", ··· 1933 1971 break; 1934 1972 case VCHIQ_MSG_RESUME: 1935 1973 vchiq_log_trace(vchiq_core_log_level, 1936 - "%d: prs RESUME@%x,%x", 1937 - state->id, (unsigned int)header, size); 1974 + "%d: prs RESUME@%pK,%x", 1975 + state->id, header, size); 1938 1976 /* Release the slot mutex */ 1939 1977 mutex_unlock(&state->slot_mutex); 1940 1978 if (state->is_master) ··· 1955 1993 1956 1994 default: 1957 1995 vchiq_log_error(vchiq_core_log_level, 1958 - "%d: prs invalid msgid %x@%x,%x", 1959 - state->id, msgid, (unsigned int)header, size); 1996 + "%d: prs invalid msgid %x@%pK,%x", 1997 + state->id, msgid, header, size); 1960 1998 WARN(1, "invalid message\n"); 1961 1999 break; 1962 2000 } ··· 2121 2159 2122 2160 if (!service) { 2123 2161 vchiq_log_error(vchiq_sync_log_level, 2124 - "%d: sf %s@%x (%d->%d) - " 2125 - "invalid/closed service %d", 2162 + "%d: sf %s@%pK (%d->%d) - invalid/closed service %d", 2126 2163 state->id, msg_type_str(type), 2127 - (unsigned int)header, 2128 - remoteport, localport, localport); 2164 + header, remoteport, localport, localport); 2129 2165 release_message_sync(state, header); 2130 2166 continue; 2131 2167 } ··· 2153 2193 service->peer_version = payload->version; 2154 2194 } 2155 2195 vchiq_log_info(vchiq_sync_log_level, 2156 - "%d: sf OPENACK@%x,%x (%d->%d) v:%d", 2157 - state->id, (unsigned int)header, size, 2158 - remoteport, localport, service->peer_version); 2196 + "%d: sf OPENACK@%pK,%x (%d->%d) v:%d", 2197 + state->id, header, size, remoteport, localport, 2198 + service->peer_version); 2159 2199 if (service->srvstate == VCHIQ_SRVSTATE_OPENING) { 2160 2200 service->remoteport = remoteport; 2161 2201 vchiq_set_service_state(service, ··· 2168 2208 2169 2209 case VCHIQ_MSG_DATA: 2170 2210 vchiq_log_trace(vchiq_sync_log_level, 2171 - "%d: sf DATA@%x,%x (%d->%d)", 2172 - state->id, (unsigned int)header, size, 2173 - remoteport, localport); 2211 + "%d: sf DATA@%pK,%x (%d->%d)", 2212 + state->id, header, size, remoteport, localport); 2174 2213 2175 2214 if ((service->remoteport == remoteport) && 2176 2215 (service->srvstate == ··· 2187 2228 2188 2229 default: 2189 2230 vchiq_log_error(vchiq_sync_log_level, 2190 - "%d: sf unexpected msgid %x@%x,%x", 2191 - state->id, msgid, (unsigned int)header, size); 2231 + "%d: sf unexpected msgid %x@%pK,%x", 2232 + state->id, msgid, header, size); 2192 2233 release_message_sync(state, header); 2193 2234 break; 2194 2235 } ··· 2269 2310 int i; 2270 2311 2271 2312 vchiq_log_warning(vchiq_core_log_level, 2272 - "%s: slot_zero = 0x%08lx, is_master = %d", 2273 - __func__, (unsigned long)slot_zero, is_master); 2313 + "%s: slot_zero = %pK, is_master = %d", 2314 + __func__, slot_zero, is_master); 2274 2315 2275 2316 /* Check the input configuration */ 2276 2317 2277 2318 if (slot_zero->magic != VCHIQ_MAGIC) { 2278 2319 vchiq_loud_error_header(); 2279 2320 vchiq_loud_error("Invalid VCHIQ magic value found."); 2280 - vchiq_loud_error("slot_zero=%x: magic=%x (expected %x)", 2281 - (unsigned int)slot_zero, slot_zero->magic, VCHIQ_MAGIC); 2321 + vchiq_loud_error("slot_zero=%pK: magic=%x (expected %x)", 2322 + slot_zero, slot_zero->magic, VCHIQ_MAGIC); 2282 2323 vchiq_loud_error_footer(); 2283 2324 return VCHIQ_ERROR; 2284 2325 } ··· 2286 2327 if (slot_zero->version < VCHIQ_VERSION_MIN) { 2287 2328 vchiq_loud_error_header(); 2288 2329 vchiq_loud_error("Incompatible VCHIQ versions found."); 2289 - vchiq_loud_error("slot_zero=%x: VideoCore version=%d " 2290 - "(minimum %d)", 2291 - (unsigned int)slot_zero, slot_zero->version, 2292 - VCHIQ_VERSION_MIN); 2330 + vchiq_loud_error("slot_zero=%pK: VideoCore version=%d (minimum %d)", 2331 + slot_zero, slot_zero->version, VCHIQ_VERSION_MIN); 2293 2332 vchiq_loud_error("Restart with a newer VideoCore image."); 2294 2333 vchiq_loud_error_footer(); 2295 2334 return VCHIQ_ERROR; ··· 2296 2339 if (VCHIQ_VERSION < slot_zero->version_min) { 2297 2340 vchiq_loud_error_header(); 2298 2341 vchiq_loud_error("Incompatible VCHIQ versions found."); 2299 - vchiq_loud_error("slot_zero=%x: version=%d (VideoCore " 2300 - "minimum %d)", 2301 - (unsigned int)slot_zero, VCHIQ_VERSION, 2302 - slot_zero->version_min); 2342 + vchiq_loud_error("slot_zero=%pK: version=%d (VideoCore minimum %d)", 2343 + slot_zero, VCHIQ_VERSION, slot_zero->version_min); 2303 2344 vchiq_loud_error("Restart with a newer kernel."); 2304 2345 vchiq_loud_error_footer(); 2305 2346 return VCHIQ_ERROR; ··· 2309 2354 (slot_zero->max_slots_per_side != VCHIQ_MAX_SLOTS_PER_SIDE)) { 2310 2355 vchiq_loud_error_header(); 2311 2356 if (slot_zero->slot_zero_size != sizeof(VCHIQ_SLOT_ZERO_T)) 2312 - vchiq_loud_error("slot_zero=%x: slot_zero_size=%x " 2313 - "(expected %x)", 2314 - (unsigned int)slot_zero, 2315 - slot_zero->slot_zero_size, 2316 - sizeof(VCHIQ_SLOT_ZERO_T)); 2357 + vchiq_loud_error("slot_zero=%pK: slot_zero_size=%d (expected %d)", 2358 + slot_zero, slot_zero->slot_zero_size, 2359 + (int)sizeof(VCHIQ_SLOT_ZERO_T)); 2317 2360 if (slot_zero->slot_size != VCHIQ_SLOT_SIZE) 2318 - vchiq_loud_error("slot_zero=%x: slot_size=%d " 2319 - "(expected %d", 2320 - (unsigned int)slot_zero, slot_zero->slot_size, 2361 + vchiq_loud_error("slot_zero=%pK: slot_size=%d (expected %d)", 2362 + slot_zero, slot_zero->slot_size, 2321 2363 VCHIQ_SLOT_SIZE); 2322 2364 if (slot_zero->max_slots != VCHIQ_MAX_SLOTS) 2323 - vchiq_loud_error("slot_zero=%x: max_slots=%d " 2324 - "(expected %d)", 2325 - (unsigned int)slot_zero, slot_zero->max_slots, 2365 + vchiq_loud_error("slot_zero=%pK: max_slots=%d (expected %d)", 2366 + slot_zero, slot_zero->max_slots, 2326 2367 VCHIQ_MAX_SLOTS); 2327 2368 if (slot_zero->max_slots_per_side != VCHIQ_MAX_SLOTS_PER_SIDE) 2328 - vchiq_loud_error("slot_zero=%x: max_slots_per_side=%d " 2329 - "(expected %d)", 2330 - (unsigned int)slot_zero, 2331 - slot_zero->max_slots_per_side, 2369 + vchiq_loud_error("slot_zero=%pK: max_slots_per_side=%d (expected %d)", 2370 + slot_zero, slot_zero->max_slots_per_side, 2332 2371 VCHIQ_MAX_SLOTS_PER_SIDE); 2333 2372 vchiq_loud_error_footer(); 2334 2373 return VCHIQ_ERROR; ··· 2699 2750 if ((port == service->localport) && 2700 2751 (msgid & VCHIQ_MSGID_CLAIMED)) { 2701 2752 vchiq_log_info(vchiq_core_log_level, 2702 - " fsi - hdr %x", 2703 - (unsigned int)header); 2753 + " fsi - hdr %pK", header); 2704 2754 release_slot(state, slot_info, header, 2705 2755 NULL); 2706 2756 } 2707 2757 pos += calc_stride(header->size); 2708 2758 if (pos > VCHIQ_SLOT_SIZE) { 2709 2759 vchiq_log_error(vchiq_core_log_level, 2710 - "fsi - pos %x: header %x, " 2711 - "msgid %x, header->msgid %x, " 2712 - "header->size %x", 2713 - pos, (unsigned int)header, 2714 - msgid, header->msgid, 2715 - header->size); 2760 + "fsi - pos %x: header %pK, msgid %x, header->msgid %x, header->size %x", 2761 + pos, header, msgid, 2762 + header->msgid, header->size); 2716 2763 WARN(1, "invalid slot position\n"); 2717 2764 } 2718 2765 } ··· 3280 3335 wmb(); 3281 3336 3282 3337 vchiq_log_info(vchiq_core_log_level, 3283 - "%d: bt (%d->%d) %cx %x@%x %x", 3284 - state->id, 3285 - service->localport, service->remoteport, dir_char, 3286 - size, (unsigned int)bulk->data, (unsigned int)userdata); 3338 + "%d: bt (%d->%d) %cx %x@%pK %pK", 3339 + state->id, service->localport, service->remoteport, dir_char, 3340 + size, bulk->data, userdata); 3287 3341 3288 3342 /* The slot mutex must be held when the service is being closed, so 3289 3343 claim it here to ensure that isn't happening */ ··· 3629 3685 vchiq_dump(dump_context, buf, len + 1); 3630 3686 3631 3687 len = snprintf(buf, sizeof(buf), 3632 - " tx_pos=%x(@%x), rx_pos=%x(@%x)", 3688 + " tx_pos=%x(@%pK), rx_pos=%x(@%pK)", 3633 3689 state->local->tx_pos, 3634 - (uint32_t)state->tx_data + 3635 - (state->local_tx_pos & VCHIQ_SLOT_MASK), 3690 + state->tx_data + (state->local_tx_pos & VCHIQ_SLOT_MASK), 3636 3691 state->rx_pos, 3637 - (uint32_t)state->rx_data + 3638 - (state->rx_pos & VCHIQ_SLOT_MASK)); 3692 + state->rx_data + (state->rx_pos & VCHIQ_SLOT_MASK)); 3639 3693 vchiq_dump(dump_context, buf, len + 1); 3640 3694 3641 3695 len = snprintf(buf, sizeof(buf),
+4 -5
drivers/staging/vc04_services/interface/vchiq_arm/vchiq_kern_lib.c
··· 155 155 list); 156 156 list_del(pos); 157 157 vchiq_log_info(vchiq_arm_log_level, 158 - "bulk_waiter - cleaned up %x " 159 - "for pid %d", 160 - (unsigned int)waiter, waiter->pid); 158 + "bulk_waiter - cleaned up %pK for pid %d", 159 + waiter, waiter->pid); 161 160 kfree(waiter); 162 161 } 163 162 kfree(instance); ··· 449 450 list_add(&waiter->list, &instance->bulk_waiter_list); 450 451 mutex_unlock(&instance->bulk_waiter_list_mutex); 451 452 vchiq_log_info(vchiq_arm_log_level, 452 - "saved bulk_waiter %x for pid %d", 453 - (unsigned int)waiter, current->pid); 453 + "saved bulk_waiter %pK for pid %d", 454 + waiter, current->pid); 454 455 } 455 456 456 457 return status;