1. 01 8月, 2019 3 次提交
  2. 30 7月, 2019 3 次提交
  3. 26 7月, 2019 9 次提交
    • H
      virtio/s390: fix race on airq_areas[] · 4f419eb1
      Halil Pasic 提交于
      The access to airq_areas was racy ever since the adapter interrupts got
      introduced to virtio-ccw, but since commit 39c7dcb1 ("virtio/s390:
      make airq summary indicators DMA") this became an issue in practice as
      well. Namely before that commit the airq_info that got overwritten was
      still functional. After that commit however the two infos share a
      summary_indicator, which aggravates the situation. Which means
      auto-online mechanism occasionally hangs the boot with virtio_blk.
      Signed-off-by: NHalil Pasic <pasic@linux.ibm.com>
      Reported-by: NMarc Hartmayer <mhartmay@linux.ibm.com>
      Reviewed-by: NCornelia Huck <cohuck@redhat.com>
      Cc: stable@vger.kernel.org
      Fixes: 96b14536 ("virtio-ccw: virtio-ccw adapter interrupt support.")
      Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
      4f419eb1
    • G
      drm/i915: Mark expected switch fall-throughs · 2defb94e
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/gpu/drm/i915/gem/i915_gem_mman.c: In function ‘i915_gem_fault’:
      drivers/gpu/drm/i915/gem/i915_gem_mman.c:342:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (!i915_terminally_wedged(i915))
            ^
      drivers/gpu/drm/i915/gem/i915_gem_mman.c:345:2: note: here
        case -EAGAIN:
        ^~~~
      
      drivers/gpu/drm/i915/gem/i915_gem_pages.c: In function ‘i915_gem_object_map’:
      ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
       #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                               ^~~~
      drivers/gpu/drm/i915/gem/i915_gem_pages.c:270:3: note: in expansion of macro ‘MISSING_CASE’
         MISSING_CASE(type);
         ^~~~~~~~~~~~
      drivers/gpu/drm/i915/gem/i915_gem_pages.c:272:2: note: here
        case I915_MAP_WB:
        ^~~~
      
      drivers/gpu/drm/i915/i915_gpu_error.c: In function ‘error_record_engine_registers’:
      ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
       #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                               ^~~~
      drivers/gpu/drm/i915/i915_gpu_error.c:1196:5: note: in expansion of macro ‘MISSING_CASE’
           MISSING_CASE(engine->id);
           ^~~~~~~~~~~~
      drivers/gpu/drm/i915/i915_gpu_error.c:1197:4: note: here
          case RCS0:
          ^~~~
      
      drivers/gpu/drm/i915/display/intel_dp.c: In function ‘intel_dp_get_fia_supported_lane_count’:
      ./include/linux/compiler.h:78:22: warning: this statement may fall through [-Wimplicit-fallthrough=]
       # define unlikely(x) __builtin_expect(!!(x), 0)
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~
      ./include/asm-generic/bug.h:136:2: note: in expansion of macro ‘unlikely’
        unlikely(__ret_warn_on);     \
        ^~~~~~~~
      drivers/gpu/drm/i915/i915_utils.h:49:25: note: in expansion of macro ‘WARN’
       #define MISSING_CASE(x) WARN(1, "Missing case (%s == %ld)\n", \
                               ^~~~
      drivers/gpu/drm/i915/display/intel_dp.c:233:3: note: in expansion of macro ‘MISSING_CASE’
         MISSING_CASE(lane_info);
         ^~~~~~~~~~~~
      drivers/gpu/drm/i915/display/intel_dp.c:234:2: note: here
        case 1:
        ^~~~
      
      drivers/gpu/drm/i915/display/intel_display.c: In function ‘check_digital_port_conflicts’:
        CC [M]  drivers/gpu/drm/nouveau/nvkm/engine/disp/cursgv100.o
      drivers/gpu/drm/i915/display/intel_display.c:12043:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
          if (WARN_ON(!HAS_DDI(to_i915(dev))))
             ^
      drivers/gpu/drm/i915/display/intel_display.c:12046:3: note: here
         case INTEL_OUTPUT_DP:
         ^~~~
      
      Also, notice that the Makefile is modified to stop ignoring
      fall-through warnings. The -Wimplicit-fallthrough option
      will be enabled globally in v5.3.
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      2defb94e
    • G
      drm/amd/display: Mark expected switch fall-throughs · 9e878917
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable -Wimplicit-fallthrough.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      9e878917
    • G
      drm/amdkfd/kfd_mqd_manager_v10: Avoid fall-through warning · 12fce1ab
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, this patch silences
      the following warning:
      
      drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_mqd_manager_v10.c: In function ‘mqd_manager_init_v10’:
      ./include/linux/dynamic_debug.h:122:52: warning: this statement may fall through [-Wimplicit-fallthrough=]
       #define __dynamic_func_call(id, fmt, func, ...) do { \
                                                          ^
      ./include/linux/dynamic_debug.h:143:2: note: in expansion of macro ‘__dynamic_func_call’
        __dynamic_func_call(__UNIQUE_ID(ddebug), fmt, func, ##__VA_ARGS__)
        ^~~~~~~~~~~~~~~~~~~
      ./include/linux/dynamic_debug.h:153:2: note: in expansion of macro ‘_dynamic_func_call’
        _dynamic_func_call(fmt, __dynamic_pr_debug,  \
        ^~~~~~~~~~~~~~~~~~
      ./include/linux/printk.h:336:2: note: in expansion of macro ‘dynamic_pr_debug’
        dynamic_pr_debug(fmt, ##__VA_ARGS__)
        ^~~~~~~~~~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_mqd_manager_v10.c:432:3: note: in expansion of macro ‘pr_debug’
         pr_debug("%s@%i\n", __func__, __LINE__);
         ^~~~~~~~
      drivers/gpu/drm/amd/amdgpu/../amdkfd/kfd_mqd_manager_v10.c:433:2: note: here
        case KFD_MQD_TYPE_COMPUTE:
        ^~~~
      
      by removing the call to pr_debug() in KFD_MQD_TYPE_CP:
      
      "The mqd init for CP and COMPUTE will have the same  routine." [1]
      
      This bug was found thanks to the ongoing efforts to enable
      -Wimplicit-fallthrough.
      
      [1] https://lore.kernel.org/lkml/c735a1cc-a545-50fb-44e7-c0ad93ee8ee7@amd.com/Reviewed-by: NAlex Deucher <alexdeucher@gmail.com>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      12fce1ab
    • G
      drm/amdgpu/gfx10: Fix missing break in switch statement · d64062b5
      Gustavo A. R. Silva 提交于
      Add missing break statement in order to prevent the code from falling
      through to case AMDGPU_IRQ_STATE_ENABLE.
      
      This bug was found thanks to the ongoing efforts to enable
      -Wimplicit-fallthrough.
      
      Fixes: a644d85a ("drm/amdgpu: add gfx v10 implementation (v10)")
      Cc: stable@vger.kernel.org
      Reviewed-by: NAlex Deucher <alexdeucher@gmail.com>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      d64062b5
    • G
      drm/amdkfd: Fix missing break in switch statement · 737298d1
      Gustavo A. R. Silva 提交于
      Add missing break statement in order to prevent the code from falling
      through to case CHIP_NAVI10.
      
      This bug was found thanks to the ongoing efforts to enable
      -Wimplicit-fallthrough.
      
      Fixes: 14328aa5 ("drm/amdkfd: Add navi10 support to amdkfd. (v3)")
      Cc: stable@vger.kernel.org
      Reviewed-by: NAlex Deucher <alexdeucher@gmail.com>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      737298d1
    • G
      mtd: onenand_base: Mark expected switch fall-through · cc407044
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/mtd/nand/onenand/onenand_base.c: In function ‘onenand_check_features’:
      drivers/mtd/nand/onenand/onenand_base.c:3264:17: warning: this statement may fall through [-Wimplicit-fallthrough=]
         this->options |= ONENAND_HAS_NOP_1;
      drivers/mtd/nand/onenand/onenand_base.c:3265:2: note: here
        case ONENAND_DEVICE_DENSITY_4Gb:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      
      Cc: Jonathan Bakker <xc-racer2@live.ca>
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      cc407044
    • G
      can: mark expected switch fall-throughs · 5a8dadbc
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch cases
      where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/net/can/peak_canfd/peak_pciefd_main.c:668:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/net/can/spi/mcp251x.c:875:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/net/can/usb/peak_usb/pcan_usb.c:422:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/net/can/at91_can.c:895:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/net/can/at91_can.c:953:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
      drivers/net/can/usb/peak_usb/pcan_usb.c: In function ‘pcan_usb_decode_error’:
      drivers/net/can/usb/peak_usb/pcan_usb.c:422:6: warning: this statement may fall through [-Wimplicit-fallthrough=]
         if (n & PCAN_USB_ERROR_BUS_LIGHT) {
            ^
      drivers/net/can/usb/peak_usb/pcan_usb.c:428:2: note: here
        case CAN_STATE_ERROR_WARNING:
        ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enabling
      -Wimplicit-fallthrough.
      
      Notice that in some cases spelling mistakes were fixed.
      In other cases, the /* fall through */ comment is placed
      at the bottom of the case statement, which is what GCC
      is expecting to find.
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      5a8dadbc
    • G
      firewire: mark expected switch fall-throughs · eba6120d
      Gustavo A. R. Silva 提交于
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warnings:
      
      drivers/firewire/core-device.c: In function ‘set_broadcast_channel’:
      drivers/firewire/core-device.c:969:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
          if (data & cpu_to_be32(1 << 31)) {
             ^
      drivers/firewire/core-device.c:974:3: note: here
         case RCODE_ADDRESS_ERROR:
         ^~~~
      drivers/firewire/core-iso.c: In function ‘manage_channel’:
      drivers/firewire/core-iso.c:308:7: warning: this statement may fall through [-Wimplicit-fallthrough=]
          if ((data[0] & bit) == (data[1] & bit))
             ^
      drivers/firewire/core-iso.c:312:3: note: here
         default:
         ^~~~~~~
      drivers/firewire/core-topology.c: In function ‘count_ports’:
      drivers/firewire/core-topology.c:69:23: warning: this statement may fall through [-Wimplicit-fallthrough=]
          (*child_port_count)++;
          ~~~~~~~~~~~~~~~~~~~^~
      drivers/firewire/core-topology.c:70:3: note: here
         case SELFID_PORT_PARENT:
         ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      Notice that in some cases, the code comment is modified in
      accordance with what GCC is expecting to find.
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      
      Cc: Kees Cook <keescook@chromium.org>
      Cc: Mathieu Malaterre <malat@debian.org>
      Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (reworded a comment)
      Signed-off-by: NGustavo A. R. Silva <gustavo@embeddedor.com>
      eba6120d
  4. 25 7月, 2019 13 次提交
  5. 24 7月, 2019 11 次提交
  6. 23 7月, 2019 1 次提交