Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11166434imu; Thu, 6 Dec 2018 12:39:36 -0800 (PST) X-Google-Smtp-Source: AFSGD/WbLFwmDAohyKKrFkesNtUISbLNnM1HPGtWX3lOmTvcz3uziMdblMiupq9uG5YUt9DFiovL X-Received: by 2002:a63:f412:: with SMTP id g18mr25738884pgi.262.1544128776771; Thu, 06 Dec 2018 12:39:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544128776; cv=none; d=google.com; s=arc-20160816; b=ryZD2dLvwl0u8XUOJz0A+u1lLqeY4k0mjiEgR3vGpkcnIYwfWKNt3qyHP4EAjkyM4S dxJ8UpRGmXjxLu91EXQazjYTG/A9a5pQNXHOp9uAJaMSgRwmDpf29qg99f2YO4gDBrWv AtCJP8spEJ8V/QACmCcxAhpc8YQm98DwUvcaTGUFD4BUmxUx7Mvo4MkfCDeyRZuRMnAv nUuvwzaJlRFRMG6o69lOZnfbP30bNJRgohAuIACLZDPUrNm+PDwk8FoIBkL77KRMFysT qxwFYQFh1jC652pKmkJBpo9s+yFbwqQ9dbdjJE5yuUnt8/HyUfY72f2ssqLBbAugiENK 5/pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=FRw9xqDpkK2Mlz7BH9FMdYr05oTthlh5el0XoPagZY0=; b=WgGXB37mmxnpDcxUbt/ry8qYJaRMVuamh2uyLmY7J0mZjQEi8Cs85DcU8LspZtiOrO a9pMxiUrlenCrDLbJgu05crNVPMOL3IAg6yRIydgceH5ygdya0yf5wRhAay2HIoR5gD1 HPNDPhFpIDQUrFsV1umGdf6HVWRKnSnrkVC1Eh457XKZtO1mYx8GwgCc11WYshw966fo yWHd/LOMzYyVPx6HBuR/gn4APTWST2B0SbVRVW2BRpYFRTgHzHjYvobIT7Ij6p1PU4Cp IvYwvAt/5v5lyn62xz+mtRENtncxzwaEQRKQ5UzWvF0vrbRlmnQvi/m0BiuVzqzxBOqP mrHA== ARC-Authentication-Results: i=1; mx.google.com; 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 k62si1095435pfc.208.2018.12.06.12.39.13; Thu, 06 Dec 2018 12:39:36 -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; 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 S1726018AbeLFUib (ORCPT + 99 others); Thu, 6 Dec 2018 15:38:31 -0500 Received: from mail.bootlin.com ([62.4.15.54]:58281 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725967AbeLFUib (ORCPT ); Thu, 6 Dec 2018 15:38:31 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id AA47620734; Thu, 6 Dec 2018 21:38:28 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED,URIBL_RHS_DOB shortcircuit=ham autolearn=disabled version=3.4.2 Received: from localhost (unknown [88.191.26.124]) by mail.bootlin.com (Postfix) with ESMTPSA id 5AB7920510; Thu, 6 Dec 2018 21:38:28 +0100 (CET) Date: Thu, 6 Dec 2018 21:38:27 +0100 From: Alexandre Belloni To: yuankuiz@codeaurora.org Cc: a.zummo@towertech.it, 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 Message-ID: <20181206203827.GE8952@piout.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/12/2018 15:22:51+0800, yuankuiz@codeaurora.org wrote: > 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 > Yes, and this would break the ABI as this file is in procfs. This is not something I'm willing to do, especially since this file has been deprecated since 2006. > 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"); -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com