From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 9FCA97803CD for ; Mon, 18 Dec 2023 04:27:19 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=5LFZ1oL/fUp8a+RYpX3jx62QRhcW2iTa3DqcaBF9ElA=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20140610; t=1702873638; v=1; b=ObFA9YkUaOtVx/WqL4pPgP+8+Z3km8AQ/T7IYCzjHSD613M9pZiPuu73k/eGjAc6ynsW6LOm 30KCWYTgqdbGTuz+8KRRUYZ4YGT3gwP9B5mNoVd1Rs+xE3LNQf/GFlX9tYzBqifjXIhwcXfbi7w 4QVUT0JFu/U+fcWTtxmUuQZU= X-Received: by 127.0.0.2 with SMTP id GAb9YY7687511xaFntYnZOYH; Sun, 17 Dec 2023 20:27:18 -0800 X-Received: from NAM10-DM6-obe.outbound.protection.outlook.com (NAM10-DM6-obe.outbound.protection.outlook.com [40.107.93.44]) by mx.groups.io with SMTP id smtpd.web10.35323.1702873637649713353 for ; Sun, 17 Dec 2023 20:27:17 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ljBaiNytV9HF9qQ7HgD9EevovyVhQeBfYCGCh6BLD24SmcjPEOqjJM+kPc1hCzGEJzqGavHxKpm4GLoVQ2fw9n/TgXSppbhrnub9ego5ZfvHDR/R7R/5CU9995zd9qK6/4oYefKGBapX6MpeBC6UBhXXBx16tWvzu6bU/3FrLplDiUfAYgmbTMJakaCuBk9koK9nWacY5ks/Ub299zOE5comjvM4u3eOkayjk8ldU5bHaVWTsKcV4o7/RuY8uIH/w4UemiDm+pzasGr6+S1kXNeE2MnPq7eOt+mSHBA/lVe/B5r6W4D/RXSa7DYMxlEbFlRWsb58zY2T7DD28S9PFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=icdf3C1wd0T+uV/JZ9zzJ4sbze3cFxM/x5hAXuOS6aI=; b=dJF3GxngrpabJo2k6f/fkYorikwrx2qemu6yezgjjokAjXfmUPzjhFMqVr5iGqhCc6foqht2158mD+DP9IN5rUNpe/bHfxhu9VYSl/B84JnT3r9Xu3ZP9VQjdwR1OsVy8upFGAmfQsn9GcdA5cC2V5/jMyPfJupZC1p8Ai8fiEXVwCjIq6vrf3NBRr7oxtbUq0opoMfssY8fnPoFSCKwOT94fe3DB3D7Vsnh4kcSqHYJqB8nx9OFA/44sICanOYbiD9GiGhYEgfXEoiJ2+CNkzRwZarylqebNgZ2ROMMrZpbKTHnh+kFeb7Yj9OEbzTxs2anbuGS+nP5hVHnJIuR+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none X-Received: from MN2PR12MB3966.namprd12.prod.outlook.com (2603:10b6:208:165::18) by SN7PR12MB7178.namprd12.prod.outlook.com (2603:10b6:806:2a6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7091.37; Mon, 18 Dec 2023 04:27:13 +0000 X-Received: from MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::91d9:e679:32a3:dd05]) by MN2PR12MB3966.namprd12.prod.outlook.com ([fe80::91d9:e679:32a3:dd05%5]) with mapi id 15.20.7091.034; Mon, 18 Dec 2023 04:27:13 +0000 From: "Chang, Abner via groups.io" To: Mike Maslenkin , "devel@edk2.groups.io" CC: "nicklew@nvidia.com" , "igork@ami.com" , Pedro Falcato Subject: Re: [edk2-devel] [PATCH v2 11/14] RedfishDiscoverDxe: refine InitInformationData(), remove unnecessary casts Thread-Topic: [PATCH v2 11/14] RedfishDiscoverDxe: refine InitInformationData(), remove unnecessary casts Thread-Index: AQHaLuTKhyzuKYWmB0qWoPlL7U61pbCudv7Q Date: Mon, 18 Dec 2023 04:27:13 +0000 Message-ID: References: <20231214232458.4636-1-mike.maslenkin@gmail.com> <20231214232458.4636-12-mike.maslenkin@gmail.com> In-Reply-To: <20231214232458.4636-12-mike.maslenkin@gmail.com> Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ActionId=6cdfcd26-72de-4b5d-9e40-5d68e64bc5bd;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_ContentBits=0;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Enabled=true;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Method=Standard;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_Name=General;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SetDate=2023-12-18T04:26:37Z;MSIP_Label_4342314e-0df4-4b58-84bf-38bed6170a0f_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MN2PR12MB3966:EE_|SN7PR12MB7178:EE_ x-ms-office365-filtering-correlation-id: 3b2d7bdf-45a8-49d8-0508-08dbff819c21 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam-message-info: PirarC2/VjNw8b9RAptecmEI5F/XgiiW1pepuy4Ts2Kgt0aCyPv+T7Xbhy6/eTb6MVeHidlqPD5xXVpKufRHFa4yReCDtsmeMbSjnGV3RIqL3M8+daYC72do0RNOzxu9Ohwd0pIqhLPGVmBUoIEOZeChkZmIQcPzkH+k1zaHp6XMf/1jh8ewzxwoa48v6H/VmJIEE1yZJa1KReKh5GpeuG4DhETQ3i4uc1hr/aXCOk/74+lLtCo4VGO39NF1YdZIfjgkrba6IaEuyFWamxm74pR0Yb6xOYc9YV+0AhW1yUMJ0PC1D+FDEZIk7ppVPb4O5J0f15ITErSDAbEHImD2PF+RAR/sKGyh/g3jbEObtXN9KosOdIUgY7FHM066jLvfk+XKpCe0+h2x3H0ceERjWL9um9/8slGPbHmLWOURdKMJFaNrMa95kKqLTmdrEbVrPx91yY2w5OUdA2Zos4LUSEWwcAXUD2A4cr8GXt+LUzcSlK70E2jH8dFS89ftRG/wAFpf4jKWu7pa3sMDpJunPRjfDrNLgsoUeXk7d0qL89QPBvjWJGzPRuRO6LBzGOeUhTaLvBogDY+wb5xyYVnJrdKQRdfWZcB2uFV4OhIhpAUq2GgZTsQOcq6jJ/EFNEnhYzI7WUuFQb7ToWJpUJxOmXkecGUjQdcDAjKw0g9dnTg= x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gZ9IqQRmdODsN3k7f731ksf0WirMRpygokJcJswR6TnQNx0WZtjlX9KASH7X?= =?us-ascii?Q?COMAN90ewv4NjG3CSE8n3QcLlSpAq631BK6DZ+v4PboKIgVLfOcsNYJ8Er36?= =?us-ascii?Q?tYnD1Kiu/h7l0DV2JVOoVSOJ62aPuWW8+X8lzEDPmHPh0ecfyc/zO21BjAS1?= =?us-ascii?Q?NWxSMo7OcS5l+MJytALvFKqcQbv2mGhb9AgHJR8aqy+H7+p4GybVAwwcO5kW?= =?us-ascii?Q?MsHxeeSbdJQyyXfl2QesdH2Tgvf/1eI4JoB7gU7CuOkaiS/XhC3fmh7kXB1d?= =?us-ascii?Q?m19FBG+FxwrYNa9AemOicjAyB0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ascii?Q?BKoBeFQOM5EbTsccdwBu3Nejr+FRGb0otBdrtojL/mhfJgRBGM2IzfyRNbm2?= =?us-ascii?Q?T9aup3dEspIEL8gwU/zwcjEXi0+1ZGcmX9Ni2kOKDyqoTwilHm3WB+1oyuXu?= =?us-ascii?Q?ECi0AxnmLn9Z8pcDjN+HCqKYqoPc4A2RG+B0A7IOy3wc3Dw22sgI3U23KsKs?= =?us-ascii?Q?qE6RIaSXKp15B1WXB9k8CvpgpkjXuPP1HqjbD8XDqU0n91PLDithVaJGPI65?= =?us-ascii?Q?v7xQ0otkY01ZSqmasolcoFsRMnpLJ8AomW+TGYq8+NyWtyPG8A+Wuv2eOqvh?= =?us-ascii?Q?OgXxNt92pZHKJhBoQlpDpfkoXiH8Ro/S+jnU8PmkH0izj+wG5Algi329SKys?= =?us-ascii?Q?uKUDHhwXYv2YUksr2JQSMnVgLNx0+BGTUbUNGUF0?= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3966.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3b2d7bdf-45a8-49d8-0508-08dbff819c21 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Dec 2023 04:27:13.8293 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: ondlvw7VQVjmGp6Cvt5AUw7I/uOxedceIo4Jc89ji2PBotGrh9BkKv4Rub94BrLwpS6akiqrbS+P4koPWtJDsg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7178 Precedence: Bulk 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,abner.chang@amd.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: ZvhtcRxjZXjlsJLsiNqFVPW1x7686176AA= Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=ObFA9YkU; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}"); dmarc=none; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io [AMD Official Use Only - General] After addressing comment on 10/14, Reviewed-by: Abner Chang > -----Original Message----- > From: Mike Maslenkin > Sent: Friday, December 15, 2023 7:25 AM > To: devel@edk2.groups.io > Cc: Chang, Abner ; nicklew@nvidia.com; > igork@ami.com; Mike Maslenkin ; Pedro Falcato > > Subject: [PATCH v2 11/14] RedfishDiscoverDxe: refine InitInformationData(= ), > remove unnecessary casts > > Caution: This message originated from an External Source. Use proper caut= ion > when opening attachments, clicking links, or responding. > > > Cc: Abner Chang > Cc: Nickle Wang > Cc: Igor Kulchytskyy > Cc: Pedro Falcato > Signed-off-by: Mike Maslenkin > --- > .../RedfishDiscoverDxe/RedfishDiscoverDxe.c | 36 +++++++++---------- > 1 file changed, 18 insertions(+), 18 deletions(-) > > diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c > b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c > index 724aa35431a8..e3fc2d809dbc 100644 > --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c > +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c > @@ -730,12 +730,12 @@ VOID > InitInformationData ( > > IN EFI_REDFISH_DISCOVERED_INFORMATION *Information, > > IN UINTN *RedfishVersion OPTIONAL, > > - IN CHAR8 *RedfishLocation OPTIONAL, > > - IN CHAR8 *Uuid OPTIONAL, > > - IN CHAR8 *Os OPTIONAL, > > - IN CHAR8 *OsVer OPTIONAL, > > - IN CHAR8 *Product OPTIONAL, > > - IN CHAR8 *ProductVer OPTIONAL > > + IN CONST CHAR8 *RedfishLocation OPTIONAL, > > + IN CONST CHAR8 *Uuid OPTIONAL, > > + IN CONST CHAR8 *Os OPTIONAL, > > + IN CONST CHAR8 *OsVer OPTIONAL, > > + IN CONST CHAR8 *Product OPTIONAL, > > + IN CONST CHAR8 *ProductVer OPTIONAL > > ) > > { > > if (RedfishVersion !=3D NULL) { > > @@ -744,33 +744,33 @@ InitInformationData ( > } > > > > if (RedfishLocation !=3D NULL) { > > - Information->Location =3D (CHAR16 *)AllocatePool (AsciiStrSize ((con= st > CHAR8 *)RedfishLocation) * sizeof (CHAR16)); > > - AsciiStrToUnicodeStrS ((const CHAR8 *)RedfishLocation, Information- > >Location, AsciiStrSize ((const CHAR8 *)RedfishLocation) * sizeof (CHAR16= )); > > + Information->Location =3D AllocatePool (AsciiStrSize (RedfishLocatio= n) * > sizeof (CHAR16)); > > + AsciiStrToUnicodeStrS (RedfishLocation, Information->Location, > AsciiStrSize (RedfishLocation) * sizeof (CHAR16)); > > DEBUG ((DEBUG_MANAGEABILITY, "Redfish service location: %s.\n", > Information->Location)); > > } > > > > if (Uuid !=3D NULL) { > > - Information->Uuid =3D (CHAR16 *)AllocatePool (AsciiStrSize ((const C= HAR8 > *)Uuid) * sizeof (CHAR16)); > > - AsciiStrToUnicodeStrS ((const CHAR8 *)Uuid, Information->Uuid, > AsciiStrSize ((const CHAR8 *)Uuid) * sizeof (CHAR16)); > > + Information->Uuid =3D AllocatePool (AsciiStrSize (Uuid) * sizeof (CH= AR16)); > > + AsciiStrToUnicodeStrS (Uuid, Information->Uuid, AsciiStrSize (Uuid) = * > sizeof (CHAR16)); > > DEBUG ((DEBUG_MANAGEABILITY, "Service UUID: %s.\n", Information- > >Uuid)); > > } > > > > if (Os !=3D NULL) { > > - Information->Os =3D (CHAR16 *)AllocatePool (AsciiStrSize ((const CHA= R8 > *)Os) * sizeof (CHAR16)); > > - AsciiStrToUnicodeStrS ((const CHAR8 *)Os, Information->Os, AsciiStrS= ize > ((const CHAR8 *)Os) * sizeof (CHAR16)); > > + Information->Os =3D AllocatePool (AsciiStrSize (Os) * sizeof (CHAR16= )); > > + AsciiStrToUnicodeStrS (Os, Information->Os, AsciiStrSize (Os) * size= of > (CHAR16)); > > DEBUG ((DEBUG_MANAGEABILITY, "Redfish service OS: %s, Version:%s.\n"= , > Information->Os, Information->OsVersion)); > > } > > > > if (OsVer !=3D NULL) { > > - Information->OsVersion =3D (CHAR16 *)AllocatePool (AsciiStrSize ((co= nst > CHAR8 *)OsVer) * sizeof (CHAR16)); > > - AsciiStrToUnicodeStrS ((const CHAR8 *)OsVer, Information->OsVersion, > AsciiStrSize ((const CHAR8 *)OsVer) * sizeof (CHAR16)); > > + Information->OsVersion =3D AllocatePool (AsciiStrSize (OsVer) * size= of > (CHAR16)); > > + AsciiStrToUnicodeStrS (OsVer, Information->OsVersion, AsciiStrSize (= OsVer) > * sizeof (CHAR16)); > > } > > > > if ((Product !=3D NULL) && (ProductVer !=3D NULL)) { > > - Information->Product =3D (CHAR16 *)AllocatePool (AsciiStrSize ((cons= t > CHAR8 *)Product) * sizeof (CHAR16)); > > - AsciiStrToUnicodeStrS ((const CHAR8 *)Product, Information->Product, > AsciiStrSize ((const CHAR8 *)Product) * sizeof (CHAR16)); > > - Information->ProductVer =3D (CHAR16 *)AllocatePool (AsciiStrSize ((c= onst > CHAR8 *)ProductVer) * sizeof (CHAR16)); > > - AsciiStrToUnicodeStrS ((const CHAR8 *)ProductVer, Information- > >ProductVer, AsciiStrSize ((const CHAR8 *)ProductVer) * sizeof (CHAR16)); > > + Information->Product =3D AllocatePool (AsciiStrSize (Product) * size= of > (CHAR16)); > > + AsciiStrToUnicodeStrS (Product, Information->Product, AsciiStrSize > (Product) * sizeof (CHAR16)); > > + Information->ProductVer =3D AllocatePool (AsciiStrSize (ProductVer) = * sizeof > (CHAR16)); > > + AsciiStrToUnicodeStrS (ProductVer, Information->ProductVer, AsciiStr= Size > (ProductVer) * sizeof (CHAR16)); > > DEBUG ((DEBUG_MANAGEABILITY, "Redfish service product: %s, > Version:%s.\n", Information->Product, Information->ProductVer)); > > } > > } > > -- > 2.32.0 (Apple Git-132) -=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 (#112629): https://edk2.groups.io/g/devel/message/112629 Mute This Topic: https://groups.io/mt/103181047/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-