From patchwork Fri Nov 10 08:59:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 10052621 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 05EAB6032D for ; Fri, 10 Nov 2017 09:00:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC70C2B2BE for ; Fri, 10 Nov 2017 09:00:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFA152B2C0; Fri, 10 Nov 2017 09:00:23 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7D2752B2BE for ; Fri, 10 Nov 2017 09:00:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=0+7/sD4VSzj3Yii0sOsQE35exjQ4aSOHyLX6Uds9ULc=; b=Qcy 2vIwpewcHU+IGyHvVkNfnjuGJHgM2yUuhg0cVGl4JI/toKGFjYbWjZmajmnXF5uotDI96xm/th5E/ puBpLAaP54AfKw501HRnq5e2ZFW2V4Ls9xFMw5LBrcr1G9jXuC+v0L1R/nFKDN8fgqk5nGYB46SVX 5Mq0OGyxSAbciozfO4GRHuAlgrLIc0BW1SudlN2s3rebZPBan4A6QLYuEwv9JtchUZo7+X6hM6M5x N98iFHJk9ksNgIeI/dVFisKt16CQ9vQU/56GADjEYDuUEq5H1XPtvmVEfH5gd+OX7DtKxdEfXxU2F jk7XKoo8fxWOFi76d4xmxas1hLLjerg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eD5Al-0003OT-32; Fri, 10 Nov 2017 09:00:23 +0000 Received: from mail.free-electrons.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eD5Ac-0001Fq-35 for linux-arm-kernel@lists.infradead.org; Fri, 10 Nov 2017 09:00:20 +0000 Received: by mail.free-electrons.com (Postfix, from userid 110) id 576E220DD5; Fri, 10 Nov 2017 09:59:49 +0100 (CET) Received: from localhost (unknown [222.106.29.56]) by mail.free-electrons.com (Postfix) with ESMTPSA id 23E4A20710; Fri, 10 Nov 2017 09:59:37 +0100 (CET) From: Alexandre Belloni To: linux-rtc@vger.kernel.org Subject: [PATCH 1/2] rtc: at91rm9200: stop calculating yday in at91_rtc_readalarm Date: Fri, 10 Nov 2017 09:59:30 +0100 Message-Id: <20171110085931.32347-1-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 2.15.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171110_010014_315025_EF858F27 X-CRM114-Status: GOOD ( 10.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Calculating yday in the read_alarm callback is useless as this value is never used later. Also, it was buggy anyway because at the time this is done, tm_year is always 0 as the alarm register doesn't hold the year. Signed-off-by: Alexandre Belloni Acked-by: Nicolas Ferre --- drivers/rtc/rtc-at91rm9200.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/rtc/rtc-at91rm9200.c b/drivers/rtc/rtc-at91rm9200.c index e221b78b6f10..e84f5ec4faf6 100644 --- a/drivers/rtc/rtc-at91rm9200.c +++ b/drivers/rtc/rtc-at91rm9200.c @@ -208,7 +208,6 @@ static int at91_rtc_readalarm(struct device *dev, struct rtc_wkalrm *alrm) struct rtc_time *tm = &alrm->time; at91_rtc_decodetime(AT91_RTC_TIMALR, AT91_RTC_CALALR, tm); - tm->tm_yday = rtc_year_days(tm->tm_mday, tm->tm_mon, tm->tm_year); tm->tm_year = at91_alarm_year - 1900; alrm->enabled = (at91_rtc_read_imr() & AT91_RTC_ALARM)