From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Len Brown <lenb@kernel.org>, Yinghai Lu <yinghai@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
Hanjun Guo <guohanjun@huawei.com>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ACPI: dock: fix enum-conversion warning
Date: Tue, 27 Oct 2020 19:31:32 +0100 [thread overview]
Message-ID: <CAJZ5v0hh2XSco-TdUS83piwpTyQk==VUo7nGi9+rKsK2P6u33g@mail.gmail.com> (raw)
In-Reply-To: <20201026214838.3892471-1-arnd@kernel.org>
On Mon, Oct 26, 2020 at 10:48 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> gcc points out a type mismatch:
>
> drivers/acpi/dock.c: In function 'hot_remove_dock_devices':
> drivers/acpi/dock.c:234:53: warning: implicit conversion from 'enum <anonymous>' to 'enum dock_callback_type' [-Wenum-conversion]
> 234 | dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST, false);
>
> This is harmless because 'false' still has the correct numeric value,
> but passing DOCK_CALL_HANDLER documents better what is going on
> and avoids the warning.
>
> Fixes: 37f908778f20 ("ACPI / dock: Walk list in reverse order during removal of devices")
> Fixes: f09ce741a03a ("ACPI / dock / PCI: Drop ACPI dock notifier chain")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/acpi/dock.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
> index 45d4b7b69de8..24e076f44d23 100644
> --- a/drivers/acpi/dock.c
> +++ b/drivers/acpi/dock.c
> @@ -231,7 +231,8 @@ static void hot_remove_dock_devices(struct dock_station *ds)
> * between them).
> */
> list_for_each_entry_reverse(dd, &ds->dependent_devices, list)
> - dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST, false);
> + dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST,
> + DOCK_CALL_HANDLER);
>
> list_for_each_entry_reverse(dd, &ds->dependent_devices, list)
> acpi_bus_trim(dd->adev);
> --
Applied as 5.10-rc material, thanks!
prev parent reply other threads:[~2020-10-27 18:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 21:48 [PATCH] ACPI: dock: fix enum-conversion warning Arnd Bergmann
2020-10-27 1:10 ` Hanjun Guo
2020-10-27 18:31 ` Rafael J. Wysocki [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='CAJZ5v0hh2XSco-TdUS83piwpTyQk==VUo7nGi9+rKsK2P6u33g@mail.gmail.com' \
--to=rafael@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=guohanjun@huawei.com \
--cc=gustavoars@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=yinghai@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;
as well as URLs for NNTP newsgroup(s).