Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp411029rdb; Wed, 20 Dec 2023 00:09:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6jO0cr1m7SXNY9rqY43xB/cHPEDC25IaQMWAt9OBCQRCc9dvsCIB4LiJj9CVOpTG/1hpi X-Received: by 2002:ac8:7f50:0:b0:425:4043:8d30 with SMTP id g16-20020ac87f50000000b0042540438d30mr18913612qtk.75.1703059794622; Wed, 20 Dec 2023 00:09:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703059794; cv=none; d=google.com; s=arc-20160816; b=kMxWbZeF2DnQjVUTuegw1Hwz3oQ16X3+QYWBbsUy/jzEvIh11cbR0f9zJ1X2W6Zvcv UN4d+LTATNGKsSS6loLRaBWN0Pj/0HnwePTj5nR9QCrBP5M19lW4rMSXptpsf3mI833g jN9TPwjBgxJb1W9w/s6SACFDnS9f4GA4fGmUvlWbAkQ5FMsOb3zoUc7rowQF03saUnO9 MbI6NMxizduRTjUWZkTRxFodSpUX7/0Qatc3bhazhMmfGCB9UmWnse39ywbbgdgIYz91 i7Egiyj7Sbe4djbHP5sGfsx1z01uoYkNPjyDSropryFpvZ28u0211j5uPddfiNKKW0t6 EGXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=zIsSMD7i5NE719u+31dGpBwzTze1hY2hnasRjy34amk=; fh=u8rLQsUjk/DQ68o09SM+wx8FxqDFcT3zeQdKot9Eyy4=; b=nRkRxEAz/FMlYta4Q67Cvz8kgaN546Pwv44PWWQlGIBzpB39Y07i838ZKeGmjI7Mrf bA8X+kAOG/J3Sjhbc0vyRsYxyaV76cwr1Yy445NxRmXhLzajIYxSCSamGuWDFCeTvRZk wzVk31Q0YcpHRGC4/O/V/4JoHZvMdwyixXGhj6lzwu8N3xJH0WlL/h1qfOMs93qF4wYJ ag2aL1YcEbffH4JbSSGHej8woqkq/GbQYedwmPrPz9I0OcHjhLUyfven6A75LWKci2nO 678VrGY+GW9HTt5Quj2u83wFb6npFL9Wt4XY6aCCJBviEkVrlFykIDWY2e6YSkzxGv77 FzuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=dXRz7QoF; spf=pass (google.com: domain of linux-kernel+bounces-6541-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6541-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o15-20020a05622a008f00b00427581cae64si7894777qtw.764.2023.12.20.00.09.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 00:09:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6541-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=dXRz7QoF; spf=pass (google.com: domain of linux-kernel+bounces-6541-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6541-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3A5C31C25424 for ; Wed, 20 Dec 2023 08:09:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CEFAB1D520; Wed, 20 Dec 2023 08:09:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bgdev-pl.20230601.gappssmtp.com header.i=@bgdev-pl.20230601.gappssmtp.com header.b="dXRz7QoF" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5ED551D52B for ; Wed, 20 Dec 2023 08:09:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=bgdev.pl Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-40c29f7b068so59096245e9.0 for ; Wed, 20 Dec 2023 00:09:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1703059785; x=1703664585; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zIsSMD7i5NE719u+31dGpBwzTze1hY2hnasRjy34amk=; b=dXRz7QoFbgGyGT5nfE3NRCJZ4yIjlbK1lrNvMW+bCfDLSn6AjR5hhEwjN6VSFWOmly nVWGS50/3dCXMEu8MsDT/O7vbmqArOSjSeLlm/aXQm5KuI6LBYQJ9ssmV1ung/gUXycb 79f5EVOrTmG6U6t94rFIRotya4XLMofPk/ZYcma0jLWpzWzGm+WYHA9vfzXw73zh0DgZ IFq8gmg2GZK/tgbuWIeZfxRBYJYBeFeZwyoKblcZcutPACzHgh08bvzz6RiRHo4fXRJI qehmECYnHZB8XMSXnjw7YzsKeYGCecOHipyXDpgALl10wtNy89Nzz/Mj+NEVBw7j9B9x jf7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703059785; x=1703664585; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zIsSMD7i5NE719u+31dGpBwzTze1hY2hnasRjy34amk=; b=nU74fTo9RGj0kpK6hH1kNRd5h8DCjB7qc4Cp51B7TlRdZIOlcgM0EoG9NUhxKUfbB+ ZSHY2lLZLgyPb2JTVJnC1Onv+xkPFrZVJtgsKDRuAr5u//kOCkq1WUEWKQdKvbTkLwg7 sBYdGBaieM1VZrsvdE2leV5LDgrYF9be3jgJcN2MHHoqYcHFNRw1P0PzaiR20oBrtouD EcymOz1TVT4+e+HUBWieuqp3Dweb8XomXhXbEwJXzQe9paeAB7SYA+2hk0ZYDCTP0cY6 x5Y8YYktthBhvT6EpV8QFztdz8M3Wuh+k6mg25QUtnSFZHR1RaYCgd4PKxHGIJVCdbQe AwNA== X-Gm-Message-State: AOJu0Yxc1byjhRCtcCo3z16M+DBuDZAhJbkHFiK1/g/EKv423f6i5FLe tphIur3WB1k69H/8KkR0GwcPGg== X-Received: by 2002:a05:600c:4c1a:b0:40c:d4d:68ec with SMTP id d26-20020a05600c4c1a00b0040c0d4d68ecmr9804231wmp.183.1703059785403; Wed, 20 Dec 2023 00:09:45 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:ecf7:fc79:9704:9cf7]) by smtp.gmail.com with ESMTPSA id k36-20020a05600c1ca400b0040b38292253sm6344729wms.30.2023.12.20.00.09.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 00:09:45 -0800 (PST) From: Bartosz Golaszewski To: Linus Walleij , Andy Shevchenko , Kent Gibson Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH v2] gpio: sysfs: drop tabs from local variable declarations Date: Wed, 20 Dec 2023 09:09:42 +0100 Message-Id: <20231220080942.8381-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bartosz Golaszewski Older code has an annoying habit of putting tabs between the type and the name of the variable. This doesn't really add to readability and newer code doesn't do it so make the entire file consistent. Signed-off-by: Bartosz Golaszewski --- v1 -> v2: - drop more tabs where my regex didn't find them before drivers/gpio/gpiolib-sysfs.c | 66 ++++++++++++++++++------------------ 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/drivers/gpio/gpiolib-sysfs.c b/drivers/gpio/gpiolib-sysfs.c index ae4fc013b675..6c9fde19d46e 100644 --- a/drivers/gpio/gpiolib-sysfs.c +++ b/drivers/gpio/gpiolib-sysfs.c @@ -165,10 +165,10 @@ static irqreturn_t gpio_sysfs_irq(int irq, void *priv) /* Caller holds gpiod-data mutex. */ static int gpio_sysfs_request_irq(struct device *dev, unsigned char flags) { - struct gpiod_data *data = dev_get_drvdata(dev); - struct gpio_desc *desc = data->desc; - unsigned long irq_flags; - int ret; + struct gpiod_data *data = dev_get_drvdata(dev); + struct gpio_desc *desc = data->desc; + unsigned long irq_flags; + int ret; data->irq = gpiod_to_irq(desc); if (data->irq < 0) @@ -259,7 +259,7 @@ static ssize_t edge_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { struct gpiod_data *data = dev_get_drvdata(dev); - ssize_t status = size; + ssize_t status = size; int flags; flags = sysfs_match_string(trigger_names, buf); @@ -292,10 +292,10 @@ static DEVICE_ATTR_RW(edge); /* Caller holds gpiod-data mutex. */ static int gpio_sysfs_set_active_low(struct device *dev, int value) { - struct gpiod_data *data = dev_get_drvdata(dev); - struct gpio_desc *desc = data->desc; - int status = 0; - unsigned int flags = data->irq_flags; + struct gpiod_data *data = dev_get_drvdata(dev); + struct gpio_desc *desc = data->desc; + int status = 0; + unsigned int flags = data->irq_flags; if (!!test_bit(FLAG_ACTIVE_LOW, &desc->flags) == !!value) return 0; @@ -331,9 +331,9 @@ static ssize_t active_low_show(struct device *dev, static ssize_t active_low_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t size) { - struct gpiod_data *data = dev_get_drvdata(dev); - ssize_t status; - long value; + struct gpiod_data *data = dev_get_drvdata(dev); + ssize_t status; + long value; status = kstrtol(buf, 0, &value); if (status) @@ -399,7 +399,7 @@ static const struct attribute_group *gpio_groups[] = { static ssize_t base_show(struct device *dev, struct device_attribute *attr, char *buf) { - const struct gpio_chip *chip = dev_get_drvdata(dev); + const struct gpio_chip *chip = dev_get_drvdata(dev); return sysfs_emit(buf, "%d\n", chip->base); } @@ -408,7 +408,7 @@ static DEVICE_ATTR_RO(base); static ssize_t label_show(struct device *dev, struct device_attribute *attr, char *buf) { - const struct gpio_chip *chip = dev_get_drvdata(dev); + const struct gpio_chip *chip = dev_get_drvdata(dev); return sysfs_emit(buf, "%s\n", chip->label ?: ""); } @@ -417,7 +417,7 @@ static DEVICE_ATTR_RO(label); static ssize_t ngpio_show(struct device *dev, struct device_attribute *attr, char *buf) { - const struct gpio_chip *chip = dev_get_drvdata(dev); + const struct gpio_chip *chip = dev_get_drvdata(dev); return sysfs_emit(buf, "%u\n", chip->ngpio); } @@ -441,11 +441,11 @@ static ssize_t export_store(const struct class *class, const struct class_attribute *attr, const char *buf, size_t len) { - long gpio; - struct gpio_desc *desc; - int status; - struct gpio_chip *gc; - int offset; + long gpio; + struct gpio_desc *desc; + int status; + struct gpio_chip *gc; + int offset; status = kstrtol(buf, 0, &gpio); if (status < 0) @@ -493,9 +493,9 @@ static ssize_t unexport_store(const struct class *class, const struct class_attribute *attr, const char *buf, size_t len) { - long gpio; - struct gpio_desc *desc; - int status; + long gpio; + struct gpio_desc *desc; + int status; status = kstrtol(buf, 0, &gpio); if (status < 0) @@ -556,14 +556,14 @@ static struct class gpio_class = { */ int gpiod_export(struct gpio_desc *desc, bool direction_may_change) { - struct gpio_chip *chip; - struct gpio_device *gdev; - struct gpiod_data *data; - unsigned long flags; - int status; - const char *ioname = NULL; - struct device *dev; - int offset; + struct gpio_chip *chip; + struct gpio_device *gdev; + struct gpiod_data *data; + unsigned long flags; + int status; + const char *ioname = NULL; + struct device *dev; + int offset; /* can't export until sysfs is available ... */ if (!class_is_registered(&gpio_class)) { @@ -730,8 +730,8 @@ EXPORT_SYMBOL_GPL(gpiod_unexport); int gpiochip_sysfs_register(struct gpio_device *gdev) { - struct device *dev; - struct device *parent; + struct device *dev; + struct device *parent; struct gpio_chip *chip = gdev->chip; /* -- 2.40.1