Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp10382270imu; Wed, 5 Dec 2018 23:23:54 -0800 (PST) X-Google-Smtp-Source: AFSGD/U+0IBlh9een6vdJV7odaeZCN3qKC/VhvST8rOXCC7KQEXJasABODrcH0OMhPkDIvsiLE6l X-Received: by 2002:a17:902:c85:: with SMTP id 5mr27661369plt.339.1544081034112; Wed, 05 Dec 2018 23:23:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544081034; cv=none; d=google.com; s=arc-20160816; b=nlRBIUwPUAVMB3+7uL8c9zQqOFmcDlduznk1/aZYShEsqOtBhC4pxrPu+ZTotvQiT5 hlP66pBNqAU+WM0uvNj2xaZU5FtbF+WCKDymppHRSHg6EQWSfzFE67RIZGD0WjzWiPpL /q5IzwK5NMT0PFlk2qbuwTz14P9UaYj5jMLUf9Gxi25vThBDCGCqPm4S8MMKjkp8Pwye sIlji8T9E93BxCBP8J6FGYlN+TSPHVSyfUNY14aVtOY0z2ooMN5gDOkStxPgUb0r0tFs v3NnzHmmczztSJ2Ta+4s12pqdMb8EbfQwluBxJR7Zg2Op+5MuEJcnWJ3/mZ4ejoh81Wo bM2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=kzeec1239ivcnuNLGcmCDsvyczFkL5Uyw1UGVkoPRBs=; b=sCtF0D1qgXc8+wlf8fW3qvsCORlgGTkpLkLEjqi096PbyyIYgTKxwvPk/voLu5geuE VpI0RhjK29AIcYfQe42SoxyinrhN8dBashrdJj5jOcliTUXiiCIW4g+X9ebfvSQo/eC2 kIvXyS9s0sZkswZVIcl0wzfpQRDy+ZPih7f0U07WPf65VFj+4w8TI9aq888yP0gZQ1AJ BbEBssAl86m8+BPXDd1MCncHSIovtMAajSBClB1c5P3jMMhy1zDYAHz8+E4Q0XR1S99w 81/lc8K23mQmNb69Dv1P4A5L89e9b4Z6F4Vl+ughMBn4v19QZlSAmshcX8Xt7SEnTOZk JW4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=XPikO0kd; dkim=pass header.i=@codeaurora.org header.s=default header.b=oj0XVGeA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si9656764plz.263.2018.12.05.23.23.37; Wed, 05 Dec 2018 23:23:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=XPikO0kd; dkim=pass header.i=@codeaurora.org header.s=default header.b=oj0XVGeA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729090AbeLFHW5 (ORCPT + 99 others); Thu, 6 Dec 2018 02:22:57 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:35294 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728758AbeLFHW4 (ORCPT ); Thu, 6 Dec 2018 02:22:56 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E602C601C4; Thu, 6 Dec 2018 07:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544080976; bh=wz6qGcHWlFJDR0F7KbH9E1mxunYOg4RWT/B/5CAuHBs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=XPikO0kdgLwJe2SYlN9IE0d6Lw5uaVByNwR1rkrJyqbOGjBAT2xuvBl2/NoYgrrpR sf6unXYnQpesc2ROWSeOgYe5/pEQFtY8B/XtrIxtzcmLFhetRJkZv2fo6RCwZj0w3W bE1IeSP0M7hfYHex5Or1JVQ/bWAO6LSeAlwJBrUE= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 285E86028B; Thu, 6 Dec 2018 07:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544080971; bh=wz6qGcHWlFJDR0F7KbH9E1mxunYOg4RWT/B/5CAuHBs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=oj0XVGeAnbHD9Kcl0UUiboOopq1cQ9kUZ3/ya1c2B+yOU3ZEqsvnETGkurKEypNs9 Dkbj3jJv36qaKBgT8BIdMa/ZYoL7acM7C/SKV0xGD/41lXdJvbcrAddWg+Yuo0HMON 78OPXxvutkATFBAAty9GbZrVfiyPagYZWCe8gU40= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 06 Dec 2018 15:22:51 +0800 From: yuankuiz@codeaurora.org To: a.zummo@towertech.it, alexandre.belloni@bootlin.com Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rtc-owner@vger.kernel.org Subject: Re: [PATCH] rtc: proc: printf using alarm for alrm In-Reply-To: References: Message-ID: X-Sender: yuankuiz@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Kindly, this format change formats the rtc dump from: alrm_time : 00:00:00 alrm_date : 1970-01-01 alarm_IRQ : no alrm_pending : no to: alarm time : 00:00:00 alarm date : 1970-01-01 alarm IRQ : no alarm pending : no Thanks, BR//John Zhao On 2018-12-04 05:29 PM, yuankuiz@codeaurora.org wrote: > Hi, > > From 549bae59445c5ec67dd6a46f3ea4f58966d40c9b > > Current the struct rtc_wkalrm is dumped as > "alrm_" by printing converted from the struct > name of "alrm.*" directly. Shall we use the > "alarm *" to replace the "alrm_*" during this > dumping? > > Signed-off-by: John Zhao > --- > drivers/rtc/rtc-proc.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/rtc/rtc-proc.c b/drivers/rtc/rtc-proc.c > index a9dd921..d4a3c91 100644 > --- a/drivers/rtc/rtc-proc.c > +++ b/drivers/rtc/rtc-proc.c > @@ -58,7 +58,7 @@ static int rtc_proc_show(struct seq_file *seq, void > *offset) > > err = rtc_read_alarm(rtc, &alrm); > if (err == 0) { > - seq_printf(seq, "alrm_time\t: "); > + seq_printf(seq, "alarm time\t: "); > if ((unsigned int)alrm.time.tm_hour <= 24) > seq_printf(seq, "%02d:", alrm.time.tm_hour); > else > @@ -72,7 +72,7 @@ static int rtc_proc_show(struct seq_file *seq, void > *offset) > else > seq_printf(seq, "**\n"); > > - seq_printf(seq, "alrm_date\t: "); > + seq_printf(seq, "alarm date\t: "); > if ((unsigned int)alrm.time.tm_year <= 200) > seq_printf(seq, "%04d-", alrm.time.tm_year + 1900); > else > @@ -85,9 +85,9 @@ static int rtc_proc_show(struct seq_file *seq, void > *offset) > seq_printf(seq, "%02d\n", alrm.time.tm_mday); > else > seq_printf(seq, "**\n"); > - seq_printf(seq, "alarm_IRQ\t: %s\n", > + seq_printf(seq, "alarm IRQ\t: %s\n", > alrm.enabled ? "yes" : "no"); > - seq_printf(seq, "alrm_pending\t: %s\n", > + seq_printf(seq, "alarm pending\t: %s\n", > alrm.pending ? "yes" : "no"); > seq_printf(seq, "update IRQ enabled\t: %s\n", > (rtc->uie_rtctimer.enabled) ? "yes" : "no");