Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1BE68EB64DC for ; Thu, 6 Jul 2023 13:22:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231980AbjGFNWm (ORCPT ); Thu, 6 Jul 2023 09:22:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229787AbjGFNWl (ORCPT ); Thu, 6 Jul 2023 09:22:41 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 147DD1994; Thu, 6 Jul 2023 06:22:39 -0700 (PDT) X-IronPort-AV: E=McAfee;i="6600,9927,10763"; a="394356867" X-IronPort-AV: E=Sophos;i="6.01,185,1684825200"; d="scan'208";a="394356867" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2023 06:22:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10763"; a="696844252" X-IronPort-AV: E=Sophos;i="6.01,185,1684825200"; d="scan'208";a="696844252" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga006.jf.intel.com with ESMTP; 06 Jul 2023 06:22:34 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1qHOwK-000XLh-1d; Thu, 06 Jul 2023 16:22:32 +0300 Date: Thu, 6 Jul 2023 16:22:32 +0300 From: Andy Shevchenko To: Laurent Pinchart Cc: Hans de Goede , "Rafael J . Wysocki" , Sakari Ailus , Daniel Scally , linux-acpi@vger.kernel.org, Mauro Carvalho Chehab , Kate Hsuan , Hao Yao , Bingbu Cao , linux-media@vger.kernel.org Subject: Re: [PATCH v3 17/18] media: atomisp: csi2-bridge: Add dev_name() to acpi_handle_info() logging Message-ID: References: <20230705213010.390849-1-hdegoede@redhat.com> <20230705213010.390849-18-hdegoede@redhat.com> <20230706111224.GA20921@pendragon.ideasonboard.com> <20230706130708.GD20921@pendragon.ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230706130708.GD20921@pendragon.ideasonboard.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Thu, Jul 06, 2023 at 04:07:08PM +0300, Laurent Pinchart wrote: > On Thu, Jul 06, 2023 at 03:23:33PM +0300, Andy Shevchenko wrote: > > On Thu, Jul 06, 2023 at 02:12:24PM +0300, Laurent Pinchart wrote: > > > On Thu, Jul 06, 2023 at 01:09:29PM +0300, Andy Shevchenko wrote: > > > > On Wed, Jul 05, 2023 at 11:30:09PM +0200, Hans de Goede wrote: ... > > > > > - acpi_handle_info(adev->handle, "Using DSM entry %s=%s\n", key, val); > > > > > + acpi_handle_info(adev->handle, "%s: Using DSM entry %s=%s\n", > > > > > + dev_name(&adev->dev), key, val); > > > > > > > > Maybe (maybe!) it's a candidate to have something like > > > > > > > > v4l2_acpi_log_info(adev, ...) which combines both and unloads the code from > > > > thinking about it? > > > > > > Or acpi_dev_info() that would take an acpi_device pointer. > > > > (which is an equivalent to the below) > > > > > Or just just dev_info(&adev->dev) ? > > > > The point is to print ACPI handle *and* device name. There are no existing > > helpers for that. > > Then a new acpi_dev_info(struct acpi_device *adev, ...) could do that. > It shouldn't be V4L2-specific in my opinion. But 1) so far seems only v4l2 is interested in this information (I haven't checked for existing users outside of v4l2); 2) the proposed naming doesn't suggest it's also about ACPI handle. :-) Although ACPI seems a good common denominator for these, indeed. -- With Best Regards, Andy Shevchenko