Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58859C433EF for ; Fri, 7 Jan 2022 12:50:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346685AbiAGMuC (ORCPT ); Fri, 7 Jan 2022 07:50:02 -0500 Received: from mx-out.tlen.pl ([193.222.135.175]:28786 "EHLO mx-out.tlen.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238599AbiAGMtw (ORCPT ); Fri, 7 Jan 2022 07:49:52 -0500 Received: (wp-smtpd smtp.tlen.pl 30266 invoked from network); 7 Jan 2022 13:49:50 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=o2.pl; s=1024a; t=1641559790; bh=w/qrsc4grUh1824eway08T4plw/l668dOPbY45JfCXk=; h=From:To:Cc:Subject; b=MYvTuVVOBK+7lhzT/jsM/EXtxhwc6lr1xpB9tu7fqFgHR/JsCHy6Z5TpaJzqIwtUX be5ukBIQq2pgy7ee+HneitPbyLJNnMgv5BVGGcCVrO/8IT51WEM0QrQD4ZKXxQOcIR d3NnFj6O6dnbbGpoDWViEFFAYhCa6Z5W01k+sJug= Received: from aafo3.neoplus.adsl.tpnet.pl (HELO localhost.localdomain) (mat.jonczyk@o2.pl@[83.4.144.3]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with SMTP for ; 7 Jan 2022 13:49:50 +0100 From: =?UTF-8?q?Mateusz=20Jo=C5=84czyk?= To: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Mateusz=20Jo=C5=84czyk?= , Alessandro Zummo , Alexandre Belloni Subject: [PATCH v5 2/9] rtc: change return values of mc146818_get_time() Date: Fri, 7 Jan 2022 13:49:27 +0100 Message-Id: <20220107124934.159878-3-mat.jonczyk@o2.pl> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220107124934.159878-1-mat.jonczyk@o2.pl> References: <20220107124934.159878-1-mat.jonczyk@o2.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-WP-MailID: fbd2579288885e9a46f68bb24a19d88d X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 0000000 [YfO0] Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No function is checking mc146818_get_time() return values yet, so correct them to make them more customary. Signed-off-by: Mateusz Jończyk Cc: Alessandro Zummo Cc: Alexandre Belloni --- drivers/rtc/rtc-mc146818-lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/rtc-mc146818-lib.c b/drivers/rtc/rtc-mc146818-lib.c index dcfaf09946ee..c186c8c4982b 100644 --- a/drivers/rtc/rtc-mc146818-lib.c +++ b/drivers/rtc/rtc-mc146818-lib.c @@ -25,7 +25,7 @@ unsigned int mc146818_get_time(struct rtc_time *time) if (WARN_ON_ONCE((CMOS_READ(RTC_VALID) & 0x40) != 0)) { spin_unlock_irqrestore(&rtc_lock, flags); memset(time, 0xff, sizeof(*time)); - return 0; + return -EIO; } /* @@ -116,7 +116,7 @@ unsigned int mc146818_get_time(struct rtc_time *time) time->tm_mon--; - return RTC_24H; + return 0; } EXPORT_SYMBOL_GPL(mc146818_get_time); -- 2.25.1