lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d830ff8b-8bf2-f70c-35c2-ee10417051b3@ideasonboard.com>
Date:   Mon, 21 Nov 2022 10:01:12 +0000
From:   Dan Scally <dan.scally@...asonboard.com>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Clément Léger <clement.leger@...tlin.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Hans de Goede <hdegoede@...hat.com>,
        linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-media@...r.kernel.org
Cc:     Daniel Scally <djrscally@...il.com>,
        Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Yong Zhi <yong.zhi@...el.com>,
        Bingbu Cao <bingbu.cao@...el.com>,
        Tianshu Qiu <tian.shu.qiu@...el.com>
Subject: Re: [PATCH v1 1/4] media: ipu3-cio2: Don't dereference fwnode handle

Hi Andy, sorry for the delay

On 18/11/2022 18:56, 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@...ux.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);
>   


LGTM: Reviewed-by: Daniel Scally <dan.scally@...asonboard.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ