From patchwork Fri Oct 6 13:04:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 822401 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="aHKcKRkk"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3y7qhv17Nwz9t41 for ; Sat, 7 Oct 2017 00:09:02 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 6C76AC21D7E; Fri, 6 Oct 2017 13:07:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E3129C21DC3; Fri, 6 Oct 2017 13:06:54 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id B1210C21C34; Fri, 6 Oct 2017 13:06:51 +0000 (UTC) Received: from mail.nic.cz (mail.nic.cz [217.31.204.67]) by lists.denx.de (Postfix) with ESMTPS id F40DEC21C34 for ; Fri, 6 Oct 2017 13:06:50 +0000 (UTC) Received: from dellmb.labs.office.nic.cz (unknown [IPv6:2001:1488:fffe:6:8982:ed8c:62b1:c0c8]) by mail.nic.cz (Postfix) with ESMTP id 9E0006181E; Fri, 6 Oct 2017 15:06:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1507295210; bh=8oZzQGEQwaqYJkqu6JzKGuJM6uaaXLIkD9vF3or0/Wo=; h=From:To:Date; b=aHKcKRkkl7Wnu6DC6K+qvLwYrUfo2ZiSBUzJH4KFJDzuuK+7vWz1Q4iIIdFGElWON giftoeIvY23JxnAJfqrYyCMTdpBJneNIUdcWuBWfxzu5p4Qv9kx886UPUXpCSvLUOK VfC7bUL2Fj8cWA0pnQ9S0UMQsyFTmm2VCUHsQd5Y= From: =?utf-8?q?Marek_Beh=C3=BAn?= To: u-boot@lists.denx.de Date: Fri, 6 Oct 2017 15:04:56 +0200 Message-Id: <20171006130459.29127-1-marek.behun@nic.cz> X-Mailer: git-send-email 2.13.6 X-Virus-Scanned: clamav-milter 0.99.2 at mail X-Virus-Status: Clean Subject: [U-Boot] [PATCH 1/4] linux/time.h: Remove dead code X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since rem = ((long) *tim_p) % SECSPERDAY; the second while cycle while (rem >= SECSPERDAY) is dead. Reported-by: Coverity (CID: 167334) Signed-off-by: Marek Behun --- include/linux/time.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/include/linux/time.h b/include/linux/time.h index bf12b99d37..b8d298eb4d 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -93,11 +93,6 @@ _DEFUN (localtime_r, (tim_p, res), rem += SECSPERDAY; --days; } - while (rem >= SECSPERDAY) - { - rem -= SECSPERDAY; - ++days; - } /* compute hour, min, and sec */ res->tm_hour = (int) (rem / SECSPERHOUR);