From patchwork Thu Jan 26 14:20:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 48723 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp297924wrn; Thu, 26 Jan 2023 06:26:49 -0800 (PST) X-Google-Smtp-Source: AMrXdXtFXFn4HrySue9AfsjjKyRtiRuWmPgxpSfrsFCHSzCI2E6g01qRPw0Ta5nqUFPHwnmpuOrV X-Received: by 2002:a05:6402:5412:b0:49d:f4de:1988 with SMTP id ev18-20020a056402541200b0049df4de1988mr40262782edb.42.1674743209136; Thu, 26 Jan 2023 06:26:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674743209; cv=none; d=google.com; s=arc-20160816; b=Gl4lv8i/YDcsxR2bpSNGeCvOPhHrnDTLPD95Hzuq4D8vPgHSvRcKpNNrRYJuiBiP6Z zL1vwbAosKkZwtBGGmmG9WwlLSUpVn8lRdvGv4A4fauV9D+NUJjoAuXO38XVBHqCiLbP RJlvUIVo2x28x53e5G7LsQsOuoLnkDIXU+EBh++IP/naoIMQ++OA7GCb8tELz3X6ZcQi A0TSkRgxvHfFF0jrWpPmdQP1fp3KaQ8IGOqxyk94sIzFKu5wZcZ+kDHIm+5AYPd1UND/ PUJB1V+pfLGXQumS3tjI/Oj03P84GoAtj6JDNYSp2ufVSjmoXocvEkvuizdszYno5/MQ 3G+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=UOUITaCpXRdx7QBo6ZzBFOdaYjBdsbRCilaIJm6kNn8=; b=JhoFADNwkhmLuAVSalSqif6IIPgy0aK13Y9Dg6bkrq2AJRI0tDYzNva/NdP741rs+/ XxnLM/9RsmYs/5MtRgd1TZnWHSB1qxNO5A9em4/svXmWjDzrGm8tcSf7hv3mie8C7Cme cRITlnPQHEbwHiq+V2PJXAKrfsFonj5iDnITTDuOVvVNKviOqHZSaZ4lGvKquHmnYiyg REk5NX0KX8CBApukb+7SLR43T48b85YnjwBA6m9ni/F0IcvY2+32Ml3grxArywVGj9RU Comim6cGfxYI2h69Rc2tW8p6SsG9MeNnDk5mTRkXHuQ4E3MU3wQro2uMbe6MNVxnmok5 M+CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MgXXlPuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i20-20020a50d754000000b004a0a7676130si1958169edj.31.2023.01.26.06.26.25; Thu, 26 Jan 2023 06:26:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MgXXlPuY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232236AbjAZOX5 (ORCPT + 99 others); Thu, 26 Jan 2023 09:23:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231985AbjAZOXF (ORCPT ); Thu, 26 Jan 2023 09:23:05 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A102B113E4; Thu, 26 Jan 2023 06:23:03 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 001D0B81DF6; Thu, 26 Jan 2023 14:23:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4B115C4322E; Thu, 26 Jan 2023 14:22:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674742978; bh=ivf8oy7wqRDszm/BUrY97t3/c8yLV7KjrfeB3zeaq0o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MgXXlPuYv2IqtdbJcM1Rcx7qf1xF0zIhG6QWg1mFH2mZq7r4DxuIKFRjLg5xmOFRI r2gShAU7c6Du+NGn7P2HFOgg/lnnSX41hCqjMKt0PYDi96y1a6/15gi78ZXz/+3wvr MqjDbCgDFaeQq2UPZ3FTzT5hOlCXResTRl+F8ybwVuRdgixTsMy0n/Y2qaVzgQ7iVo NkxRTV3GGMgiJVkIdY4KB0/UxI+NM5IjUPE/A0xK+OOq98QWWY6cjVWmvCYkhUQ1/e Z3eByYTJ5VZvm7yvpx2wgvTh17Spzj041nFlrMm4edAKA28ey7OpF2IeTbbSakK8I3 DfZc5CSBFS/oQ== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pL39d-0006ip-6j; Thu, 26 Jan 2023 15:23:05 +0100 From: Johan Hovold To: Alexandre Belloni , Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , Alessandro Zummo , Rob Herring , Krzysztof Kozlowski , Maximilian Luz , linux-arm-msm@vger.kernel.org, linux-rtc@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 14/24] rtc: pm8xxx: clean up local declarations Date: Thu, 26 Jan 2023 15:20:47 +0100 Message-Id: <20230126142057.25715-15-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230126142057.25715-1-johan+linaro@kernel.org> References: <20230126142057.25715-1-johan+linaro@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756095535527494911?= X-GMAIL-MSGID: =?utf-8?q?1756095535527494911?= Clean up local declarations somewhat by using the reverse xmas style consistently throughout. Signed-off-by: Johan Hovold --- drivers/rtc/rtc-pm8xxx.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c index 2f96a178595c..922aef0f0241 100644 --- a/drivers/rtc/rtc-pm8xxx.c +++ b/drivers/rtc/rtc-pm8xxx.c @@ -177,9 +177,9 @@ static int pm8xxx_rtc_read_time(struct device *dev, struct rtc_time *tm) static int pm8xxx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) { - u8 value[NUM_8_BIT_RTC_REGS]; struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev); const struct pm8xxx_rtc_regs *regs = rtc_dd->regs; + u8 value[NUM_8_BIT_RTC_REGS]; u32 secs; int rc; @@ -210,12 +210,12 @@ static int pm8xxx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) static int pm8xxx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) { - int rc; - unsigned int ctrl_reg; - u8 value[NUM_8_BIT_RTC_REGS]; struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev); const struct pm8xxx_rtc_regs *regs = rtc_dd->regs; + u8 value[NUM_8_BIT_RTC_REGS]; + unsigned int ctrl_reg; u32 secs; + int rc; rc = regmap_bulk_read(rtc_dd->regmap, regs->alarm_rw, value, sizeof(value)); @@ -238,11 +238,11 @@ static int pm8xxx_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alarm) static int pm8xxx_rtc_alarm_irq_enable(struct device *dev, unsigned int enable) { - int rc; struct pm8xxx_rtc *rtc_dd = dev_get_drvdata(dev); const struct pm8xxx_rtc_regs *regs = rtc_dd->regs; u8 value[NUM_8_BIT_RTC_REGS] = {0}; unsigned int val; + int rc; if (enable) val = regs->alarm_en; @@ -355,9 +355,9 @@ MODULE_DEVICE_TABLE(of, pm8xxx_id_table); static int pm8xxx_rtc_probe(struct platform_device *pdev) { - int rc; - struct pm8xxx_rtc *rtc_dd; const struct of_device_id *match; + struct pm8xxx_rtc *rtc_dd; + int rc; match = of_match_node(pm8xxx_id_table, pdev->dev.of_node); if (!match)