Message ID | 20221121152704.30180-1-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1655574wrr; Mon, 21 Nov 2022 07:27:14 -0800 (PST) X-Google-Smtp-Source: AA0mqf4km1VSe7b8aBXi+Q9AIS+OUDqAvO+qnCvw9GIPpCb04gfUNHhBT9B+CeFXlm7uTyg4GBaP X-Received: by 2002:a63:4545:0:b0:460:936b:ded7 with SMTP id u5-20020a634545000000b00460936bded7mr18158915pgk.149.1669044433747; Mon, 21 Nov 2022 07:27:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669044433; cv=none; d=google.com; s=arc-20160816; b=Fj4Yh5RM6IpFbRhUxInZTIBsR0k1YrDeFu0JEL16y6JO/otMuS09uKPjVRO4GFaF2k RK94kkbPKdeWg/EnktZAF6+NZioAXanJePrmLGvp1AtcC7T4wB23TsSXNwZQxVQHtVnY 3yFkHa+e/xZoY2O9smWDAhq6rOx7syfW0fwj3KfGee9A3ZDDGqQ5m+utYI1a4RYlVsfS K5rR0OTst+uuGVCTjhbH3FFwsptVpIn1xV90fgFnqUCY+w8rw5WrP3Nhofqkkh4ntvhO uSrT6yjRQvLqRh4SzoKHxryil7LNwfrcfTyAY4WDx5DclnLyCJLWJmKcgDOgbZUz0mL1 m6BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=r0aQYiUxTC4KeWoAp45skhv46gqHbOxrtltqSEjE6bo=; b=xJIzuhz7kYhw/a5Il2RkvR6/Hxv2W3Za/0/byqh5y4JPYkr00XpJyqT5wqww51V02k DzYZ7wjj6Zv3wuwkyiDsHHFkRxjREdUh6OX0TwCjzNSgqkgAY08f9jixF7SfaSYVC7a7 M7l/ZQpt44a4ausTMMsj1/sgExqbZdxTBhVSzqX5n5qnOlFxjTaPltcspaDJJX/2lq6R U1Kssx9xwivOUFInZmdTSB0z6ekCLoYAc8lp5I29hvXONVIDdgot4di/65qiz5La+gNE VB5+W+vZOPMFLDgFNqI30fAJy3wV6+bXw86f8Z1yC4pmpcnLI6yQtlk7V+lG8tfMdOeh Iu7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kW55BdDW; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e11-20020a63f54b000000b00476d24ebb09si11363041pgk.23.2022.11.21.07.27.00; Mon, 21 Nov 2022 07:27:13 -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=kW55BdDW; 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 S231366AbiKUP0q (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Mon, 21 Nov 2022 10:26:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbiKUP0o (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 21 Nov 2022 10:26:44 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAA25138; Mon, 21 Nov 2022 07:26:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669044403; x=1700580403; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=D9tqklG/AuJk+yfcIp6L39SLa6QZ1GCROYNdZojYkW8=; b=kW55BdDWuVhdhfGLBvOXIedYNJkiQcdovLac/ni1/VOJxGKTmsc5M7wF kww6FQ5YcnAgZbT+aSU8Tn5L7s6ngWTJiNo+d3ZpQRlka8CcdLQ17vEqU OWsqxv3DT/8pzKRAmp2k9lVWWHVjpB1iOFBP1Lj2HlHj5yPn/F14eAC1r 27XFwhxFLQAxtWmi/bLw9e5tSlgKg2wgunJ3tuQ768wvlOwnfGI9r9Pbj yeGradjlj/uEJDMrHsdnGwx9af/UBTml7uWrjSqtFYkxF4oiNeWxCTdtt WIAe6t+9hubk2iF/+L+nwtVGFchCSlNnH6MzB3lr95SYh7mqvY2fvilXY Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="399872888" X-IronPort-AV: E=Sophos;i="5.96,181,1665471600"; d="scan'208";a="399872888" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2022 07:26:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10538"; a="746949110" X-IronPort-AV: E=Sophos;i="5.96,181,1665471600"; d="scan'208";a="746949110" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga002.fm.intel.com with ESMTP; 21 Nov 2022 07:26:39 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2A87510E; Mon, 21 Nov 2022 17:27:05 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Heikki Krogerus <heikki.krogerus@linux.intel.com>, =?utf-8?b?Q2zDqW1l?= =?utf-8?b?bnQgTMOpZ2Vy?= <clement.leger@bootlin.com>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Daniel Scally <djrscally@gmail.com>, Sakari Ailus <sakari.ailus@linux.intel.com>, Hans de Goede <hdegoede@redhat.com>, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: 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>, Daniel Scally <dan.scally@ideasonboard.com> Subject: [PATCH v2 1/4] media: ipu3-cio2: Don't dereference fwnode handle Date: Mon, 21 Nov 2022 17:27:01 +0200 Message-Id: <20221121152704.30180-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750119936305224233?= X-GMAIL-MSGID: =?utf-8?q?1750119936305224233?= |
Series |
[v2,1/4] media: ipu3-cio2: Don't dereference fwnode handle
|
|
Commit Message
Andy Shevchenko
Nov. 21, 2022, 3:27 p.m. UTC
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> Tested-by: Daniel Scally <dan.scally@ideasonboard.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> --- v2: added tags (Heikki, Daniel) drivers/media/pci/intel/ipu3/cio2-bridge.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Comments
+ Cc: Petr, Sergey On Mon, Nov 21, 2022 at 05:27:01PM +0200, Andy Shevchenko wrote: > Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, > which is a better coding practice. It appears that this series depends on fd070e8ceb90 ("test_printf: Refactor fwnode_pointer() to make it more readable") which is in PRINTK tree. Sakari, Mauro, if you are okay to route this via that tree, can we get your tags for that? Otherwise we need to postpone this till v6.2-rc1 (but I would like to decrease the chances to appear a new user of the to be removed API).
Dunno what happened to my previous reply to this. Okay, trying again... + Cc: Petr, Sergey On Mon, Nov 21, 2022 at 05:27:01PM +0200, Andy Shevchenko wrote: > Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, > which is a better coding practice. It appears that this series depends on fd070e8ceb90 ("test_printf: Refactor fwnode_pointer() to make it more readable") which is in PRINTK tree. Sakari, Mauro, if you are okay to route this via that tree, can we get your tags for that? Otherwise we need to postpone this till v6.2-rc1 (but I would like to decrease the chances to appear a new user of the to be removed API). Note, that Greg Acked v1 of the swnode patches (which are the same in v2).
Hi Andy, On Wed, Nov 23, 2022 at 09:10:58PM +0200, Andy Shevchenko wrote: > Dunno what happened to my previous reply to this. Okay, trying again... > > + Cc: Petr, Sergey > > On Mon, Nov 21, 2022 at 05:27:01PM +0200, Andy Shevchenko wrote: > > Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, > > which is a better coding practice. > > It appears that this series depends on fd070e8ceb90 ("test_printf: Refactor > fwnode_pointer() to make it more readable") which is in PRINTK tree. > > Sakari, Mauro, if you are okay to route this via that tree, can we get your > tags for that? Otherwise we need to postpone this till v6.2-rc1 (but I would > like to decrease the chances to appear a new user of the to be removed API). > > Note, that Greg Acked v1 of the swnode patches (which are the same in v2). Sorry for the late reply. Feel free to do that if it's not too late, with: Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> I don't think the linkelihood for having a new user for this API is high.
On Wed, Dec 07, 2022 at 09:02:49AM +0000, Sakari Ailus wrote: > On Wed, Nov 23, 2022 at 09:10:58PM +0200, Andy Shevchenko wrote: > > Dunno what happened to my previous reply to this. Okay, trying again... > > > > + Cc: Petr, Sergey > > > > On Mon, Nov 21, 2022 at 05:27:01PM +0200, Andy Shevchenko wrote: > > > Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, > > > which is a better coding practice. > > > > It appears that this series depends on fd070e8ceb90 ("test_printf: Refactor > > fwnode_pointer() to make it more readable") which is in PRINTK tree. > > > > Sakari, Mauro, if you are okay to route this via that tree, can we get your > > tags for that? Otherwise we need to postpone this till v6.2-rc1 (but I would > > like to decrease the chances to appear a new user of the to be removed API). > > > > Note, that Greg Acked v1 of the swnode patches (which are the same in v2). > > Sorry for the late reply. Feel free to do that if it's not too late, with: > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Thank you! I think it's a bit late for printk tree to consume this. If it's the case (Petr?) then I will submit a new version after v6.2-rc1 is out. > I don't think the linkelihood for having a new user for this API is high.
On Wed, Dec 07, 2022 at 11:53:12AM +0200, Andy Shevchenko wrote: > On Wed, Dec 07, 2022 at 09:02:49AM +0000, Sakari Ailus wrote: > > On Wed, Nov 23, 2022 at 09:10:58PM +0200, Andy Shevchenko wrote: > > > Dunno what happened to my previous reply to this. Okay, trying again... > > > > > > + Cc: Petr, Sergey > > > > > > On Mon, Nov 21, 2022 at 05:27:01PM +0200, Andy Shevchenko wrote: > > > > Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, > > > > which is a better coding practice. > > > > > > It appears that this series depends on fd070e8ceb90 ("test_printf: Refactor > > > fwnode_pointer() to make it more readable") which is in PRINTK tree. > > > > > > Sakari, Mauro, if you are okay to route this via that tree, can we get your > > > tags for that? Otherwise we need to postpone this till v6.2-rc1 (but I would > > > like to decrease the chances to appear a new user of the to be removed API). > > > > > > Note, that Greg Acked v1 of the swnode patches (which are the same in v2). > > > > Sorry for the late reply. Feel free to do that if it's not too late, with: > > > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> I intended to add this applies to the set. > > Thank you! > I think it's a bit late for printk tree to consume this. If it's the case > (Petr?) then I will submit a new version after v6.2-rc1 is out. > > > I don't think the linkelihood for having a new user for this API is high.
On Wed 2022-12-07 11:53:12, Andy Shevchenko wrote: > On Wed, Dec 07, 2022 at 09:02:49AM +0000, Sakari Ailus wrote: > > On Wed, Nov 23, 2022 at 09:10:58PM +0200, Andy Shevchenko wrote: > > > Dunno what happened to my previous reply to this. Okay, trying again... > > > > > > + Cc: Petr, Sergey > > > > > > On Mon, Nov 21, 2022 at 05:27:01PM +0200, Andy Shevchenko wrote: > > > > Use acpi_fwnode_handle() instead of dereferencing an fwnode handle directly, > > > > which is a better coding practice. > > > > > > It appears that this series depends on fd070e8ceb90 ("test_printf: Refactor > > > fwnode_pointer() to make it more readable") which is in PRINTK tree. > > > > > > Sakari, Mauro, if you are okay to route this via that tree, can we get your > > > tags for that? Otherwise we need to postpone this till v6.2-rc1 (but I would > > > like to decrease the chances to appear a new user of the to be removed API). > > > > > > Note, that Greg Acked v1 of the swnode patches (which are the same in v2). > > > > Sorry for the late reply. Feel free to do that if it's not too late, with: > > > > Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> > > Thank you! > I think it's a bit late for printk tree to consume this. If it's the case > (Petr?) then I will submit a new version after v6.2-rc1 is out. Yes, I am sorry but it is too late for the printk tree. I am going to send the pull request for 6.2 today or tomorrow. Linus explicitly asked to send the pull request early this time because the merge window will be overlapping with the holidays. On the positive side. There is a high chance that the changes from the printk tree will be in the mainline early enough so that you could manage to send this still during the merge window. Best Regards, Petr
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);