0002-restool-yocto-build-issue.patch 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. From 802764f8ed76f927dff494558332b0b77de7ac65 Mon Sep 17 00:00:00 2001
  2. From: Ionut-robert Aron <[email protected]>
  3. Date: Fri, 16 Oct 2020 11:01:24 +0300
  4. Subject: [PATCH] restool: yocto build issue
  5. Prefix 'enum mc_cmd_status mc_status' with 'static' so restool can
  6. compile.
  7. Signed-off-by: Ionut-robert Aron <[email protected]>
  8. ---
  9. dpaiop_commands.c | 2 +-
  10. dpbp_commands.c | 2 +-
  11. dpci_commands.c | 2 +-
  12. dpcon_commands.c | 2 +-
  13. dpdbg_commands.c | 2 +-
  14. dpdcei_commands.c | 2 +-
  15. dpdmai_commands.c | 2 +-
  16. dpdmux_commands.c | 2 +-
  17. dpio_commands.c | 2 +-
  18. dpmac_commands.c | 2 +-
  19. dpmcp_commands.c | 2 +-
  20. dpni_commands.c | 2 +-
  21. dprc_commands.c | 2 +-
  22. dprc_commands_generate_dpl.c | 4 ++--
  23. dprtc_commands.c | 2 +-
  24. dpseci_commands.c | 2 +-
  25. dpsw_commands.c | 2 +-
  26. restool.c | 8 ++++----
  27. 18 files changed, 22 insertions(+), 22 deletions(-)
  28. --- a/dpaiop_commands.c
  29. +++ b/dpaiop_commands.c
  30. @@ -44,7 +44,7 @@
  31. #include "mc_v9/fsl_dpaiop.h"
  32. #include "mc_v10/fsl_dpaiop.h"
  33. -enum mc_cmd_status mc_status;
  34. +static enum mc_cmd_status mc_status;
  35. /**
  36. * dpaiop info command options
  37. --- a/dpbp_commands.c
  38. +++ b/dpbp_commands.c
  39. @@ -43,7 +43,7 @@
  40. #include "mc_v9/fsl_dpbp.h"
  41. #include "mc_v10/fsl_dpbp.h"
  42. -enum mc_cmd_status mc_status;
  43. +static enum mc_cmd_status mc_status;
  44. /**
  45. * dpbp info command options
  46. --- a/dpci_commands.c
  47. +++ b/dpci_commands.c
  48. @@ -44,7 +44,7 @@
  49. #include "mc_v9/fsl_dpci.h"
  50. #include "mc_v10/fsl_dpci.h"
  51. -enum mc_cmd_status mc_status;
  52. +static enum mc_cmd_status mc_status;
  53. /**
  54. * dpci info command options
  55. --- a/dpcon_commands.c
  56. +++ b/dpcon_commands.c
  57. @@ -44,7 +44,7 @@
  58. #include "mc_v9/fsl_dpcon.h"
  59. #include "mc_v10/fsl_dpcon.h"
  60. -enum mc_cmd_status mc_status;
  61. +static enum mc_cmd_status mc_status;
  62. /**
  63. * dpcon info command options
  64. --- a/dpdbg_commands.c
  65. +++ b/dpdbg_commands.c
  66. @@ -41,7 +41,7 @@
  67. #include "utils.h"
  68. #include "mc_v10/fsl_dpdbg.h"
  69. -enum mc_cmd_status mc_status;
  70. +static enum mc_cmd_status mc_status;
  71. enum dpdbg_info_options {
  72. INFO_OPT_HELP = 0,
  73. --- a/dpdcei_commands.c
  74. +++ b/dpdcei_commands.c
  75. @@ -43,7 +43,7 @@
  76. #include "mc_v9/fsl_dpdcei.h"
  77. #include "mc_v10/fsl_dpdcei.h"
  78. -enum mc_cmd_status mc_status;
  79. +static enum mc_cmd_status mc_status;
  80. /**
  81. * dpdcei info command options
  82. --- a/dpdmai_commands.c
  83. +++ b/dpdmai_commands.c
  84. @@ -42,7 +42,7 @@
  85. #include "mc_v9/fsl_dpdmai.h"
  86. #include "mc_v10/fsl_dpdmai.h"
  87. -enum mc_cmd_status mc_status;
  88. +static enum mc_cmd_status mc_status;
  89. /**
  90. * dpdmai info command options
  91. --- a/dpdmux_commands.c
  92. +++ b/dpdmux_commands.c
  93. @@ -47,7 +47,7 @@
  94. DPDMUX_OPT_BRIDGE_EN | \
  95. DPDMUX_OPT_CLS_MASK_SUPPORT)
  96. -enum mc_cmd_status mc_status;
  97. +static enum mc_cmd_status mc_status;
  98. /**
  99. * dpdmux info command options
  100. --- a/dpio_commands.c
  101. +++ b/dpio_commands.c
  102. @@ -43,7 +43,7 @@
  103. #include "mc_v9/fsl_dpio.h"
  104. #include "mc_v10/fsl_dpio.h"
  105. -enum mc_cmd_status mc_status;
  106. +static enum mc_cmd_status mc_status;
  107. /**
  108. * dpio info command options
  109. --- a/dpmac_commands.c
  110. +++ b/dpmac_commands.c
  111. @@ -43,7 +43,7 @@
  112. #include "mc_v9/fsl_dpmac.h"
  113. #include "mc_v10/fsl_dpmac.h"
  114. -enum mc_cmd_status mc_status;
  115. +static enum mc_cmd_status mc_status;
  116. /**
  117. * dpmac info command options
  118. --- a/dpmcp_commands.c
  119. +++ b/dpmcp_commands.c
  120. @@ -43,7 +43,7 @@
  121. #include "mc_v9/fsl_dpmcp.h"
  122. #include "mc_v10/fsl_dpmcp.h"
  123. -enum mc_cmd_status mc_status;
  124. +static enum mc_cmd_status mc_status;
  125. /**
  126. * dpmcp info command options
  127. --- a/dpni_commands.c
  128. +++ b/dpni_commands.c
  129. @@ -71,7 +71,7 @@
  130. DPNI_OPT_SINGLE_SENDER | \
  131. DPNI_OPT_CUSTOM_CG)
  132. -enum mc_cmd_status mc_status;
  133. +static enum mc_cmd_status mc_status;
  134. /**
  135. * max_dist: Maximum distribution size for Rx traffic class;
  136. --- a/dprc_commands.c
  137. +++ b/dprc_commands.c
  138. @@ -52,7 +52,7 @@
  139. DPRC_CFG_OPT_IRQ_CFG_ALLOWED | \
  140. DPRC_CFG_OPT_PL_ALLOWED)
  141. -enum mc_cmd_status mc_status;
  142. +static enum mc_cmd_status mc_status;
  143. /**
  144. * dprc sync command options
  145. --- a/dprc_commands_generate_dpl.c
  146. +++ b/dprc_commands_generate_dpl.c
  147. @@ -189,7 +189,7 @@ static struct container_list *container_
  148. static struct obj_list *obj_head;
  149. static struct conn_list *conn_head;
  150. -enum mc_cmd_status mc_status;
  151. +static enum mc_cmd_status mc_status;
  152. /**
  153. * compare_insert_obj - compare the newly added object node with existing ones,
  154. @@ -273,7 +273,7 @@ static int find_all_obj_desc(uint32_t dp
  155. int num_child_devices;
  156. int error = 0;
  157. - enum mc_cmd_status mc_status;
  158. + static enum mc_cmd_status mc_status;
  159. struct container_list *prev_cont;
  160. struct container_list *curr_cont;
  161. struct dprc_attributes dprc_attr;
  162. --- a/dprtc_commands.c
  163. +++ b/dprtc_commands.c
  164. @@ -42,7 +42,7 @@
  165. #include "mc_v9/fsl_dprtc.h"
  166. #include "mc_v10/fsl_dprtc.h"
  167. -enum mc_cmd_status mc_status;
  168. +static enum mc_cmd_status mc_status;
  169. /**
  170. * dprtc info command options
  171. --- a/dpseci_commands.c
  172. +++ b/dpseci_commands.c
  173. @@ -43,7 +43,7 @@
  174. #include "mc_v9/fsl_dpseci.h"
  175. #include "mc_v10/fsl_dpseci.h"
  176. -enum mc_cmd_status mc_status;
  177. +static enum mc_cmd_status mc_status;
  178. /**
  179. * dpseci info command options
  180. --- a/dpsw_commands.c
  181. +++ b/dpsw_commands.c
  182. @@ -50,7 +50,7 @@
  183. DPSW_OPT_FLOODING_METERING_DIS | \
  184. DPSW_OPT_METERING_EN)
  185. -enum mc_cmd_status mc_status;
  186. +static enum mc_cmd_status mc_status;
  187. /**
  188. * dpsw info command options
  189. --- a/restool.c
  190. +++ b/restool.c
  191. @@ -360,7 +360,7 @@ int find_target_obj_desc(uint32_t dprc_i
  192. {
  193. int num_child_devices;
  194. int error = 0;
  195. - enum mc_cmd_status mc_status;
  196. + static enum mc_cmd_status mc_status;
  197. assert(nesting_level <= MAX_DPRC_NESTING);
  198. @@ -492,7 +492,7 @@ int print_obj_verbose(struct dprc_obj_de
  199. uint16_t obj_handle;
  200. uint32_t irq_mask;
  201. uint32_t irq_status;
  202. - enum mc_cmd_status mc_status;
  203. + static enum mc_cmd_status mc_status;
  204. int error = 0;
  205. if (strcmp(target_obj_desc->type, "dprc") == 0 &&
  206. @@ -816,7 +816,7 @@ int parse_object_name(const char *obj_na
  207. int open_dprc(uint32_t dprc_id, uint16_t *dprc_handle)
  208. {
  209. int error;
  210. - enum mc_cmd_status mc_status;
  211. + static enum mc_cmd_status mc_status;
  212. error = dprc_open(&restool.mc_io, 0,
  213. dprc_id,
  214. @@ -1325,7 +1325,7 @@ int main(int argc, char *argv[])
  215. const char *cmd_name;
  216. bool mc_io_initialized = false;
  217. bool root_dprc_opened = false;
  218. - enum mc_cmd_status mc_status;
  219. + static enum mc_cmd_status mc_status;
  220. bool talk_to_mc = true;
  221. #ifdef DEBUG