From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: redhat.com, ip: 209.132.183.28, mailfrom: lersek@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 17 Sep 2019 12:50:10 -0700 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B6B478A1C90; Tue, 17 Sep 2019 19:50:09 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-37.rdu2.redhat.com [10.10.120.37]) by smtp.corp.redhat.com (Postfix) with ESMTP id D8D71600C4; Tue, 17 Sep 2019 19:50:07 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Dandan Bi , Eric Dong , Hao A Wu , Jian J Wang , Ray Ni , Zhichao Gao Subject: [PATCH 12/35] MdeModulePkg: stop abusing EFI_HANDLE for keystroke notify registration Date: Tue, 17 Sep 2019 21:49:12 +0200 Message-Id: <20190917194935.24322-13-lersek@redhat.com> In-Reply-To: <20190917194935.24322-1-lersek@redhat.com> References: <20190917194935.24322-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.69]); Tue, 17 Sep 2019 19:50:09 +0000 (UTC) Content-Transfer-Encoding: quoted-printable EFI_REGISTER_KEYSTROKE_NOTIFY and EFI_UNREGISTER_KEYSTROKE_NOTIFY require the notification handle to have type (VOID*). The notification handle has nothing to do with the EFI_HANDLE type. This change is a semantic fix; functionally, it's a no-op. Cc: Dandan Bi Cc: Eric Dong Cc: Hao A Wu Cc: Jian J Wang Cc: Ray Ni Cc: Zhichao Gao Signed-off-by: Laszlo Ersek --- Notes: lightly tested: ConSplitterDxe is part of the ArmVirt and OVMF platfo= rms MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c | 2 +- MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c = b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index 63c814ae1816..9c38271b65f9 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -4026,7 +4026,7 @@ ConSplitterTextInRegisterKeyNotify ( if (NewNotify =3D=3D NULL) { return EFI_OUT_OF_RESOURCES; } - NewNotify->NotifyHandleList =3D (EFI_HANDLE *) AllocateZeroPool (sizeo= f (EFI_HANDLE) * Private->TextInExListCount); + NewNotify->NotifyHandleList =3D (VOID **) AllocateZeroPool (sizeof (VO= ID *) * Private->TextInExListCount); if (NewNotify->NotifyHandleList =3D=3D NULL) { gBS->FreePool (NewNotify); return EFI_OUT_OF_RESOURCES; diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeM= odulePkg/Universal/DriverSampleDxe/DriverSample.c index 7cfd5c178861..f98797225b63 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -143,7 +143,7 @@ InternalStartMonitor( EFI_HANDLE *Handles; UINTN HandleCount; UINTN HandleIndex; - EFI_HANDLE NotifyHandle; + VOID *NotifyHandle; =20 Status =3D gBS->LocateHandleBuffer ( ByProtocol, @@ -202,7 +202,7 @@ InternalStopMonitor( EFI_KEY_DATA KeyData; UINTN HandleCount; UINTN HandleIndex; - EFI_HANDLE NotifyHandle; + VOID *NotifyHandle; =20 Status =3D gBS->LocateHandleBuffer ( ByProtocol, --=20 2.19.1.3.g30247aa5d201