From patchwork Sun Oct 22 17:22:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angel Iglesias X-Patchwork-Id: 156576 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp862127vqx; Sun, 22 Oct 2023 10:24:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGs8fs9vQUEC0Y5dKK4sPf112pjGcm5GG/SZM7bye95U3h6kQ1Ufbb2NX/1bT/qdaOOiKr2 X-Received: by 2002:a05:6a21:78a5:b0:17b:9b0c:f215 with SMTP id bf37-20020a056a2178a500b0017b9b0cf215mr5217791pzc.37.1697995452541; Sun, 22 Oct 2023 10:24:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697995452; cv=none; d=google.com; s=arc-20160816; b=HxwrWewQyeaVMxgNHmK0xt0rzyy6oy0xxSX9jc5zGu5zzCAdqGvnS42B/zXldoxd/t fYox7ThHAnPll9/F8N1uhw3l2z0Z+WhykhS7hG/DQokAzJClLiBAAw5+pBULiLTXNL3e rhKwhr6RgHGITkwaH5ljCN9VTiQYcOy0kvQamBcokFcsfB3v4O4xGVK0LoMhkR2Cat+n zaPxQKez0z0LLzAZDTbX5+t3GVUtLwm07A46wmQnEuu2A+/aYmVfFQP9Ky7+IAYoRLh2 sIXnxlgR3gGRl/ktQ/ZMxywzdHc4UL+jL9gyYK8nFrJh+5GaMBzBjz9T/i2eD5KiFJES PNXw== 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=U16I08jUhkJbDT8Pvh8OQ/ehSDzUYHV+MFJhR/fTJvw=; fh=yZLYdNw5rdXhv5oQFFat/qQTWLW9IQ8+eq9Q2kzV3j4=; b=H9yBp91Cx8OhV5cqZkA0ln8TV7wQU9mJ9HPgpoi6xhkbjgw0+rYHn3wVWmB8oFHt0U mSj68sBBhLIXFJvvtgZQ7toDCgKKFCur0uH7MJhMXiXg5eWjl7jqP3fpE9Tr1hts7sos yH7sFPkUKJFYUzR3JO/aq2W5A5sWEehbCgWaVBnSb+vMCV3iHDZkn3KjtJyLiVI/jlks 8eEhRqNWPr/Um7H45YPL3j3Tz+E4rsJqMTibD0QqiHThU0H3VC8De+24VqP90XR1bP+p A2dNzLuc1uaB0jE5o9vtRy8zkCpbrAJlx1J2dOtp34yWTZlhqoqZrpX5T/76YfB3o4CM 1qeg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Hg97zCj/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id 18-20020a170902c21200b001ca152d038dsi4761147pll.281.2023.10.22.10.24.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 10:24:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="Hg97zCj/"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 4FC0A80613A8; Sun, 22 Oct 2023 10:24:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232646AbjJVRXd (ORCPT + 27 others); Sun, 22 Oct 2023 13:23:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232675AbjJVRXX (ORCPT ); Sun, 22 Oct 2023 13:23:23 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 94580D67; Sun, 22 Oct 2023 10:23:21 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id ffacd0b85a97d-32d9b507b00so1853892f8f.1; Sun, 22 Oct 2023 10:23:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697995400; x=1698600200; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=U16I08jUhkJbDT8Pvh8OQ/ehSDzUYHV+MFJhR/fTJvw=; b=Hg97zCj/2MwdNujiJQ+AxNdxOKyLaFQ/W39oU/KUZlpRS7naLVCVV2EWpQf3etSxQY aF7Y4lkC9cm9Oa0KHRhi5aHTWdMznxxErhKNeSNPI/mry2FUekzyUErOPgcjbNTDvBwy gJp5ya698otjAchzIJbZL86hNYzPV6w5WXyWziZkTAHDl5dQP+SeskMP8y/he9CogM0j dnGRzOkfeE6T9sGQE/AIPcSbXRN3FUFjqrBHCdA2Skqn6zaTbpc66giEXZobndQjicMK WfLgpjfDXhOggCs15l+q5XSpJo4IlVhFSrm2AZOSwpMuI8Z2ME8qjOSmL9MYY9YmdTM1 OIeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697995400; x=1698600200; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=U16I08jUhkJbDT8Pvh8OQ/ehSDzUYHV+MFJhR/fTJvw=; b=mkz7m3h+Vv/mHYiIBBSS66/No3vQ7Qz+jqAdZUU7u7X3Ge9SCrCFt5/QjBwyXGe313 QKGHAos14NapypHn5LIrdkUwtrEPgef4Irr6XDH7YIPgmDFeiRQmGMrtFO7oFeEz0q35 hfqo6tpnd+TC1fhW/lySwGUss5atDVvsfEZvl3qNuluvKcw8k8g6lBdDrIiImvj0DbJA aWIMK5nU7Ff+UXOHBoYxacIT3/saDBlzFDspZbCpKrPPB7aiSokHUagwbVmaFyXSy6tR kaJovx61c2ai8cZUBmZ67Re03yH46bNGApieNcbKhftipjwTboLffw9HaMVXKVpgO27C P6Ug== X-Gm-Message-State: AOJu0Yz0ZboO2MFhNQ29rqXJVp1MnDlc399ynNSYsNawfO1Ukqgrz1WR +Dnad4MkvhRQibwd0mVJLtKA75xyHpA= X-Received: by 2002:a5d:4704:0:b0:32d:aabd:d70f with SMTP id y4-20020a5d4704000000b0032daabdd70fmr4920709wrq.46.1697995399519; Sun, 22 Oct 2023 10:23:19 -0700 (PDT) Received: from toolbox.taileb357.ts.net (13.red-83-35-58.dynamicip.rima-tde.net. [83.35.58.13]) by smtp.gmail.com with ESMTPSA id o12-20020adfe80c000000b0032da49e18fasm6043836wrm.23.2023.10.22.10.23.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Oct 2023 10:23:19 -0700 (PDT) From: Angel Iglesias To: linux-iio@vger.kernel.org Cc: Biju Das , linux-kernel@vger.kernel.org, Angel Iglesias , Andy Shevchenko , Jonathan Cameron , Lars-Peter Clausen , Linus Walleij , Phil Elwell , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= Subject: [PATCH v2 3/5] iio: pressure: bmp280: Rearrange vars in reverse xmas tree order Date: Sun, 22 Oct 2023 19:22:19 +0200 Message-ID: X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Sun, 22 Oct 2023 10:24:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780477280004709032 X-GMAIL-MSGID: 1780477280004709032 Small cleanup reordering local variable declarations following reverse christmas tree convention. Signed-off-by: Angel Iglesias Reviewed-by: Andy Shevchenko diff --git a/drivers/iio/pressure/bmp280-i2c.c b/drivers/iio/pressure/bmp280-i2c.c index b3e069730f97..34e3bc758493 100644 --- a/drivers/iio/pressure/bmp280-i2c.c +++ b/drivers/iio/pressure/bmp280-i2c.c @@ -7,9 +7,9 @@ static int bmp280_i2c_probe(struct i2c_client *client) { - struct regmap *regmap; - const struct bmp280_chip_info *chip_info; const struct i2c_device_id *id = i2c_client_get_device_id(client); + const struct bmp280_chip_info *chip_info; + struct regmap *regmap; chip_info = i2c_get_match_data(client); diff --git a/drivers/iio/pressure/bmp280-spi.c b/drivers/iio/pressure/bmp280-spi.c index 2eed483a8cc4..433d6fac83c4 100644 --- a/drivers/iio/pressure/bmp280-spi.c +++ b/drivers/iio/pressure/bmp280-spi.c @@ -14,8 +14,7 @@ static int bmp280_regmap_spi_write(void *context, const void *data, size_t count) { - struct device *dev = context; - struct spi_device *spi = to_spi_device(dev); + struct spi_device *spi = to_spi_device(context); u8 buf[2]; memcpy(buf, data, 2); @@ -31,8 +30,7 @@ static int bmp280_regmap_spi_write(void *context, const void *data, static int bmp280_regmap_spi_read(void *context, const void *reg, size_t reg_size, void *val, size_t val_size) { - struct device *dev = context; - struct spi_device *spi = to_spi_device(dev); + struct spi_device *spi = to_spi_device(context); return spi_write_then_read(spi, reg, reg_size, val, val_size); }