From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 092C4168 for ; Thu, 22 Jul 2021 09:02:56 +0000 (UTC) X-IronPort-AV: E=McAfee;i="6200,9189,10052"; a="275420186" X-IronPort-AV: E=Sophos;i="5.84,260,1620716400"; d="scan'208";a="275420186" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2021 02:02:55 -0700 X-IronPort-AV: E=Sophos;i="5.84,260,1620716400"; d="scan'208";a="462701664" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jul 2021 02:02:52 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1m6UbO-00GvE7-Gj; Thu, 22 Jul 2021 12:02:46 +0300 Date: Thu, 22 Jul 2021 12:02:46 +0300 From: Andy Shevchenko To: Mauro Carvalho Chehab Cc: Wolfram Sang , Hans de Goede , linux-i2c@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, Mika Westerberg , Mauro Carvalho Chehab , Sakari Ailus , Greg Kroah-Hartman Subject: Re: [PATCH v1 2/6] staging: atomisp: Replace open-coded i2c_acpi_find_client_by_adev() Message-ID: References: <20210526124322.48915-1-andriy.shevchenko@linux.intel.com> <20210526124322.48915-2-andriy.shevchenko@linux.intel.com> <20210722105744.4a94d58d@coco.lan> Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210722105744.4a94d58d@coco.lan> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo On Thu, Jul 22, 2021 at 10:57:44AM +0200, Mauro Carvalho Chehab wrote: > Em Wed, 26 May 2021 15:43:18 +0300 > Andy Shevchenko escreveu: > > > gmin_i2c_dev_exists() is using open-coded variant of > > i2c_acpi_find_client_by_adev(). Replace it with a corresponding call. > > > > Signed-off-by: Andy Shevchenko > > At least on the top of v5.14-rc1, this patch causes a compilation > issue: > > drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c: In function ‘gmin_i2c_dev_exists’: > drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c:386:19: error: implicit declaration of function ‘i2c_acpi_find_client_by_adev’; did you mean ‘i2c_acpi_find_adapter_by_handle’? [-Werror=implicit-function-declaration] > 386 | *client = i2c_acpi_find_client_by_adev(adev); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > | i2c_acpi_find_adapter_by_handle > drivers/staging/media/atomisp/pci/atomisp_gmin_platform.c:386:17: warning: assignment to ‘struct i2c_client *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] > 386 | *client = i2c_acpi_find_client_by_adev(adev); > | ^ > > The reason is because such function is static: > > $ git grep i2c_acpi_find_client_by_adev > drivers/i2c/i2c-core-acpi.c:static struct i2c_client *i2c_acpi_find_client_by_adev(struct acpi_device *adev) > > IMO, a patch like that should be applied at the same tree as a patch > dropping "static" from drivers/i2c/i2c-core-acpi.c. If you want to do > so, feel free to add: > > Reviewed-by: Mauro Carvalho Chehab Thanks! There is a v2 of this where the patch is dropped from. -- With Best Regards, Andy Shevchenko