• Manivannan Sadhasivam's avatar
    bus: mhi: core: Fix shadow declarations · 683e77ca
    Manivannan Sadhasivam authored
    This commit fixes below sparse warnings with W=2 about shadow
    declarations:
    
    drivers/bus/mhi/core/main.c: In function ‘parse_xfer_event’:
    drivers/bus/mhi/core/main.c:667:17: warning: declaration of ‘flags’ shadows a previous local [-Wshadow]
      667 |   unsigned long flags;
          |                 ^~~~~
    drivers/bus/mhi/core/main.c:565:16: note: shadowed declaration is here
      565 |  unsigned long flags = 0;
          |                ^~~~~
    drivers/bus/mhi/core/main.c: In function ‘mhi_process_ctrl_ev_ring’:
    drivers/bus/mhi/core/main.c:856:23: warning: declaration of ‘new_state’ shadows a previous local [-Wshadow]
      856 |     enum mhi_pm_state new_state;
          |                       ^~~~~~~~~
    drivers/bus/mhi/core/main.c:837:19: note: shadowed declaration is here
      837 |    enum mhi_state new_state;
          |                   ^~~~~~~~~
    Signed-off-by: default avatarManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    683e77ca
main.c 42.2 KB