0001-pci-Correct-cast-for-sandbox.patch 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From b9da5f937bd5ea4931ea17459bf79b2905d9594d Mon Sep 17 00:00:00 2001
  2. From: Simon Glass <sjg@chromium.org>
  3. Date: Sat, 15 Apr 2017 15:39:08 -0600
  4. Subject: [RFC 1/2] pci: Correct cast for sandbox
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. This gives a warning with some native compilers:
  9. cmd/pci.c:152:11: warning: format ‘%llx’ expects argument of type
  10. ‘long long unsigned int’, but argument 3 has type
  11. ‘u64 {aka long unsigned int}’ [-Wformat=]
  12. Fix it with a cast.
  13. Signed-off-by: Simon Glass <sjg@chromium.org>
  14. Series-notes:
  15. some notes
  16. about some things
  17. from the first commit
  18. END
  19. Commit-notes:
  20. Some notes about
  21. the first commit
  22. END
  23. ---
  24. cmd/pci.c | 3 ++-
  25. 1 file changed, 2 insertions(+), 1 deletion(-)
  26. diff --git a/cmd/pci.c b/cmd/pci.c
  27. index 41b4fff..fe27b4f 100644
  28. --- a/cmd/pci.c
  29. +++ b/cmd/pci.c
  30. @@ -150,7 +150,8 @@ int pci_bar_show(struct udevice *dev)
  31. if ((!is_64 && size_low) || (is_64 && size)) {
  32. size = ~size + 1;
  33. printf(" %d %#016llx %#016llx %d %s %s\n",
  34. - bar_id, base, size, is_64 ? 64 : 32,
  35. + bar_id, (unsigned long long)base,
  36. + (unsigned long long)size, is_64 ? 64 : 32,
  37. is_io ? "I/O" : "MEM",
  38. prefetchable ? "Prefetchable" : "");
  39. }
  40. --
  41. 2.7.4