From nobody Thu Apr 2 23:53:37 2026 Received: from mail-dy1-f179.google.com (mail-dy1-f179.google.com [74.125.82.179]) (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 011832882AA for ; Sat, 14 Feb 2026 02:52:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771037576; cv=none; b=PzElHnDI8NU4OeAXWyJti3DCoKJUxBI7CmHEgYs/utJLwiDOEUMfjN8IbKuSMOdZ2TKXKqqvRyrWEyqLOHuNzbzZzzd/x3kb8EmlhhnhnN8JDdNHdrLRIlGQv4h3Y9k33IhAnzV7y7FaUbO/2LVFgzZtItU/u43u1v3OPThgJ9I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771037576; c=relaxed/simple; bh=v3kXvNSuCMZ7MEWDhVbIE5GD0XqGeatSF30MtYjqx54=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TNgWXbhs1O+23lFgaUDmbC+Df8FECOGDcnb3KpJeBrTkZ1wcoeY6SJFKUUMoB6xpkmN3kSnJPKKVflEfZfEWPF+rnIs8fsdn+07S21TORWkhatdaBdq9IlbSHh12VwC+x81qiCgIGzGixPEMV5zW9DMO1eoybjGIVPS9k+Aj9Sc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=AKcYPW2d; arc=none smtp.client-ip=74.125.82.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="AKcYPW2d" Received: by mail-dy1-f179.google.com with SMTP id 5a478bee46e88-2bab70f8c8aso1562954eec.1 for ; Fri, 13 Feb 2026 18:52:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771037574; x=1771642374; 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=/UOk9oh277SXACkh2cn1misUWWqitds3tO3PquLOoFQ=; b=AKcYPW2dWlUOvmT59+W/bIIC1qgdd6BjYa2lDmYA5NW2ThF6PU1PoWF+TTjXqMg0Rq nYcuVdPSbMag/Nk5od8pb0MQBw5i7tacuBETCmTR47VUys3UrJ0pk5IOOpuF8Q1cruQX w0zmUiGR/AaoKn4xvE0x3asGnlS7gQ7zshTs3oiyGWa3zR4mwXyDu79FVDQ1brl5/nHH UfwuXzjlKnkuTDZASRSBu1aAUkFaH7o+Iz9rGCCmQIFQsroFIfB4+CqwSAEuYyVrusXj GXyYn7lx2vxh+/wbOE+7bZRtLtOYztpXcFtuZ8L/16zrK4VU2zawTwv3jHUH+MCc4d0e llGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771037574; x=1771642374; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/UOk9oh277SXACkh2cn1misUWWqitds3tO3PquLOoFQ=; b=EoDSvkXwQ8hVAG5V8OA5UXO+7sxJstphy+ajwtwb5+qsrT1YRybJOTFOXK7N7JXk3Q QpYaKFXUo4EFxXm3LaKSlQP2gNuHFCUDAF+Sicv/eMoCeDa0CcxOHbHFQaeKnZjm4mAQ HI8CGwdjV/WouPO2Wgm22wNtjwRy+L8J2pY9+f6O1Oj0E8V0ci1Lekwtez79jIttu3ji xIfslaA5O9Y1iBPQ28749l4Be5cxRekOR+6zOFg/2BDo+9GXFeR+dIrX7xzeSVqorx7n /jFTspUumOPiP37M+3EBxHqtuIpgRvmnN67fpDJA/D9KfMa01FLCFkHdAC0RZS5A6uEv Z3Ew== X-Forwarded-Encrypted: i=1; AJvYcCUplieaaH5F3uODnff4AOjmen2W4p4S2gUP8cConLryP8iNHn14ZeW06rmZNRc4VoWCSkyLTxm5Rokd5DA=@vger.kernel.org X-Gm-Message-State: AOJu0YxoSMMkghG0U3UWJDcAat9JjuU9e5uMC/WaSLS0Fjns9jJ84rs5 JyKgsgn+XFhIhJIOzfU7r5NeZx7iLPgiD8MCwLelEb3R/TKC2QCMZn6Q X-Gm-Gg: AZuq6aKWthjIphK+W/ThxiXDOuCMwCj6n9JKEul1evuj+JX0zynLs8legj2/S67EEH1 2RhFv2GK+VjH2xpxc8nKKeoVpoek4vU0hosxYW6Cv7C7ESjTfiKXe++w/sRV9VYJoaS07ZdmAgj 6pClHeS4dT2OMPaD3beKCKSmzw8nypTIWUMwERRRUaTESRcQ0obEUCgoej+kdKlJJJ2wKVffVVL rInugnBAqluhFaZCm+LAeiWpR7vVd7lm7WhEAECfPeJs29ZCvlqaiivh+DDv3ffxzmULka+BYLl iDgRoOved6nXU9FM9F7DXtSBgdnnVb9diAReNHLqn5EtH2QKXJ2Q41LmrDi8CWFzqgVsHUrUl53 9N+QY0+g4gz2xCUY6L5Nt/JExRbog23CHy6OOZzS6ZVjuz+zcz7SDt8LKOc2xtIBKQj8RtUhmWF gFh1tazZA5lFsiJM9FrIhconY1XqxAHbPGaJQofNsaPvnGAXQ6CMyh+XeuJXXIcLJNe+cGZAkOy oUvder62PEVngo= X-Received: by 2002:a05:7301:1692:b0:2b7:ee0e:e9ca with SMTP id 5a478bee46e88-2babc3e6243mr1608656eec.13.1771037574094; Fri, 13 Feb 2026 18:52:54 -0800 (PST) Received: from dtor-ws.sjc.corp.google.com ([2a00:79e0:2ebe:8:b713:5e7b:5963:d2ad]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2bacb543d4dsm638589eec.7.2026.02.13.18.52.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Feb 2026 18:52:53 -0800 (PST) From: Dmitry Torokhov To: Greg Kroah-Hartman , Danilo Krummrich Cc: "Rafael J. Wysocki" , Arnd Bergmann , Bartosz Golaszewski , Hans de Goede , linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] driver core: platform: fix various formatting issues Date: Fri, 13 Feb 2026 18:52:45 -0800 Message-ID: <20260214025246.2095239-4-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.53.0.310.g728cabbaf7-goog In-Reply-To: <20260214025246.2095239-1-dmitry.torokhov@gmail.com> References: <20260214025246.2095239-1-dmitry.torokhov@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make checkpatch happy. This helps when checkpatch is set up as an automatic linter. Signed-off-by: Dmitry Torokhov Reviewed-by: Bartosz Golaszewski --- drivers/base/platform.c | 49 ++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/drivers/base/platform.c b/drivers/base/platform.c index ec467ccd05b3..4617d1e88772 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -75,7 +75,7 @@ struct resource *platform_get_mem_or_io(struct platform_d= evice *dev, for (i =3D 0; i < dev->num_resources; i++) { struct resource *r =3D &dev->resource[i]; =20 - if ((resource_type(r) & (IORESOURCE_MEM|IORESOURCE_IO)) && num-- =3D=3D = 0) + if ((resource_type(r) & (IORESOURCE_MEM | IORESOURCE_IO)) && num-- =3D= =3D 0) return r; } return NULL; @@ -97,7 +97,7 @@ EXPORT_SYMBOL_GPL(platform_get_mem_or_io); */ void __iomem * devm_platform_get_and_ioremap_resource(struct platform_device *pdev, - unsigned int index, struct resource **res) + unsigned int index, struct resource **res) { struct resource *r; =20 @@ -172,7 +172,7 @@ static const struct cpumask *get_irq_affinity(struct pl= atform_device *dev, * @num: interrupt number index * @affinity: optional cpumask pointer to get the affinity of a per-cpu in= terrupt * - * Gets an interupt for a platform device. Device drivers should check the + * Gets an interrupt for a platform device. Device drivers should check the * return value for errors so as to not pass a negative integer value to * the request_irq() APIs. Optional affinity information is provided in the * affinity pointer if available, and NULL otherwise. @@ -844,8 +844,7 @@ EXPORT_SYMBOL_GPL(platform_device_unregister); * * Returns &struct platform_device pointer on success, or ERR_PTR() on err= or. */ -struct platform_device *platform_device_register_full( - const struct platform_device_info *pdevinfo) +struct platform_device *platform_device_register_full(const struct platfor= m_device_info *pdevinfo) { int ret; struct platform_device *pdev; @@ -868,13 +867,11 @@ struct platform_device *platform_device_register_full( pdev->dev.coherent_dma_mask =3D pdevinfo->dma_mask; } =20 - ret =3D platform_device_add_resources(pdev, - pdevinfo->res, pdevinfo->num_res); + ret =3D platform_device_add_resources(pdev, pdevinfo->res, pdevinfo->num_= res); if (ret) goto err; =20 - ret =3D platform_device_add_data(pdev, - pdevinfo->data, pdevinfo->size_data); + ret =3D platform_device_add_data(pdev, pdevinfo->data, pdevinfo->size_dat= a); if (ret) goto err; =20 @@ -906,8 +903,7 @@ EXPORT_SYMBOL_GPL(platform_device_register_full); * @drv: platform driver structure * @owner: owning module/driver */ -int __platform_driver_register(struct platform_driver *drv, - struct module *owner) +int __platform_driver_register(struct platform_driver *drv, struct module = *owner) { drv->driver.owner =3D owner; drv->driver.bus =3D &platform_bus_type; @@ -959,13 +955,14 @@ static int is_bound_to_driver(struct device *dev, voi= d *driver) * a negative error code and with the driver not registered. */ int __init_or_module __platform_driver_probe(struct platform_driver *drv, - int (*probe)(struct platform_device *), struct module *module) + int (*probe)(struct platform_device *), + struct module *module) { int retval; =20 if (drv->driver.probe_type =3D=3D PROBE_PREFER_ASYNCHRONOUS) { pr_err("%s: drivers registered with %s can not be probed asynchronously\= n", - drv->driver.name, __func__); + drv->driver.name, __func__); return -EINVAL; } =20 @@ -1021,11 +1018,11 @@ EXPORT_SYMBOL_GPL(__platform_driver_probe); * * Returns &struct platform_device pointer on success, or ERR_PTR() on err= or. */ -struct platform_device * __init_or_module __platform_create_bundle( - struct platform_driver *driver, - int (*probe)(struct platform_device *), - struct resource *res, unsigned int n_res, - const void *data, size_t size, struct module *module) +struct platform_device * __init_or_module +__platform_create_bundle(struct platform_driver *driver, + int (*probe)(struct platform_device *), + struct resource *res, unsigned int n_res, + const void *data, size_t size, struct module *module) { struct platform_device *pdev; int error; @@ -1124,9 +1121,8 @@ void platform_unregister_drivers(struct platform_driv= er * const *drivers, } EXPORT_SYMBOL_GPL(platform_unregister_drivers); =20 -static const struct platform_device_id *platform_match_id( - const struct platform_device_id *id, - struct platform_device *pdev) +static const struct platform_device_id * +platform_match_id(const struct platform_device_id *id, struct platform_dev= ice *pdev) { while (id->name[0]) { if (strcmp(pdev->name, id->name) =3D=3D 0) { @@ -1348,13 +1344,12 @@ static struct attribute *platform_dev_attrs[] =3D { NULL, }; =20 -static umode_t platform_dev_attrs_visible(struct kobject *kobj, struct att= ribute *a, - int n) +static umode_t platform_dev_attrs_visible(struct kobject *kobj, + struct attribute *a, int n) { struct device *dev =3D container_of(kobj, typeof(*dev), kobj); =20 - if (a =3D=3D &dev_attr_numa_node.attr && - dev_to_node(dev) =3D=3D NUMA_NO_NODE) + if (a =3D=3D &dev_attr_numa_node.attr && dev_to_node(dev) =3D=3D NUMA_NO_= NODE) return 0; =20 return a->mode; @@ -1366,7 +1361,6 @@ static const struct attribute_group platform_dev_grou= p =3D { }; __ATTRIBUTE_GROUPS(platform_dev); =20 - /** * platform_match - bind platform device to platform driver. * @dev: device. @@ -1419,8 +1413,7 @@ static int platform_uevent(const struct device *dev, = struct kobj_uevent_env *env if (rc !=3D -ENODEV) return rc; =20 - add_uevent_var(env, "MODALIAS=3D%s%s", PLATFORM_MODULE_PREFIX, - pdev->name); + add_uevent_var(env, "MODALIAS=3D%s%s", PLATFORM_MODULE_PREFIX, pdev->name= ); return 0; } =20 --=20 2.53.0.310.g728cabbaf7-goog