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: philmd@redhat.com) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by groups.io with SMTP; Tue, 24 Sep 2019 03:54:56 -0700 Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EDBB0C057F88 for ; Tue, 24 Sep 2019 10:54:55 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id z1so416541wrw.21 for ; Tue, 24 Sep 2019 03:54:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=SwBe4CTCcP28zuadCD9xk9ZKeTnnSDcHMwiuI2IWK6w=; b=FpoWYWGPseXRWxU7rO7R02/5fB7kQqtG1kZO+eyZKPEJvhjjBX3Kh2M6klIlkzLybq pDvmztIMAZf2yiIFwN7EDUHWsXP4b0lcHez6Kqm9irT7+y97chBuCosApkkqgJwkDI1s Y7JfXsmj8Mp0tfjW+RzXj7WMx5nBgaBXy0R/F++EO2gbwSAHYFMzaGeSm51JBPfodd/w TSIQtPQUaQd/654nssiVkuhKK+jK96V6yweXgWoPIMypgpGJY5aRR1WNI2oTu87qS4xG ylF13Ngiy1JZ076Dzlg3AvGLqthIo20432M4oJVDhhm4172j0JPqm7cLF01Wv1YVuiYe aS/g== X-Gm-Message-State: APjAAAUGmeqeYzFuddIJ9Aj2dX3iFcSsSZ0DF8U7VQs/9CanuCH3jM4f YFRlaAEBZEAMfW4+8dwXOkUTxMGI+yUbV9nGc5xY9S/BPjOFSXkgKwxNUrCc4GeJmHPMXLy3ZQR h8iZsIhVTOTeFSA== X-Received: by 2002:a5d:500b:: with SMTP id e11mr1850663wrt.285.1569322494453; Tue, 24 Sep 2019 03:54:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqz4jC6I3JTmfcW3Q99wulgfwTrivV5AFt+y9B/oDxzypmao7InWfflO90Jaf9nEpVAqDLBkNw== X-Received: by 2002:a5d:500b:: with SMTP id e11mr1850652wrt.285.1569322494290; Tue, 24 Sep 2019 03:54:54 -0700 (PDT) Received: from [192.168.1.115] (240.red-88-21-68.staticip.rima-tde.net. [88.21.68.240]) by smtp.gmail.com with ESMTPSA id j26sm3045378wrd.2.2019.09.24.03.54.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Sep 2019 03:54:53 -0700 (PDT) Subject: Re: [edk2-devel] [PATCH 12/35] MdeModulePkg: stop abusing EFI_HANDLE for keystroke notify registration To: devel@edk2.groups.io, lersek@redhat.com Cc: Dandan Bi , Eric Dong , Hao A Wu , Jian J Wang , Ray Ni , Zhichao Gao References: <20190917194935.24322-1-lersek@redhat.com> <20190917194935.24322-13-lersek@redhat.com> From: =?UTF-8?B?UGhpbGlwcGUgTWF0aGlldS1EYXVkw6k=?= Openpgp: id=89C1E78F601EE86C867495CBA2A3FD6EDEADC0DE; url=http://pgp.mit.edu/pks/lookup?op=get&search=0xA2A3FD6EDEADC0DE Message-ID: <6e8168f6-9f7b-2f56-c612-ae0fc0c562c9@redhat.com> Date: Tue, 24 Sep 2019 12:54:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20190917194935.24322-13-lersek@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 9/17/19 9:49 PM, Laszlo Ersek wrote: > 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 platforms > > 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 == NULL) { > return EFI_OUT_OF_RESOURCES; > } > - NewNotify->NotifyHandleList = (EFI_HANDLE *) AllocateZeroPool (sizeof (EFI_HANDLE) * Private->TextInExListCount); > + NewNotify->NotifyHandleList = (VOID **) AllocateZeroPool (sizeof (VOID *) * Private->TextInExListCount); TEXT_IN_EX_SPLITTER_NOTIFY->NotifyHandleList is of type (VOID **), OK. > if (NewNotify->NotifyHandleList == NULL) { > gBS->FreePool (NewNotify); > return EFI_OUT_OF_RESOURCES; > diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/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; > > Status = gBS->LocateHandleBuffer ( > ByProtocol, > @@ -202,7 +202,7 @@ InternalStopMonitor( > EFI_KEY_DATA KeyData; > UINTN HandleCount; > UINTN HandleIndex; > - EFI_HANDLE NotifyHandle; > + VOID *NotifyHandle; > > Status = gBS->LocateHandleBuffer ( > ByProtocol, > Reviewed-by: Philippe Mathieu-Daude