From nobody Mon Feb 9 00:30:38 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+76204+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+76204+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1623154402; cv=none; d=zohomail.com; s=zohoarc; b=JCoIHIIKtV0IodOKGU5DfcGG/szqegvOYEz7Dm/BLEQkwwZ3BouypVANDtyyRSqm1tlYV4g03GtyaUhuSDXNFhKR27MAwfXXnjOfic+G+gbV4y3IyNbX3C2cpM329v9oCtWvo0Q9h63mv0qIfOo4o7VHx6AAvhaEhJAtJMGM/Xo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623154402; 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=K69wt3lOPUKh8GZmVpkGKoSyl4Q9U4clfwM/RpSBvzw=; b=fKbE1jS7kh4zsiAqZc3C3ON/dHrGkgt++p8CVWcYfLHn/DkjuwlbtZ6FnXI7z+Ch2DnhCHCenirkhF2N4kPqWpskYiyXxJMo1NNLGhCnP7Yy/4RcDLNujNP67XobqzBaUJpV8XGpgo+0pvLIzrmqyVFfOZg9lZtzlVarQ9KqNOo= 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+76204+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623154402357654.6025727792309; Tue, 8 Jun 2021 05:13:22 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 85DxYY1788612xj1Qfqbh34y; Tue, 08 Jun 2021 05:13:21 -0700 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web12.11304.1623154396156153725 for ; Tue, 08 Jun 2021 05:13:16 -0700 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-54-0d83fWvCNViteToyYxOXuA-1; Tue, 08 Jun 2021 08:13:14 -0400 X-MC-Unique: 0d83fWvCNViteToyYxOXuA-1 X-Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 210BB107ACC7; Tue, 8 Jun 2021 12:13:13 +0000 (UTC) X-Received: from lacos-laptop-7.usersys.redhat.com (ovpn-113-27.ams2.redhat.com [10.36.113.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB886620DE; Tue, 8 Jun 2021 12:13:11 +0000 (UTC) From: "Laszlo Ersek" To: edk2-devel-groups-io Cc: Jiaxin Wu , Maciej Rabeda , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Siyuan Fu Subject: [edk2-devel] [PUBLIC edk2 PATCH v2 07/10] NetworkPkg/IScsiDxe: reformat IScsiHexToBin() leading comment block Date: Tue, 8 Jun 2021 14:12:56 +0200 Message-Id: <20210608121259.32451-8-lersek@redhat.com> In-Reply-To: <20210608121259.32451-1-lersek@redhat.com> References: <20210608121259.32451-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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,lersek@redhat.com X-Gm-Message-State: JJKx4mtABG2CE2A8VpGbHrphx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623154401; bh=K69wt3lOPUKh8GZmVpkGKoSyl4Q9U4clfwM/RpSBvzw=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=ZSQQzAMgVmXfMHnmpMEIP/ePphXkPO0mOuoQCz75CVGbgaLKIDd11GU8BxV9Dk9RYiK a2HNftB7lT683R9GJsyUnKytDBCpJQiww6NrklyMW7yIBY88GnNt/7XCw9QCWwCbzo1c2 t26owSdly8cbEWHrFPXaTDpzjtNRxxncxa4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" We'll need further return values for IScsiHexToBin() in a subsequent patch; make room for them in the leading comment block of the function. While at it, rewrap the comment block to 80 characters width. No functional changes. Cc: Jiaxin Wu Cc: Maciej Rabeda Cc: Philippe Mathieu-Daud=C3=A9 Cc: Siyuan Fu Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3356 Signed-off-by: Laszlo Ersek Reviewed-by: Maciej Rabeda Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- NetworkPkg/IScsiDxe/IScsiMisc.h | 14 +++++++------- NetworkPkg/IScsiDxe/IScsiMisc.c | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.h b/NetworkPkg/IScsiDxe/IScsiMis= c.h index 231413993b08..28cf408cd5c5 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.h +++ b/NetworkPkg/IScsiDxe/IScsiMisc.h @@ -149,46 +149,46 @@ IScsiAsciiStrToIp ( =20 @retval EFI_SUCCESS The binary data is converted to the hexadec= imal string and the length of the string is updated. @retval EFI_BUFFER_TOO_SMALL The string is too small. @retval EFI_BAD_BUFFER_SIZE BinLength is too large for hex encoding. @retval EFI_INVALID_PARAMETER The IP string is malformatted. =20 **/ EFI_STATUS IScsiBinToHex ( IN UINT8 *BinBuffer, IN UINT32 BinLength, IN OUT CHAR8 *HexStr, IN OUT UINT32 *HexLength ); =20 /** Convert the hexadecimal string into a binary encoded buffer. =20 - @param[in, out] BinBuffer The binary buffer. - @param[in, out] BinLength Length of the binary buffer. - @param[in] HexStr The hexadecimal string. - - @retval EFI_SUCCESS The hexadecimal string is converted into a = binary - encoded buffer. - @retval EFI_BUFFER_TOO_SMALL The binary buffer is too small to hold the = converted data. + @param[in, out] BinBuffer The binary buffer. + @param[in, out] BinLength Length of the binary buffer. + @param[in] HexStr The hexadecimal string. =20 + @retval EFI_SUCCESS The hexadecimal string is converted into a + binary encoded buffer. + @retval EFI_BUFFER_TOO_SMALL The binary buffer is too small to hold the + converted data. **/ EFI_STATUS IScsiHexToBin ( IN OUT UINT8 *BinBuffer, IN OUT UINT32 *BinLength, IN CHAR8 *HexStr ); =20 =20 /** Convert the decimal-constant string or hex-constant string into a numeri= cal value. =20 @param[in] Str String in decimal or hex. =20 @return The numerical value. =20 **/ UINTN IScsiNetNtoi ( diff --git a/NetworkPkg/IScsiDxe/IScsiMisc.c b/NetworkPkg/IScsiDxe/IScsiMis= c.c index 42988e15cb06..014700e87a5f 100644 --- a/NetworkPkg/IScsiDxe/IScsiMisc.c +++ b/NetworkPkg/IScsiDxe/IScsiMisc.c @@ -354,46 +354,46 @@ IScsiBinToHex ( // Prefix for Hex String. // HexStr[0] =3D '0'; HexStr[1] =3D 'x'; =20 for (Index =3D 0; Index < BinLength; Index++) { HexStr[Index * 2 + 2] =3D IScsiHexString[BinBuffer[Index] >> 4]; HexStr[Index * 2 + 3] =3D IScsiHexString[BinBuffer[Index] & 0xf]; } =20 HexStr[Index * 2 + 2] =3D '\0'; =20 return EFI_SUCCESS; } =20 =20 /** Convert the hexadecimal string into a binary encoded buffer. =20 - @param[in, out] BinBuffer The binary buffer. - @param[in, out] BinLength Length of the binary buffer. - @param[in] HexStr The hexadecimal string. - - @retval EFI_SUCCESS The hexadecimal string is converted into a = binary - encoded buffer. - @retval EFI_BUFFER_TOO_SMALL The binary buffer is too small to hold the = converted data. + @param[in, out] BinBuffer The binary buffer. + @param[in, out] BinLength Length of the binary buffer. + @param[in] HexStr The hexadecimal string. =20 + @retval EFI_SUCCESS The hexadecimal string is converted into a + binary encoded buffer. + @retval EFI_BUFFER_TOO_SMALL The binary buffer is too small to hold the + converted data. **/ EFI_STATUS IScsiHexToBin ( IN OUT UINT8 *BinBuffer, IN OUT UINT32 *BinLength, IN CHAR8 *HexStr ) { UINTN Index; UINTN Length; UINT8 Digit; CHAR8 TemStr[2]; =20 ZeroMem (TemStr, sizeof (TemStr)); =20 // // Find out how many hex characters the string has. // if ((HexStr[0] =3D=3D '0') && ((HexStr[1] =3D=3D 'x') || (HexStr[1] =3D= =3D 'X'))) { --=20 2.19.1.3.g30247aa5d201 -=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 (#76204): https://edk2.groups.io/g/devel/message/76204 Mute This Topic: https://groups.io/mt/83394115/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-