Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1397313pxk; Fri, 4 Sep 2020 08:24:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAeX1wCibKjJYg3yhed4+SXuoU91UYA8v7/iZ6hvo6iVDdiCemclAkot0kTXWhyTOyGHbI X-Received: by 2002:a17:906:fa01:: with SMTP id lo1mr8218167ejb.394.1599233073342; Fri, 04 Sep 2020 08:24:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599233073; cv=none; d=google.com; s=arc-20160816; b=kgPRe4rgNjg0kTHUV9kjMg+cOfZyUsmLWJEr0Ie3hxSoMl1pboHZDG7SSiZLYgyscY p34QW/QssW/D+EyldMMGzmmlvkPYfbQS9YXVAFU8Qbc46PC6pZSOs095ad7FradvAKnj s4g+2XYIh8ZmyMQ7OlOtlMU/wLR5xbIpDr6P7MRREf1vcaSUJCKrZKwrNR/cQyATRRt0 cXPhK51DO3q/MIbbmQ+urdm9/IwxliQc2S/Njk20b12L23dY2UgA/6BEsG3LzRqYhUN5 TMHTMKiiyen96YdFDeto+dFEJ5O+vtqsTbGs82jWukriKb/FDdQJSTPQ4vQdjsZAMdrZ Lgmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4PF6iUUI6SI+SJ6z3aC7j/JhZxFAycexdCgWf22To5o=; b=kugo6j/72FoutTK/HXJn9CLHhGTk4gdXm1NObvoXE8Wub6BXX88fOkWRQFdbHxoCtj pi3XGBf65mGO4GkFIbk4rMh4vGIxcVqaMcjKzoNOG+cWY5Nc6Of922Q/WUKWGBSvJhJQ 7VGm3PQf2AJDUjNyy9Y5QMjmiPdyUCBvE59sKl9Zi8lPOAWjn8rPKHBbWF8q8FTru62s T6shpjiZEyiabjdY18SIiWdQYh2/ddG6KUF81TLKK5hr3NPATvtgrwpW+dTLWVnIjxtQ JnZk3iqo8+xUZtw3SmZBY9YMAhuKeZX4ivUkxv5hWb7Si4O6cd+QFoUHaQ+qFGCHTFSR j9mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=hG22uCLi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gf25si4352741ejb.428.2020.09.04.08.24.08; Fri, 04 Sep 2020 08:24:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=hG22uCLi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730908AbgIDPWk (ORCPT + 99 others); Fri, 4 Sep 2020 11:22:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730431AbgIDPV0 (ORCPT ); Fri, 4 Sep 2020 11:21:26 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20971C06124F for ; Fri, 4 Sep 2020 08:21:25 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id e11so7744125wme.0 for ; Fri, 04 Sep 2020 08:21:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4PF6iUUI6SI+SJ6z3aC7j/JhZxFAycexdCgWf22To5o=; b=hG22uCLiFR7asAwpfTFSwQU1iT/gHSJGscx3xXml/kyxE1JnDfx2MImY/2H1R8hLKJ KfCjg6MZKknAkIKZotyKG6V6+B4nonb97c3ZWtPawkNO8Jkk2A4zk1b4rjfuNlZFAIMP 7Nengc5DlafgZ1S+i4Vx+EqWWER+cB9wNIsVMWDs8lbGwmw97s+ZL173l3s2Obdzotar ayKP7cRX4JqUx2ALb/DjcNiWn377sT5SR3DGB9Laa8iyUktr0lOizPQHLFHIvu6DI1kx i/crp9Xnio/Y+MqlzSjqheLANh0YjRxvrEgBrOsSZkzu7pWuJiKCVnHyQ9qzaIcp66vt JHtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4PF6iUUI6SI+SJ6z3aC7j/JhZxFAycexdCgWf22To5o=; b=gjrp8tb8iVMxd9AoFARBbao5v0c0C28G0iFwK3AhpagOc3bmGyvtHiAcqjxrwHVAVF 6LLSdoKTCu9rg8bVgonAAc7jGi9+k9Pp/01r5tVLHLaXHESsiaPvZZyudiqPskoxDhKy O0Jlo8M3iopkJEYhY3oKu1/ULCs0YILHyhvOWt9LBPk9zRR++TCxhvZItg/x1ZAcmXtW CorrLm9lVFAg2PizLc+UIXU+aG44jrPJwrqXdcOjOE+REJ6qHh1VL6faV1OxJLPQfG1j BGnRsNkC2HB183Q90kqRy7z3AEytimS+9qPPsqGiGEMApZlArcrExfxTeip50YdObqtF /SNQ== X-Gm-Message-State: AOAM533cytPx5XmLnjpa/+3xjNWrFgyHK7WhqBC9NovgCMPjmDPGYcnd xn0LTgUySpsf878tpWEVcmkSJg== X-Received: by 2002:a1c:7d4d:: with SMTP id y74mr8082237wmc.73.1599232883838; Fri, 04 Sep 2020 08:21:23 -0700 (PDT) Received: from debian-brgl.home (lfbn-nic-1-68-20.w2-15.abo.wanadoo.fr. [2.15.159.20]) by smtp.gmail.com with ESMTPSA id a11sm7789534wmm.18.2020.09.04.08.21.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 08:21:23 -0700 (PDT) From: Bartosz Golaszewski To: Alessandro Zummo , Alexandre Belloni Cc: linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH 2/8] rtc: rx8010: consolidate local variables of the same type Date: Fri, 4 Sep 2020 17:21:10 +0200 Message-Id: <20200904152116.2157-3-brgl@bgdev.pl> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200904152116.2157-1-brgl@bgdev.pl> References: <20200904152116.2157-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski Move local variables of the same type into a single line for better readability. Signed-off-by: Bartosz Golaszewski --- drivers/rtc/rtc-rx8010.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/rtc/rtc-rx8010.c b/drivers/rtc/rtc-rx8010.c index 2faf5357a3a5..4c790d33f589 100644 --- a/drivers/rtc/rtc-rx8010.c +++ b/drivers/rtc/rtc-rx8010.c @@ -109,8 +109,7 @@ static int rx8010_get_time(struct device *dev, struct rtc_time *dt) { struct rx8010_data *rx8010 = dev_get_drvdata(dev); u8 date[7]; - int flagreg; - int err; + int flagreg, err; flagreg = i2c_smbus_read_byte_data(rx8010->client, RX8010_FLAG); if (flagreg < 0) @@ -141,8 +140,7 @@ static int rx8010_set_time(struct device *dev, struct rtc_time *dt) { struct rx8010_data *rx8010 = dev_get_drvdata(dev); u8 date[7]; - int ctrl, flagreg; - int ret; + int ctrl, flagreg, ret; if ((dt->tm_year < 100) || (dt->tm_year > 199)) return -EINVAL; @@ -250,8 +248,7 @@ static int rx8010_read_alarm(struct device *dev, struct rtc_wkalrm *t) struct rx8010_data *rx8010 = dev_get_drvdata(dev); struct i2c_client *client = rx8010->client; u8 alarmvals[3]; - int flagreg; - int err; + int flagreg, err; err = i2c_smbus_read_i2c_block_data(client, RX8010_ALMIN, 3, alarmvals); if (err != 3) @@ -279,8 +276,7 @@ static int rx8010_set_alarm(struct device *dev, struct rtc_wkalrm *t) struct i2c_client *client = to_i2c_client(dev); struct rx8010_data *rx8010 = dev_get_drvdata(dev); u8 alarmvals[3]; - int extreg, flagreg; - int err; + int extreg, flagreg, err; flagreg = i2c_smbus_read_byte_data(client, RX8010_FLAG); if (flagreg < 0) @@ -346,9 +342,8 @@ static int rx8010_alarm_irq_enable(struct device *dev, { struct i2c_client *client = to_i2c_client(dev); struct rx8010_data *rx8010 = dev_get_drvdata(dev); - int flagreg; + int flagreg, err; u8 ctrl; - int err; ctrl = rx8010->ctrlreg; @@ -387,8 +382,7 @@ static int rx8010_alarm_irq_enable(struct device *dev, static int rx8010_ioctl(struct device *dev, unsigned int cmd, unsigned long arg) { struct rx8010_data *rx8010 = dev_get_drvdata(dev); - int tmp; - int flagreg; + int tmp, flagreg; switch (cmd) { case RTC_VL_READ: -- 2.26.1