From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-x233.google.com (mail-yw0-x233.google.com [IPv6:2607:f8b0:4002:c05::233]) (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 51F5E21A07AB5 for ; Tue, 27 Jun 2017 15:43:33 -0700 (PDT) Received: by mail-yw0-x233.google.com with SMTP id j11so17869089ywa.2 for ; Tue, 27 Jun 2017 15:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=7px4rv4dc9JIQ0tJgiJ2oNaoCo/eZgc3ib5QwjozWoo=; b=iZpdJVHwDY6DuSl2k4UR/qb9WmzbYISfCpYpvP1oRGl0NtD+Yf6Jb//rDT38opld8Y rvHmKk1UW1vJ22+Zx7iQmBISkb2AEiWVU2L1hsZzkmMiWGH4+k0T79Hiiv50dEyhSgS1 sx4wP66yrWUS3eClPTuCeH49I+OoEiKr7BaaASWf+IWyYQhDbDGS6h6nrojkqq5r0gnI GjjGt/hPtXd37UFtqXUbdEu+wQqK7Bt5odj/y3xNCkGaqWymmUmr6yTfFai824bcSnoL U2pelsHR2jfzV9Vyf1RDj8i17fxuNnFDp8ZE6HjFDH4/8JCTB8tvDhOD5O0uGK04wdq9 eEnA== 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=7px4rv4dc9JIQ0tJgiJ2oNaoCo/eZgc3ib5QwjozWoo=; b=VQwL9mY8yHWRbk8mxXT0Bsu4VbfLUS6+wU3KCxXpmvYjwIGxQVp6Lz34DX5Vkhcntp DXlF1f2/HxByegDHOmyWwPxZzLWbVuploaDTaohQpMNphIFBEBQOEnmYtT0w/0+9P8V1 W+xit2DR5x1KQTZKXGcQNWKheSWb/uucx9BRbOxgw0lEpQweu5kOQbvs2KjKijeifZv2 +wcl28nKIPdP/8Vo5cik1p27ABt7jFMS3Vp7BVOCqEEw2WJeRl3CAMcYXs/Ecw1/471H RUbfkwUHsmxkJedeR+y9IluHcIG55hBTJJ8xft2i7A2UJpjF4gAlV1F4u61MxSDsNDJ3 1Rxw== X-Gm-Message-State: AKS2vOxfZMLe5CqCDP0aeJ4IQXf2VcGIG0N5hYG6NAFLH2WtBzX9/dhr yVQ28ZWPyvhX+QbWFCrvcJ04ncS2ag== X-Received: by 10.13.219.14 with SMTP id d14mr5573490ywe.245.1498603503136; Tue, 27 Jun 2017 15:45:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.209.86 with HTTP; Tue, 27 Jun 2017 15:44:42 -0700 (PDT) In-Reply-To: References: From: TVKR Date: Tue, 27 Jun 2017 17:44:42 -0500 Message-ID: To: Andrew Fish Cc: edk2-devel@lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.22 Subject: Re: DXE core - Connecting a controller to driver X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2017 22:43:33 -0000 Content-Type: text/plain; charset="UTF-8" Thanks for the reply Andrew. I misread the code and mixed up the for loop inside the do/while and got confused there for a moment (having one of those brain fade moments :(). Regards On Tue, Jun 27, 2017 at 9:07 AM, Andrew Fish wrote: > > > On Jun 26, 2017, at 9:30 AM, TVKR wrote: > > > > Hi experts, > > > > I have a question related to the ConnectController implementation in the > > edk2 codebase (MdeModulePkg\Core\Dxe\Hand\DriverSupport.c). Under the > > CoreConnectSingleController function, what if DriverBinding->Supported > > returns an error? I see that there is a do/while loop waiting for > > DriverFound to be set to TRUE, but it looks like this wont happen if > > DriverBinding->Supported returns an error (looping for ever). Am I > reading > > this wrong? > > > > How do you think a do while loop works in C? > > DriverFound = FALSE; > do { > ; > } while (DriverFound); > > Is not an infinite loop? It just runs one time. > > The code is looping as long as Start() is called as calling Start() could > cause other drivers Supported() to start returning TRUE, so you have to > recheck the set after calling Start(). > > Thanks, > > Andrew Fish > > > Thanks > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel > >