0011-core-fastboot-fastboot.c-reorder-functions-to-avoid-.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. From 6919b6619a9c744d2220f7af6e211c50662ba94b Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  3. Date: Sun, 14 Jul 2024 11:41:10 +0200
  4. Subject: [PATCH] core/fastboot/fastboot.c: reorder functions to avoid implicit
  5. definition
  6. MIME-Version: 1.0
  7. Content-Type: text/plain; charset=UTF-8
  8. Content-Transfer-Encoding: 8bit
  9. The match_fastboot() function uses match_fastboot_with_serial() but is
  10. implemented before it, causing an implicit definition. Re-order the
  11. functions to avoid this.
  12. Fixes:
  13. core/fastboot/fastboot.c:191:12: error: implicit declaration of function ‘match_fastboot_with_serial’ [-Wimplicit-function-declaration]
  14. Upstream: N/A, we're too far from upstream
  15. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
  16. ---
  17. core/fastboot/fastboot.c | 10 +++++-----
  18. 1 file changed, 5 insertions(+), 5 deletions(-)
  19. diff --git a/core/fastboot/fastboot.c b/core/fastboot/fastboot.c
  20. index 3de6d7d..9b2c86f 100644
  21. --- a/core/fastboot/fastboot.c
  22. +++ b/core/fastboot/fastboot.c
  23. @@ -186,11 +186,6 @@ oops:
  24. }
  25. #endif
  26. -int match_fastboot(usb_ifc_info *info)
  27. -{
  28. - return match_fastboot_with_serial(info, serial);
  29. -}
  30. -
  31. int match_fastboot_with_serial(usb_ifc_info *info, const char *local_serial)
  32. {
  33. if(!(vendor_id && (info->dev_vendor == vendor_id)) &&
  34. @@ -217,6 +212,11 @@ int match_fastboot_with_serial(usb_ifc_info *info, const char *local_serial)
  35. return 0;
  36. }
  37. +int match_fastboot(usb_ifc_info *info)
  38. +{
  39. + return match_fastboot_with_serial(info, serial);
  40. +}
  41. +
  42. int list_devices_callback(usb_ifc_info *info)
  43. {
  44. if (match_fastboot_with_serial(info, NULL) == 0) {
  45. --
  46. 2.47.0