drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c:124:: possible unintended fallthrough ?

David Binderman dcb314 at hotmail.com
Tue May 2 16:05:29 UTC 2017


Hello there,

drivers/gpu/drm/nouveau/nvkm/engine/dma/usernv04.c:124:18: warning: this statement may fall through [-Wimplicit-fallthrough=]

Source code is

    switch (dmaobj->base.access) {
    case NV_MEM_ACCESS_RO:
        dmaobj->flags0 |= 0x00004000;
        break;
    case NV_MEM_ACCESS_WO:
        dmaobj->flags0 |= 0x00008000;
    case NV_MEM_ACCESS_RW:
        dmaobj->flags2 |= 0x00000002;
        break;
    default:
        return -EINVAL;
    }

Suggest either document the fallthrough or add the missing break.

Regards

David Binderman



More information about the dri-devel mailing list