From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B07EC43381 for ; Mon, 25 Mar 2019 16:10:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 594D92087C for ; Mon, 25 Mar 2019 16:10:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726024AbfCYQKP (ORCPT ); Mon, 25 Mar 2019 12:10:15 -0400 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:39513 "EHLO relay1-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725788AbfCYQKO (ORCPT ); Mon, 25 Mar 2019 12:10:14 -0400 X-Originating-IP: 109.213.38.144 Received: from localhost (alyon-652-1-47-144.w109-213.abo.wanadoo.fr [109.213.38.144]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 610BB24000C; Mon, 25 Mar 2019 16:10:11 +0000 (UTC) Date: Mon, 25 Mar 2019 17:10:10 +0100 From: Alexandre Belloni To: Joel Stanley Cc: Alessandro Zummo , Rob Herring , Mark Rutland , Andrew Jeffery , linux-rtc@vger.kernel.org, devicetree , Linux ARM , linux-aspeed@lists.ozlabs.org Subject: Re: [PATCH v2 2/2] rtc: Add ASPEED RTC driver Message-ID: <20190325161010.GP30105@piout.net> References: <20190325133159.10653-1-joel@jms.id.au> <20190325133159.10653-3-joel@jms.id.au> <20190325145954.GM30105@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-rtc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rtc@vger.kernel.org On 25/03/2019 15:28:26+0000, Joel Stanley wrote: > On Mon, 25 Mar 2019 at 14:59, Alexandre Belloni > wrote: > > > > Hi, > > > > This seems mostly good to me. > > > > On 26/03/2019 00:01:59+1030, Joel Stanley wrote: > > > + dev_dbg(dev, "%s: %4d-%02d-%02d %02d:%02d:%02d\n", __func__, > > > + 1900 + tm->tm_year, tm->tm_mon + 1, tm->tm_mday, > > > + tm->tm_hour, tm->tm_min, tm->tm_sec); > > > + > > > > We now have %ptR, could you use that? > > I tried this: > > dev_dbg(dev, "%s: %ptR", __func__, tm); > > Yes, that appears to do the job. Can you make the change when applying? > While doing that change, I relaized that the whole locking is probably unnecessary as all the rtc_ops are called with the rtc lock taken. If you are not planning to add alarm support, the lock can be removed. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com