Skip to content
  • Fancy Fang's avatar
    LF-335 drm/bridge: sec-dsim: solve fallthrough build warnings · 61b2db1d
    Fancy Fang authored
    
    
    There are some fallthrough build warnings reported by
    the GCC with -Wimplicit-fallthrough option like below:
    
    drivers/gpu/drm/bridge/sec-dsim.c: In function ‘sec_mipi_dsim_write_pl_to_sfr_fifo’:
    drivers/gpu/drm/bridge/sec-dsim.c:606:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      606 |   pl_data |= ((u8 *)payload)[2] << 16;
          |   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/bridge/sec-dsim.c:607:2: note: here
      607 |  case 2:
          |  ^~~~
    drivers/gpu/drm/bridge/sec-dsim.c:608:11: warning: this statement may fall through [-Wimplicit-fallthrough=]
      608 |   pl_data |= ((u8 *)payload)[1] << 8;
          |   ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/bridge/sec-dsim.c:609:2: note: here
      609 |  case 1:
          |  ^~~~
    drivers/gpu/drm/bridge/sec-dsim.c: In function ‘sec_mipi_dsim_read_pl_from_sfr_fifo’:
    drivers/gpu/drm/bridge/sec-dsim.c:687:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
      687 |     ((u8 *)payload)[2] = (pl >> 16) & 0xff;
          |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/bridge/sec-dsim.c:688:4: note: here
      688 |    case 2:
          |    ^~~~
    drivers/gpu/drm/bridge/sec-dsim.c:689:24: warning: this statement may fall through [-Wimplicit-fallthrough=]
      689 |     ((u8 *)payload)[1] = (pl >> 8) & 0xff;
          |     ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
    drivers/gpu/drm/bridge/sec-dsim.c:690:4: note: here
      690 |    case 1:
          |    ^~~~
    
    Signed-off-by: default avatarFancy Fang <chen.fang@nxp.com>
    Reviewed-by: default avatarHaibo Chen <haibo.chen@nxp.com>
    61b2db1d