Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3983193rwb; Mon, 21 Nov 2022 02:09:57 -0800 (PST) X-Google-Smtp-Source: AA0mqf5WyAknksWPczIU+Jn5ng4REhAJ6B2jcmAx/9r9NHnaqmUlBwFqUTz6ecpzghJE8abeFFCa X-Received: by 2002:a17:906:706:b0:7ac:2e16:eb05 with SMTP id y6-20020a170906070600b007ac2e16eb05mr15380425ejb.26.1669025397717; Mon, 21 Nov 2022 02:09:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669025397; cv=none; d=google.com; s=arc-20160816; b=b/2/nyXHl9l7ktPLL3WziDoHrtm+SoLCrWsi18uGeWw1jjWdOFIFXrunoUWfCdi9Sv EuK9kj91KctQyII0tZL0na0wq8Yidbay7lNHLwlaraz3KptJzt9CYAOxZYbWcqlZ+uvj k33HMj21nLonQG8HKWGxFOrJix6+H+wW3ABR15CG6EbqhEzCh47EiqHELnlXYFlP8EkQ ZynLK86ONriT9NH3l/Ob+7qr3O9ukcTsBrWniT6As/ep8yuFe7c/LSiVfgyWz0wMG+7o JY2FkhG1GsbE1P1nTo0H9gMyHiOKGrI9wpDa4ZO9VUnduiDy97rP8GlfCpBpwQQCUwwW IO+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=dXxuvP1p24PsdRVg67exwp37eQZtq+y/jZ9ur8v0ZwE=; b=RMOQ34wa4e8nc3T5c88sz63ZuKwAgkXLqC55VxsWiqDfc16GnnSEEoFePIfMkmcslx zheXmJYXO6xCmcWjq2tAra9Tv/4jIGyM7Ni/zr21HaWLn+85aI6b+BmTz0EcvgneZvw1 qV2czPO0ZoONe1W+OBpXJTEJSHIaZSeboOEu0sxSxVEaeSw7SDSE0cYy+QvWRSRAkTaD tn6ewLl9H3A6w400Q2ivSdvWmSNFTHfoOXLlZsXUBl3ehD40T1FsdRIbALAUVTcQV3D3 /4P9UojbdiEGAu4ju5Mecs5kxT6t9WC1WPah83p0+2Nu9wztZE47Bqx158eujNqjpeLY NHWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="X8ZDYy/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a05640235c200b00461d5afea01si9913225edc.165.2022.11.21.02.09.34; Mon, 21 Nov 2022 02:09:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="X8ZDYy/V"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229897AbiKUJCY (ORCPT + 91 others); Mon, 21 Nov 2022 04:02:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52010 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229764AbiKUJCV (ORCPT ); Mon, 21 Nov 2022 04:02:21 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EA4F317D2; Mon, 21 Nov 2022 01:02:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669021341; x=1700557341; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=M+rRHtdKg5QyHpNqpD1T8O6Ma2WXA8citsXe5pnDnJA=; b=X8ZDYy/VFZq00SzmO3WyOIWglT2sBRgXAoXIsbpw3b7d0984/ZI4FjAi qDm3dAWgDHzdDacdj/t30W54c9ga1+25PzNtuMKxFjkN5zD1xhJYqgCSn YsRFa+siSqbFEOtnxWy0JEbVnSyLwa7h5XAyiCF4fi7EIVUjIi7OP01TD 4LHzAbSgloCDWmCEZGg0XV6YokJy1AUawNFYBF+wTZgk3yJrZlnfFmyyL Pu7n6OBcpYvCGd2igB718ZJFgJKz35TMR4lX5JDOxi+RWflrYzWwMAgrl sX6V/LpHn9vcepzihDheJyJpJjbyS3guWbCsYSN/5XImt9C2a7o3LT3Jq w==; X-IronPort-AV: E=McAfee;i="6500,9779,10537"; a="311140789" X-IronPort-AV: E=Sophos;i="5.96,180,1665471600"; d="scan'208";a="311140789" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 01:02:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10537"; a="783374619" X-IronPort-AV: E=Sophos;i="5.96,180,1665471600"; d="scan'208";a="783374619" Received: from kuha.fi.intel.com ([10.237.72.185]) by fmsmga001.fm.intel.com with SMTP; 21 Nov 2022 01:02:16 -0800 Received: by kuha.fi.intel.com (sSMTP sendmail emulation); Mon, 21 Nov 2022 11:02:15 +0200 Date: Mon, 21 Nov 2022 11:02:15 +0200 From: Heikki Krogerus To: Andy Shevchenko Cc: =?iso-8859-1?Q?Cl=E9ment_L=E9ger?= , Sakari Ailus , Mauro Carvalho Chehab , Hans de Goede , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, Daniel Scally , Greg Kroah-Hartman , "Rafael J. Wysocki" , Yong Zhi , Bingbu Cao , Tianshu Qiu Subject: Re: [PATCH v1 1/4] media: ipu3-cio2: Don't dereference fwnode handle Message-ID: References: <20221118185617.33908-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221118185617.33908-1-andriy.shevchenko@linux.intel.com> X-Spam-Status: No, score=-7.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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 thanks, -- heikki