From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "Clément Léger" <clement.leger@bootlin.com>,
"Sakari Ailus" <sakari.ailus@linux.intel.com>,
"Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Hans de Goede" <hdegoede@redhat.com>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org,
"Daniel Scally" <djrscally@gmail.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Yong Zhi" <yong.zhi@intel.com>,
"Bingbu Cao" <bingbu.cao@intel.com>,
"Tianshu Qiu" <tian.shu.qiu@intel.com>
Subject: Re: [PATCH v1 1/4] media: ipu3-cio2: Don't dereference fwnode handle
Date: Mon, 21 Nov 2022 11:02:15 +0200 [thread overview]
Message-ID: <Y3s+l54MbAv+svzI@kuha.fi.intel.com> (raw)
In-Reply-To: <20221118185617.33908-1-andriy.shevchenko@linux.intel.com>
On Fri, Nov 18, 2022 at 08:56:14PM +0200, Andy Shevchenko wrote:
> Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly,
> which is a better coding practice.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/media/pci/intel/ipu3/cio2-bridge.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/pci/intel/ipu3/cio2-bridge.c b/drivers/media/pci/intel/ipu3/cio2-bridge.c
> index df6c94da2f6a..18974a72e94a 100644
> --- a/drivers/media/pci/intel/ipu3/cio2-bridge.c
> +++ b/drivers/media/pci/intel/ipu3/cio2-bridge.c
> @@ -263,7 +263,7 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg,
> struct cio2_bridge *bridge,
> struct pci_dev *cio2)
> {
> - struct fwnode_handle *fwnode;
> + struct fwnode_handle *fwnode, *primary;
> struct cio2_sensor *sensor;
> struct acpi_device *adev;
> acpi_status status;
> @@ -322,7 +322,9 @@ static int cio2_bridge_connect_sensor(const struct cio2_sensor_config *cfg,
> }
>
> sensor->adev = acpi_dev_get(adev);
> - adev->fwnode.secondary = fwnode;
> +
> + primary = acpi_fwnode_handle(adev);
> + primary->secondary = fwnode;
>
> cio2_bridge_instantiate_vcm_i2c_client(sensor);
>
This and also the others look good to me. FWIW, for the series:
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
thanks,
--
heikki
next prev parent reply other threads:[~2022-11-21 9:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 18:56 [PATCH v1 1/4] media: ipu3-cio2: Don't dereference fwnode handle Andy Shevchenko
2022-11-18 18:56 ` [PATCH v1 2/4] media: ipu3-cio2: Convert to use software_node_register_node_group() Andy Shevchenko
2022-11-21 10:19 ` Dan Scally
2022-11-21 10:22 ` Hans de Goede
2022-11-21 10:23 ` Daniel Scally
2022-11-21 10:27 ` Andy Shevchenko
2022-11-21 14:32 ` Dan Scally
2022-11-21 14:40 ` Hans de Goede
2022-11-18 18:56 ` [PATCH v1 3/4] software node: Switch property entry test to new API Andy Shevchenko
2022-11-23 19:01 ` Greg Kroah-Hartman
2022-11-23 19:07 ` Andy Shevchenko
2022-11-23 19:25 ` Greg Kroah-Hartman
2022-11-18 18:56 ` [PATCH v1 4/4] software node: Remove unused APIs Andy Shevchenko
2022-11-23 19:02 ` Greg Kroah-Hartman
2022-11-21 9:02 ` Heikki Krogerus [this message]
2022-11-21 10:01 ` [PATCH v1 1/4] media: ipu3-cio2: Don't dereference fwnode handle Dan Scally
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y3s+l54MbAv+svzI@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bingbu.cao@intel.com \
--cc=clement.leger@bootlin.com \
--cc=djrscally@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rafael@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tian.shu.qiu@intel.com \
--cc=yong.zhi@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).