From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::141; helo=mail-it1-x141.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it1-x141.google.com (mail-it1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (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 866A42194D3AE for ; Tue, 4 Dec 2018 06:56:08 -0800 (PST) Received: by mail-it1-x141.google.com with SMTP id i7so15771456iti.2 for ; Tue, 04 Dec 2018 06:56:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=5Lw/Kth8+/ff+mzx4p+S/ThVe+1E/QIPcE49HOYGZlQ=; b=GMWwQnram3oUrqZz/MSeaRyISs47CtV49Oa6HpBiXMg13yalEg+TxP7AYKN9p0dO5F N0w1Zya2uXoDA5r29IHJ42AGskXnLGDusI7VEKqN4stskpGrtJXYZK6lte6XE6shuSdn wABGn68ajLqC6qsxMVDjZ3YbAF1hHmzaaBqk8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5Lw/Kth8+/ff+mzx4p+S/ThVe+1E/QIPcE49HOYGZlQ=; b=HbAsjAR+SHYzXNuwU8IHGS34nCZkBfDB1DSBJ/yBxeydcTd0JX9CB5iNMrzmF1hy8A Cq2NWAF4z2zdUMKunca/i4Vn2Ftw6P03ySSIyv0WGpnSbhRuymPyjNy8PIj64/e5EMKI ogawOEn0L1/qDQNoDuirIeAABS1HokV4cyuos8eXaN/B3ITuCY3Q9IVyiloRO3HfZcyd Qo2o8pXMWI3L4+Xj1kLp+O1UOeOkQNsoKYe+nByn9BYwK+7a+vqaJ/DyFAoidAFeCfrJ 0c2mMmjgzQFWO0fv0qpD16MyLKXP7TXER2gZCrxgoMuYYpRlsy6t7rm7+buTkgFWh0OO +Rmg== X-Gm-Message-State: AA+aEWY3z1dcKFb0mqf56FYbMVSxcRUK5dOVK8LIy1xgBn9icfU4IK/C pUngUl0SNAD7gv/q83G5aw7Qk6QXMyhEK0xolUKJZlreYpA= X-Google-Smtp-Source: AFSGD/XeiQqPOtBvKvJWcnFXcYEMBNO5kjD8NdfZEZr504M3BHWFWqnbCBpU4+CC8aainHqkLHUYum8fAkzVuLLg5sw= X-Received: by 2002:a24:edc4:: with SMTP id r187mr12914007ith.158.1543935367548; Tue, 04 Dec 2018 06:56:07 -0800 (PST) MIME-Version: 1.0 References: <1543923378-16820-1-git-send-email-chandni.cherukuri@arm.com> <1543923378-16820-2-git-send-email-chandni.cherukuri@arm.com> In-Reply-To: <1543923378-16820-2-git-send-email-chandni.cherukuri@arm.com> From: Ard Biesheuvel Date: Tue, 4 Dec 2018 15:55:54 +0100 Message-ID: To: Chandni Cherukuri Cc: "edk2-devel@lists.01.org" , Leif Lindholm Subject: Re: [PATCH edk2-platforms 1/2] Platform/ARM/Sgi: fix incorrect check of config-id value 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: Tue, 04 Dec 2018 14:56:08 -0000 Content-Type: text/plain; charset="UTF-8" On Tue, 4 Dec 2018 at 12:36, Chandni Cherukuri wrote: > > On SGI platform, the value of configuration ID can be zero. > So avoid returning an error from the function that creates > the system ID HOB in case the value of the configuration ID > is zero. > > While at it, improve some of the error messages as well. > So the platform ID is still guaranteed to be non-zero? > Cc: Ard Biesheuvel > Cc: Leif Lindholm > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Chandni Cherukuri > --- > Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c > index 15ea571..065b23d 100644 > --- a/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c > +++ b/Platform/ARM/SgiPkg/Library/SgiPlatformPei/SgiPlatformPeim.c > @@ -67,7 +67,7 @@ GetSgiSystemId ( > > Property = fdt_getprop (HwCfgDtBlob, Offset, "platform-id", NULL); > if (Property == NULL) { > - DEBUG ((DEBUG_ERROR, "Platform Id is NULL\n")); > + DEBUG ((DEBUG_ERROR, "platform-id property not found\n")); > return EFI_INVALID_PARAMETER; > } > > @@ -75,7 +75,7 @@ GetSgiSystemId ( > > Property = fdt_getprop (HwCfgDtBlob, Offset, "config-id", NULL); > if (Property == NULL) { > - DEBUG ((DEBUG_ERROR, "Config Id is NULL\n")); > + DEBUG ((DEBUG_ERROR, "config-id property not found\n")); > return EFI_INVALID_PARAMETER; > } > > @@ -121,7 +121,7 @@ SgiPlatformPeim ( > return EFI_INVALID_PARAMETER; > } > > - if (HobData->PlatformId == 0 || HobData->ConfigId == 0) { > + if (HobData->PlatformId == 0) { > ASSERT (FALSE); > return EFI_INVALID_PARAMETER; > } > -- > 2.7.4 >