The patch titled drm: count reaches -1 has been added to the -mm tree. Its filename is drm-count-reaches-1.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: drm: count reaches -1 From: Roel Kluin <roel.kluin@xxxxxxxxx> With a postfix decrement in the test count will reach -1 rather than 0, subsequent tests fail. Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx> Cc: Dave Airlie <airlied@xxxxxxxx> Cc: Eric Anholt <eric@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/via/via_dma.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff -puN drivers/gpu/drm/via/via_dma.c~drm-count-reaches-1 drivers/gpu/drm/via/via_dma.c --- a/drivers/gpu/drm/via/via_dma.c~drm-count-reaches-1 +++ a/drivers/gpu/drm/via/via_dma.c @@ -481,11 +481,13 @@ static int via_wait_idle(drm_via_private { int count = 10000000; - while (!(VIA_READ(VIA_REG_STATUS) & VIA_VR_QUEUE_BUSY) && count--); + while (!(VIA_READ(VIA_REG_STATUS) & VIA_VR_QUEUE_BUSY) && --count) + ; - while (count-- && (VIA_READ(VIA_REG_STATUS) & + while (count && (VIA_READ(VIA_REG_STATUS) & (VIA_CMD_RGTR_BUSY | VIA_2D_ENG_BUSY | - VIA_3D_ENG_BUSY))) ; + VIA_3D_ENG_BUSY))) + --count; return count; } @@ -705,7 +707,7 @@ static int via_cmdbuf_size(struct drm_de switch (d_siz->func) { case VIA_CMDBUF_SPACE: while (((tmp_size = via_cmdbuf_space(dev_priv)) < d_siz->size) - && count--) { + && --count) { if (!d_siz->wait) { break; } @@ -717,7 +719,7 @@ static int via_cmdbuf_size(struct drm_de break; case VIA_CMDBUF_LAG: while (((tmp_size = via_cmdbuf_lag(dev_priv)) > d_siz->size) - && count--) { + && --count) { if (!d_siz->wait) { break; } _ Patches currently in -mm which might be from roel.kluin@xxxxxxxxx are linux-next.patch drm-fix-lock_test_with_return-macro.patch drm-count-reaches-1.patch pata-rb532-cf-platform_get_irq-failure-ignored.patch microblaze-iowrite-upon-timeout.patch uwb-event_size-should-be-signed.patch scsi-ncr53c8xx-div-reaches-1.patch scsi-pcmcia-nsp_cs-time_out-reaches-1.patch frv-duplicate-output_buffer-of-e03.patch frv-duplicate-output_buffer-of-e03-checkpatch-fixes.patch m68k-count-can-reach-51-not-50.patch bfin_5xx-misplaced-parentheses.patch serial-z85c30-bcm1480-loops-reach-1.patch ufs-sector_t-cannot-be-negative.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html