From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.151; helo=mga17.intel.com; envelope-from=ray.ni@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 3CA34208AE2D4 for ; Wed, 20 Feb 2019 01:48:58 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2019 01:48:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,390,1544515200"; d="scan'208";a="144978798" Received: from ray-dev.ccr.corp.intel.com (HELO [10.239.9.31]) ([10.239.9.31]) by fmsmga002.fm.intel.com with ESMTP; 20 Feb 2019 01:48:56 -0800 To: Hao Wu , edk2-devel@lists.01.org Cc: Jian J Wang , Eric Dong References: <20190215062338.19412-1-hao.a.wu@intel.com> <20190215062338.19412-9-hao.a.wu@intel.com> From: "Ni, Ray" Message-ID: <24514e3e-4fe6-3ea9-ad32-ca2648052786@Intel.com> Date: Wed, 20 Feb 2019 17:51:35 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.0 MIME-Version: 1.0 In-Reply-To: <20190215062338.19412-9-hao.a.wu@intel.com> Subject: Re: [PATCH v5 08/13] MdeModulePkg/AhciPei: Add AHCI mode ATA device support in PEI 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: Wed, 20 Feb 2019 09:48:58 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit > + // > + // Check validity of the device path of the ATA AHCI controller. > + // > + Status = AhciCheckHcDevicePath (DevicePath, DevicePathLength); 1. Please avoid using "Check". > + if (EFI_ERROR (Status)) { > + DEBUG (( > + DEBUG_ERROR, "%a: The device path is invalid for Controller %d.\n", > + __FUNCTION__, Controller > + )); > + Controller++; > + continue; > + } > + 2. Please add more comments here. > + if (BootMode == BOOT_ON_S3_RESUME) { > + NumberOfPorts = AhciS3GetEumeratePorts (DevicePath, DevicePathLength, &PortBitMap); > + if (NumberOfPorts == 0) { > + // > + // No ports need to be enumerated for this controller. > + // > + Controller++; > + continue; > + } > + } else { > + PortBitMap = MAX_UINT32; > + } > + > + // With the above comments addressed, Reviewed-by: Ray Ni -- Thanks, Ray