[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW5PR11MB5787B67F0BAD9FA6162042578D562@MW5PR11MB5787.namprd11.prod.outlook.com>
Date: Thu, 22 Feb 2024 04:32:31 +0000
From: "Wu, Wentong" <wentong.wu@...el.com>
To: Sakari Ailus <sakari.ailus@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: Hans de Goede <hdegoede@...hat.com>, "Winkler, Tomas"
<tomas.winkler@...el.com>, Arnd Bergmann <arnd@...db.de>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>
Subject: RE: [PATCH v2 3/3] mei: vsc: Assign pinfo fields in variable
declaration
> From: Sakari Ailus <sakari.ailus@...ux.intel.com>
>
> Assign all possible fields of pinfo in variable declaration, instead of just
> zeroing it there.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
Tested-and-Reviewed-by: Wentong Wu <wentong.wu@...el.com>
> ---
> drivers/misc/mei/vsc-tp.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/misc/mei/vsc-tp.c b/drivers/misc/mei/vsc-tp.c index
> 7b678005652b..9b4584d67a1b 100644
> --- a/drivers/misc/mei/vsc-tp.c
> +++ b/drivers/misc/mei/vsc-tp.c
> @@ -445,11 +445,16 @@ static int vsc_tp_match_any(struct acpi_device
> *adev, void *data)
>
> static int vsc_tp_probe(struct spi_device *spi) {
> - struct platform_device_info pinfo = { 0 };
> + struct vsc_tp *tp;
> + struct platform_device_info pinfo = {
> + .name = "intel_vsc",
> + .data = &tp,
> + .size_data = sizeof(tp),
> + .id = PLATFORM_DEVID_NONE,
> + };
> struct device *dev = &spi->dev;
> struct platform_device *pdev;
> struct acpi_device *adev;
> - struct vsc_tp *tp;
> int ret;
>
> tp = devm_kzalloc(dev, sizeof(*tp), GFP_KERNEL); @@ -501,13 +506,8
> @@ static int vsc_tp_probe(struct spi_device *spi)
> ret = -ENODEV;
> goto err_destroy_lock;
> }
> - pinfo.fwnode = acpi_fwnode_handle(adev);
> -
> - pinfo.name = "intel_vsc";
> - pinfo.data = &tp;
> - pinfo.size_data = sizeof(tp);
> - pinfo.id = PLATFORM_DEVID_NONE;
>
> + pinfo.fwnode = acpi_fwnode_handle(adev);
> pdev = platform_device_register_full(&pinfo);
> if (IS_ERR(pdev)) {
> ret = PTR_ERR(pdev);
> --
> 2.39.2
Powered by blists - more mailing lists