From patchwork Thu Apr 23 12:25:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 463943 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-pd0-x237.google.com (mail-pd0-x237.google.com [IPv6:2607:f8b0:400e:c02::237]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F069C1401EF for ; Thu, 23 Apr 2015 22:26:03 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="2048-bit key; unprotected key" header.d=googlegroups.com header.i=@googlegroups.com header.b=ZUkOn5In; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: by pdev10 with SMTP id v10sf3827445pde.1 for ; Thu, 23 Apr 2015 05:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=mime-version:from:to:cc:subject:date:message-id:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:content-type:precedence:mailing-list:list-id:list-post :list-help:list-archive:sender:list-subscribe:list-unsubscribe; bh=MjBopHjumOeLJtPexq31JWNGO2FAKjI3G316yDTFiuI=; b=ZUkOn5InVHnv2XueJVnAkeSytZ59Z219BERPONIJp543Avc7XZbuWLwTiBylWgRcjG /uqNu7koWTjzmrFrFlNTTxL5/QGYdcjmAzvXg4lf6YreKX4pQP+7dVwvGbWmz9ctAelm gYfj1wk0Ul7/C0p0u8OlcO9FilucR/W1UencUmqmQdQQQMT2K7WV+GexeD1QNGNnNrRt hc1tGlLqV3KiAJoqGDt9Ui2f9fgrAx+DBTdo9kttgVxuTqoPW+L9FKbJhO+ySthYGBIm K6Nfl7yexnxBFJZlQLY8DDGBC6r1haIqwihYGU7u5Y7MbAS0D5Ox9uaY1INZRWYEjEiv ffkQ== X-Received: by 10.140.100.136 with SMTP id s8mr28391qge.2.1429791961744; Thu, 23 Apr 2015 05:26:01 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.140.47.53 with SMTP id l50ls1002412qga.8.gmail; Thu, 23 Apr 2015 05:26:01 -0700 (PDT) X-Received: by 10.236.25.35 with SMTP id y23mr3771713yhy.9.1429791961473; Thu, 23 Apr 2015 05:26:01 -0700 (PDT) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com. [2607:f8b0:400e:c02::236]) by gmr-mx.google.com with ESMTPS id pc4si1053591pac.0.2015.04.23.05.26.01 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 23 Apr 2015 05:26:01 -0700 (PDT) Received-SPF: pass (google.com: domain of k.kozlowski.k@gmail.com designates 2607:f8b0:400e:c02::236 as permitted sender) client-ip=2607:f8b0:400e:c02::236; Received: by mail-pd0-x236.google.com with SMTP id nk13so17221511pdb.0 for ; Thu, 23 Apr 2015 05:26:01 -0700 (PDT) X-Received: by 10.68.205.67 with SMTP id le3mr4910275pbc.94.1429791961368; Thu, 23 Apr 2015 05:26:01 -0700 (PDT) Received: from localhost.localdomain ([125.130.175.98]) by mx.google.com with ESMTPSA id nz12sm1183224pdb.49.2015.04.23.05.25.58 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Apr 2015 05:26:00 -0700 (PDT) From: Krzysztof Kozlowski To: Alessandro Zummo , Alexandre Belloni , rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [rtc-linux] [PATCH 2/2] rtc: interface: Remove unused return value from rtc_timer_cancel() Date: Thu, 23 Apr 2015 21:25:40 +0900 Message-Id: <1429791940-22169-2-git-send-email-k.kozlowski.k@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1429791940-22169-1-git-send-email-k.kozlowski.k@gmail.com> References: <1429791940-22169-1-git-send-email-k.kozlowski.k@gmail.com> X-Original-Sender: k.kozlowski.k@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of k.kozlowski.k@gmail.com designates 2607:f8b0:400e:c02::236 as permitted sender) smtp.mail=k.kozlowski.k@gmail.com; dkim=pass header.i=@gmail.com; dmarc=pass (p=NONE dis=NONE) header.from=gmail.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: X-Google-Group-Id: 712029733259 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , The rtc_timer_cancel() always returns 0 and cannot fail (calls only other void-returning functions). Signed-off-by: Krzysztof Kozlowski --- drivers/rtc/interface.c | 4 +--- include/linux/rtc.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 96268fc11337..31f11ab214a0 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -983,14 +983,12 @@ int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer, * * Kernel interface to cancel an rtc_timer */ -int rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer) +void rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer) { - int ret = 0; mutex_lock(&rtc->ops_lock); if (timer->enabled) rtc_timer_remove(rtc, timer); mutex_unlock(&rtc->ops_lock); - return ret; } diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 85b48b29a143..381d12086ab3 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -204,7 +204,7 @@ int rtc_control(rtc_task_t *t, unsigned int cmd, unsigned long arg); void rtc_timer_init(struct rtc_timer *timer, void (*f)(void *p), void *data); int rtc_timer_start(struct rtc_device *rtc, struct rtc_timer *timer, ktime_t expires, ktime_t period); -int rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer); +void rtc_timer_cancel(struct rtc_device *rtc, struct rtc_timer *timer); void rtc_timer_do_work(struct work_struct *work); static inline bool is_leap_year(unsigned int year)