From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::242; helo=mail-it0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 4587021B02822 for ; Thu, 13 Sep 2018 08:50:39 -0700 (PDT) Received: by mail-it0-x242.google.com with SMTP id p79-v6so8468651itp.3 for ; Thu, 13 Sep 2018 08:50:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=C0DuH8u0bq2guBDtb8jvZjB0rRRwkZ2KaOqCRrfzlEU=; b=JV12eCmRy4MwnSHiE72Oh/Mk4bShsBWMYF5VFXja/HDW1nq83AUefL6hztyRufIzBw XUvUm4h3sM9lcnhrOdxL4NHAdpdZ+/Yd5ly7DEhyKE4zrkdTjLTvdaBU9oKwPziPdy2c +g9AsSbg2+/uuAo00/Edqf/JnbvXMYFItYNOM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=C0DuH8u0bq2guBDtb8jvZjB0rRRwkZ2KaOqCRrfzlEU=; b=fT5GL8zNV/89vu4+XyXbMUUcVbc/ZNFtMRqxRt9hurhFtXZSwcC7jwFujUOHV5lbam cOKx1lcuJY3fa4HMzrY/i4yYyYa7fBL6sXIibId/U5jkOCC3FB+R3fVzs8uveAUbPDp8 gSN2KdEDNSV5ZdYqiAPZieZuQ3eFzzwZHlqoQmnTr3+OIhvlItgAwQjzoSvbzTpBaL3h k9qd+hfH6qRR5ie4YvBxxFfWLw8jJYZyq6+dRGLSZPBHJ8zxmp/pIwqSebpT1XF6ABCd B8pfuSax/3cTmzq5tE+1dFstwcQqYG6H9dv8N7u9PMnX+/bKBu1G0AL1TKxN95gNm1I8 zyog== X-Gm-Message-State: APzg51C8njFLfz/40Z3Ycn/I3AiPL6VBfR7LO5TNhofoREOx1ghSR319 a5xV9e8JTalH5RstnXNi3I35TqiaZoTxdIL9ZJ/Z0w== X-Google-Smtp-Source: ANB0VdYp/airC0KEIJB8uKFXqn3uoa77JJmALTyRnUleNlstO5b7K07U0FgPCdXIeZEt/PxsV2kS/Ff4voFsuA6JBdU= X-Received: by 2002:a02:4d1b:: with SMTP id l27-v6mr7193825jab.86.1536853838763; Thu, 13 Sep 2018 08:50:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:2848:0:0:0:0:0 with HTTP; Thu, 13 Sep 2018 08:50:38 -0700 (PDT) In-Reply-To: <20180910071202.11008-1-dandan.bi@intel.com> References: <20180910071202.11008-1-dandan.bi@intel.com> From: Ard Biesheuvel Date: Thu, 13 Sep 2018 17:50:38 +0200 Message-ID: To: dandan bi Cc: "edk2-devel@lists.01.org" , Ruiyu Ni , Leif Lindholm Subject: Re: [patch 1/3] EmbeddedPkg/VirtualKeyboard: Avoid notification called more than once X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2018 15:50:40 -0000 Content-Type: text/plain; charset="UTF-8" On 10 September 2018 at 09:12, dandan bi wrote: > From: Dandan Bi > > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=996 > > Issue: > In current code logic, when a key is pressed, it will search > the whole NotifyList to find whether a notification has been > registered with the keystroke. if yes, it will en-queue the > key for notification execution later. And now if different > notification functions have been registered with the same key, > then the key will be en-queued more than once. Then it will > cause the notification executed more than once. > > This patch is to enhance the code logic to fix this issue. > > Cc: Ruiyu Ni > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Dandan Bi Reviewed-by: Ard Biesheuvel > --- > EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c > index 6609bc8dbe..daea9c47d2 100644 > --- a/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c > +++ b/EmbeddedPkg/Drivers/VirtualKeyboardDxe/VirtualKeyboard.c > @@ -1,9 +1,9 @@ > /** @file > VirtualKeyboard driver > > -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
> +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> Copyright (c) 2018, Linaro Ltd. All rights reserved.
> > This program and the accompanying materials > are licensed and made available under the terms and conditions > of the BSD License which accompanies this distribution. The > @@ -1043,10 +1043,11 @@ VirtualKeyboardTimerHandler ( > // while current TPL is TPL_NOTIFY. It will be invoked in > // KeyNotifyProcessHandler() which runs at TPL_CALLBACK. > // > Enqueue (&VirtualKeyboardPrivate->QueueForNotify, &KeyData); > gBS->SignalEvent (VirtualKeyboardPrivate->KeyNotifyProcessEvent); > + break; > } > } > > Enqueue (&VirtualKeyboardPrivate->Queue, &KeyData); > > -- > 2.14.3.windows.1 >