From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Hans de Goede <hdegoede@redhat.com>,
Wolfram Sang <wsa@kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-i2c <linux-i2c@vger.kernel.org>,
Linux PCI <linux-pci@vger.kernel.org>,
ibm-acpi-devel@lists.sourceforge.net,
Platform Driver <platform-driver-x86@vger.kernel.org>,
Len Brown <lenb@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Mark Gross <markgross@kernel.org>
Subject: Re: [PATCH v1 1/5] ACPI: utils: Introduce acpi_match_video_device_handle() helper
Date: Sat, 9 Jul 2022 00:31:16 +0300 [thread overview]
Message-ID: <YsiiJFdbFVLyRL6i@smile.fi.intel.com> (raw)
In-Reply-To: <YsihLEX3At421cAK@smile.fi.intel.com>
On Sat, Jul 09, 2022 at 12:27:09AM +0300, Andy Shevchenko wrote:
> On Tue, Jul 05, 2022 at 08:40:30PM +0200, Rafael J. Wysocki wrote:
> > On Fri, Jul 1, 2022 at 7:47 AM Mika Westerberg
> > <mika.westerberg@linux.intel.com> wrote:
> > > On Fri, Jul 01, 2022 at 12:28:15AM +0300, Andy Shevchenko wrote:
...
> > > > extern long acpi_is_video_device(acpi_handle handle);
> > > > +extern bool acpi_match_video_device_handle(acpi_handle handle);
> > > I think we can do slightly better here. The only caller of
> > > acpi_is_video_device() is in drivers/acpi/video_detect.c so we can move
> > > it there and make it static (is_video_device()).
>
> AFAICS, the scan.c is user of it as well.
>
> > > Then we can name this one acpi_is_video_device() instead and in addition
> > > make it take struct acpi_device as parameter instead of acpi_handle (I
> > > think we should not use acpi_handles in drivers if possible).
> >
> > Agreed.
>
> Not sure it will help to have acpi device since most of the callers asks for
> handle to be checked.
Actually it's 2:2 now. I'm fine with ACPI device and name like
acpi_dev_is_video_device()
> Taking into account above, what we can do is to rename it to
>
> acpi_handle_is_video_device()
>
> which should be clearer than initial proposal.
>
> Thoughts?
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2022-07-08 21:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-30 21:28 [PATCH v1 1/5] ACPI: utils: Introduce acpi_match_video_device_handle() helper Andy Shevchenko
2022-06-30 21:28 ` [PATCH v1 2/5] ACPI: video: Convert to use " Andy Shevchenko
2022-06-30 21:28 ` [PATCH v1 3/5] i2c: acpi: " Andy Shevchenko
2022-07-06 13:09 ` Wolfram Sang
2022-06-30 21:28 ` [PATCH v1 4/5] PCI/VGA: " Andy Shevchenko
2022-06-30 21:28 ` [PATCH v1 5/5] platform/x86: thinkpad_acpi: " Andy Shevchenko
2022-07-01 5:47 ` [PATCH v1 1/5] ACPI: utils: Introduce " Mika Westerberg
2022-07-05 18:40 ` Rafael J. Wysocki
2022-07-08 21:27 ` Andy Shevchenko
2022-07-08 21:31 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YsiiJFdbFVLyRL6i@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=hdegoede@redhat.com \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=wsa@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox