From patchwork Sat Mar 28 21:09:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaro Koskinen X-Patchwork-Id: 455707 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-wi0-x23c.google.com (mail-wi0-x23c.google.com [IPv6:2a00:1450:400c:c05::23c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B002114008F for ; Sun, 29 Mar 2015 08:10:18 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass reason="2048-bit key; unprotected key" header.d=googlegroups.com header.i=@googlegroups.com header.b=QLQKnkGo; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: by wivr20 with SMTP id r20sf4505282wiv.1 for ; Sat, 28 Mar 2015 14:10:14 -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=4WO77Q2DktijbtH7ocur3h/IFAIYViW4vSGiXCjYe7Q=; b=QLQKnkGoKVYSvkZsGKeI5in304twlDD4M+CCI2pF7ZhRxeIMo7hgI95L3A9JRvTOnB dqcifxPHPfhM3nWrbU8W8UFhz0c0HyZiPBBkbz/+p4fYatt91voLA1W3XhOQZXQw7nVF DDMb0AQigwOITlriG4GCNY5Odo0dDwfrE/9yCM+3vqwwYrH8hdw8tjT6AxRgnHPUffKp VjUAO8WNxy9fWW1eZ3oyFl4paoRA1PbEB1bp/5cKji+C92KQXepGDeljHLXt0oSHW8xO C3vcQEUx0BXvLs+lYnkX8nCra5UXv3AWREqZIzeUENs+KL+Wct82CU72OQ44ArfLeY8R erLw== X-Received: by 10.180.187.169 with SMTP id ft9mr21829wic.11.1427577014088; Sat, 28 Mar 2015 14:10:14 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.180.23.100 with SMTP id l4ls383623wif.7.gmail; Sat, 28 Mar 2015 14:10:13 -0700 (PDT) X-Received: by 10.180.101.39 with SMTP id fd7mr1227154wib.0.1427577013680; Sat, 28 Mar 2015 14:10:13 -0700 (PDT) Received: from filtteri5.pp.htv.fi (filtteri5.pp.htv.fi. [213.243.153.188]) by gmr-mx.google.com with ESMTP id b6si364668lbc.1.2015.03.28.14.10.13 for ; Sat, 28 Mar 2015 14:10:13 -0700 (PDT) Received-SPF: neutral (google.com: 213.243.153.188 is neither permitted nor denied by domain of aaro.koskinen@iki.fi) client-ip=213.243.153.188; Received: from localhost (localhost [127.0.0.1]) by filtteri5.pp.htv.fi (Postfix) with ESMTP id 971015A707C; Sat, 28 Mar 2015 23:10:02 +0200 (EET) X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Received: from smtp4.welho.com ([213.243.153.38]) by localhost (filtteri5.pp.htv.fi [213.243.153.188]) (amavisd-new, port 10024) with ESMTP id GQySo3a5h1XU; Sat, 28 Mar 2015 23:09:57 +0200 (EET) Received: from amd-fx-6350.bb.dnainternet.fi (91-145-91-118.bb.dnainternet.fi [91.145.91.118]) by smtp4.welho.com (Postfix) with ESMTP id 786A35BC017; Sat, 28 Mar 2015 23:10:08 +0200 (EET) From: Aaro Koskinen To: Alessandro Zummo , Alexandre Belloni , rtc-linux@googlegroups.com Cc: linux-kernel@vger.kernel.org, Aaro Koskinen Subject: [rtc-linux] [PATCH 2/3] rtc: __rtc_read_time: reduce log level Date: Sat, 28 Mar 2015 23:09:35 +0200 Message-Id: <1427576976-22353-2-git-send-email-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.2.0 In-Reply-To: <1427576976-22353-1-git-send-email-aaro.koskinen@iki.fi> References: <1427576976-22353-1-git-send-email-aaro.koskinen@iki.fi> X-Original-Sender: aaro.koskinen@iki.fi X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 213.243.153.188 is neither permitted nor denied by domain of aaro.koskinen@iki.fi) smtp.mail=aaro.koskinen@iki.fi 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: , __rtc_read_time logs should be debug logs instead of error logs. For example, when the RTC clock is not set, it's not really useful to print a kernel error log every time someone tries to read the clock: ~ # hwclock -r [ 604.508263] rtc rtc0: read_time: fail to read hwclock: RTC_RD_TIME: Invalid argument If there's a real error, it's likely that lower level or higher level code will tell it anyway. Make these logs debug logs, and also print the error code for the read failure. Signed-off-by: Aaro Koskinen Acked-by: Alexandre Belloni --- drivers/rtc/interface.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 37215cf..c786818 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c @@ -31,13 +31,14 @@ static int __rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm) memset(tm, 0, sizeof(struct rtc_time)); err = rtc->ops->read_time(rtc->dev.parent, tm); if (err < 0) { - dev_err(&rtc->dev, "read_time: fail to read\n"); + dev_dbg(&rtc->dev, "read_time: fail to read: %d\n", + err); return err; } err = rtc_valid_tm(tm); if (err < 0) - dev_err(&rtc->dev, "read_time: rtc_time isn't valid\n"); + dev_dbg(&rtc->dev, "read_time: rtc_time isn't valid\n"); } return err; }