From patchwork Sun Apr 30 16:42:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karim Eshapa X-Patchwork-Id: 9706141 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 06859602BE for ; Sun, 30 Apr 2017 16:42:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA8F825EA6 for ; Sun, 30 Apr 2017 16:42:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC1B32582C; Sun, 30 Apr 2017 16:42:51 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID 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 6D5542582C for ; Sun, 30 Apr 2017 16:42:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1426470AbdD3Qmu (ORCPT ); Sun, 30 Apr 2017 12:42:50 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33561 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425968AbdD3Qmt (ORCPT ); Sun, 30 Apr 2017 12:42:49 -0400 Received: by mail-wm0-f65.google.com with SMTP id y10so20055900wmh.0; Sun, 30 Apr 2017 09:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=9Au4B0by2Vjzr12dFTsx79+OwD/hxC3CYQJKAtd3cfE=; b=DUQYgfqTLaZVlQN9WMz+lbP9zpn5thmZ2csF8mMc8AeoqTmC828/4E1NTzXDEtGekl X+u4c/X67cIWt/6rPGuDZXgwObKghT25KGBBGFvJhQDLKu222P2UntqJPXosBaMmrX8y oixvEkGKD5XVp/ZgnWe/2aRLcg9nTCnNfTRpTtvwf85zsQSc4Wwwm3YJCaqOgzPimrJj JG6CpXkbIDu5Ob68yeqxVzdfOSi0kr9Tcj+ncnCnumMDwmoPr+DxSzemY/HiSYfW3uu9 VA0+hVYlHb4vW9w52Osvt8piIJ0bSkOVoTm/6s8603PsWZ7lLeTengM011PDQ0mmMGk0 P3Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9Au4B0by2Vjzr12dFTsx79+OwD/hxC3CYQJKAtd3cfE=; b=AOGyRI0q1SIHvX4Hh7sz8oK5CvxnG+5mx7ARRT6RYp4K+0tOAvQqKt4/w41PxacSBD ydWPNquLR2W2kwGavOh0e6oQYPuKtbdD7ZeWYruS/DeCKCfF9RDsQyjw7GHXh8mjSpPi WteNaZ8Q3q+IxZwrsvHVgoZTg5as5g+jPgRO0tLnPPACsfFKidlynCgjfpqBkGPEz3GN GAlpdSQi8NTDfoZnJv+7j/UnRm4ZCWTM4tTdMIhn20My4/w4zIZXbbCObG/QJm272z7W tCzLdSQG0Z6osGCYMf2xJA4MLSSym31TwtmSKYYxVE16EINf8Ny1q9b+1Mt4P+A/Q9BG thzw== X-Gm-Message-State: AN3rC/7WsDt1NxoZfj+gihEp8r5OtmKw6Vomo4UKy/ZYc34eGZ34Arf/ J51B5CBeUsNmZw== X-Received: by 10.28.57.138 with SMTP id g132mr494647wma.92.1493570568022; Sun, 30 Apr 2017 09:42:48 -0700 (PDT) Received: from localhost.localdomain ([197.163.93.111]) by smtp.gmail.com with ESMTPSA id l45sm9579814wre.2.2017.04.30.09.42.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 30 Apr 2017 09:42:47 -0700 (PDT) From: Karim Eshapa To: tomi.valkeinen@ti.com Cc: b.zolnierkie@samsung.com, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, Karim Eshapa Subject: [PATCH] drivers:video:fbdev:omap:lcd_mipid.c: Use time comparison kernel macros Date: Sun, 30 Apr 2017 18:42:43 +0200 Message-Id: <1493570563-7188-1-git-send-email-karim.eshapa@gmail.com> X-Mailer: git-send-email 2.7.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 Use time_before_eq time comparison defind kernel macro that has safety check. Signed-off-by: Karim Eshapa --- drivers/video/fbdev/omap/lcd_mipid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/omap/lcd_mipid.c b/drivers/video/fbdev/omap/lcd_mipid.c index c81f150..df9e6eb 100644 --- a/drivers/video/fbdev/omap/lcd_mipid.c +++ b/drivers/video/fbdev/omap/lcd_mipid.c @@ -174,7 +174,7 @@ static void hw_guard_wait(struct mipid_device *md) { unsigned long wait = md->hw_guard_end - jiffies; - if ((long)wait > 0 && wait <= md->hw_guard_wait) { + if ((long)wait > 0 && time_before_eq(wait, md->hw_guard_wait)) { set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(wait); }