From nobody Mon Feb 9 21:22:10 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+91648+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91648+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1658424090; cv=none; d=zohomail.com; s=zohoarc; b=hT86hxQ05+eZvYpRIi9mdL4xymZkVQXDYaTXj6f3dIDVCc5J8vbSSagX2nj/vbocHclXuwba7CwsbopPqWo0gn3Jubn1+gVuSUKueqieyb5ozGieqUG83i3u1kHYcPvN8xsBQc7GRYaWes1vnmOT54owOOkq5WJgfBAPC5SelWk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658424090; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=p1Xi74QoM9mOv/2VHxKRoanjFUYhBo7tF8lU5mrF7pM=; b=DkQ6ZUgPpFE0IgHj7YWYHl/DlWypn4M9YDuAQvPLfZvPuUk9tMuh7Dc4r5WQonXfKUJl2nicnXWyJE4tin/o7YTgJrF6UNwq709e2510/kedPhm02rcmKJLyWvu9Syr23tQa5OugNT1R/YqGOlNY+P6UqIaXLLCvfz9vEv57/tE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+91648+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1658424090650242.09062206279873; Thu, 21 Jul 2022 10:21:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id x3RdYY1788612xbQQrrorWPh; Thu, 21 Jul 2022 10:21:30 -0700 X-Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by mx.groups.io with SMTP id smtpd.web09.39655.1658232636804486424 for ; Tue, 19 Jul 2022 05:10:37 -0700 X-Received: by mail-lf1-f45.google.com with SMTP id u13so24426607lfn.5 for ; Tue, 19 Jul 2022 05:10:36 -0700 (PDT) X-Gm-Message-State: XmQvIIe8B8WiYhyI0dXTaXiyx1787277AA= X-Google-Smtp-Source: AGRyM1sYv+L7HxIfYd5aRnZUG1wmjuUGCCBfRVMD1mt0VkaLq0LK8OzGhwpSBdbCsUTiRSoRGZsUXQ== X-Received: by 2002:a05:6512:3c8c:b0:489:e80f:ea33 with SMTP id h12-20020a0565123c8c00b00489e80fea33mr16307833lfv.347.1658232634766; Tue, 19 Jul 2022 05:10:34 -0700 (PDT) X-Received: from localhost.localdomain ([207.180.219.167]) by smtp.gmail.com with ESMTPSA id z20-20020a2eb534000000b0025d6ecbc897sm2668245ljm.46.2022.07.19.05.10.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Jul 2022 05:10:34 -0700 (PDT) From: "Savva Mitrofanov" To: devel@edk2.groups.io Cc: =?UTF-8?q?Marvin=20H=C3=A4user?= , Pedro Falcato , Vitaly Cheptsov Subject: [edk2-devel] [edk2-platforms][PATCH 02/10] Ext4Pkg: Change HoleLen type to UINT64 Date: Tue, 19 Jul 2022 18:10:08 +0600 Message-Id: <20220719121016.29380-3-savvamtr@gmail.com> In-Reply-To: <20220719121016.29380-1-savvamtr@gmail.com> References: <20220719121016.29380-1-savvamtr@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,savvamtr@gmail.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1658424090; bh=TNFaRQrmpdrb30bhJxy+DUALiISa0d5XzJCaEDW8Dq4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=u1w4RSg7j26EQRSg1g/dmv7y08GQdjfXwfPZm1IHIQKePzOrvTIIYEgaYcoGeD6Dv9c 83Ug40lWi4TD2rkJOpYqc3Ir8uHVxBNkZatzdeBHNCMlBj2PVYok3Y6nDKp9vsoFih8+V ZvOpwJsT9aSWn/gShK2K/zbsqaWJ75AChME= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1658424091423100002 Content-Type: text/plain; charset="utf-8" Set HoleLen to UINT64 to perform safe cast to UINTN in ternary operator at WasRead assignment Cc: Marvin H=C3=A4user Cc: Pedro Falcato Cc: Vitaly Cheptsov Signed-off-by: Savva Mitrofanov --- Features/Ext4Pkg/Ext4Dxe/Inode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Features/Ext4Pkg/Ext4Dxe/Inode.c b/Features/Ext4Pkg/Ext4Dxe/In= ode.c index 142ee6e3d78a..6416f5388486 100644 --- a/Features/Ext4Pkg/Ext4Dxe/Inode.c +++ b/Features/Ext4Pkg/Ext4Dxe/Inode.c @@ -100,7 +100,7 @@ Ext4Read ( EFI_STATUS Status; BOOLEAN HasBackingExtent; UINT32 HoleOff; - UINTN HoleLen; + UINT64 HoleLen; UINT64 ExtentStartBytes; UINT64 ExtentLengthBytes; UINT64 ExtentLogicalBytes; @@ -155,7 +155,7 @@ Ext4Read ( HoleLen =3D (Ext4GetExtentLength (&Extent) * Partition->BlockSize)= - HoleOff; } =20 - WasRead =3D HoleLen > RemainingRead ? RemainingRead : HoleLen; + WasRead =3D HoleLen > RemainingRead ? RemainingRead : (UINTN) HoleLe= n; // Potential improvement: In the future, we could get the file hole'= s total // size and memset all that ZeroMem (Buffer, WasRead); --=20 2.37.0 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#91648): https://edk2.groups.io/g/devel/message/91648 Mute This Topic: https://groups.io/mt/92531464/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-