From patchwork Mon Jul 25 17:12:47 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicholas Mc Guire X-Patchwork-Id: 9246303 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 276D860757 for ; Mon, 25 Jul 2016 18:14:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1D5AE26538 for ; Mon, 25 Jul 2016 18:14:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 11C2527813; Mon, 25 Jul 2016 18:14:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9010A26538 for ; Mon, 25 Jul 2016 18:14:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753269AbcGYSOY (ORCPT ); Mon, 25 Jul 2016 14:14:24 -0400 Received: from www.osadl.org ([62.245.132.105]:32873 "EHLO www.osadl.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753423AbcGYSOY (ORCPT ); Mon, 25 Jul 2016 14:14:24 -0400 X-Greylist: delayed 3868 seconds by postgrey-1.27 at vger.kernel.org; Mon, 25 Jul 2016 14:14:22 EDT Received: from debian01.hofrr.at (mail.osadl.at [92.243.35.153]) by www.osadl.org (8.13.8/8.13.8/OSADL-2007092901) with ESMTP id u6PH9dKC022942; Mon, 25 Jul 2016 19:09:39 +0200 From: Nicholas Mc Guire To: Tomi Valkeinen Cc: Jean-Christophe Plagniol-Villard , Rob Clark , Dave Airlie , Peter Ujfalusi , Luis de Bethencourt , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, Nicholas Mc Guire Subject: [PATCH] omapfb/dss: wait_for_completion_interruptible_timeout expects long Date: Mon, 25 Jul 2016 19:12:47 +0200 Message-Id: <1469466767-23352-1-git-send-email-hofrat@osadl.org> X-Mailer: git-send-email 2.1.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP wait_for_completion_timeout_interruptible returns long not unsigned long. an appropriately typed variable is introduced and assignments fixed up. Fixes: f76ee892a99e ("omapfb: copy omapdss & displays for omapfb") Signed-off-by: Nicholas Mc Guire --- API non-compliance was located by coccinelle This is mostly cosmetic since the returned value is only compared at present, however if remaining time (completion occurred) where ever used, then a signal received would be interpreted as a large remaining jiffies left, which would be wrong. Compile tested with: omap2plus_defconfig (implies CONFIG_FB_OMAP2_DSS) Patch is against 4.7.0-rc7 (localversion-next -next-20160724) drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c b/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c index 3691bde..a864608 100644 --- a/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c +++ b/drivers/video/fbdev/omap2/omapfb/dss/dispc-compat.c @@ -644,6 +644,7 @@ int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask, { int r; + long time_left; DECLARE_COMPLETION_ONSTACK(completion); r = omap_dispc_register_isr(dispc_irq_wait_handler, &completion, @@ -652,15 +653,15 @@ int omap_dispc_wait_for_irq_interruptible_timeout(u32 irqmask, if (r) return r; - timeout = wait_for_completion_interruptible_timeout(&completion, + time_left = wait_for_completion_interruptible_timeout(&completion, timeout); omap_dispc_unregister_isr(dispc_irq_wait_handler, &completion, irqmask); - if (timeout == 0) + if (time_left == 0) return -ETIMEDOUT; - if (timeout == -ERESTARTSYS) + if (time_left == -ERESTARTSYS) return -ERESTARTSYS; return 0;