From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f44.google.com (mail-wr1-f44.google.com [209.85.221.44]) by mx.groups.io with SMTP id smtpd.web12.10750.1611659990146754524 for ; Tue, 26 Jan 2021 03:19:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@nuviainc-com.20150623.gappssmtp.com header.s=20150623 header.b=bxCDOdI1; spf=pass (domain: nuviainc.com, ip: 209.85.221.44, mailfrom: leif@nuviainc.com) Received: by mail-wr1-f44.google.com with SMTP id p15so9364192wrq.8 for ; Tue, 26 Jan 2021 03:19:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuviainc-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QjhVTQXapPaXkmimSHr89H7PXF9tZ2MHfaC3wxeN7kA=; b=bxCDOdI1vLMy7iOzNnlltk7opouFLqzjYK1BvsT85x/W8iexXpAM9HAwBUEont5laB sU5VL0CDVpS/rllegykrppiHgcJuh5eZs1J0mxEM63tveeiMHxSbjRcBGEsc37kd5ug/ 7tzBMspOTVOuWeLUCC3CbxWz+JdP2VZk3HPoFftPvtXt0ukstVK0paQPXcg5DVCGKVJ3 3hThEyrmVWimDvMOfjo/pBj3Hhx46iCgHhCRVpQ69s0SNTN764rHY0b47t/DY2kgJXcy nzPzalCIu/VAvZqyy/Lq07P/Zd74mlkA9N5PHn3ntDGeZZ3/3GAteP78JSQxqJUUfZ9U kgNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QjhVTQXapPaXkmimSHr89H7PXF9tZ2MHfaC3wxeN7kA=; b=ejryFNjMT7wpAUK26MzV1z9SF4dGitzeLFNPzIMymHqoHDoxJ/Cph3/vhDnBH7qSGa HDQKBSPFbeBpWxxjt+3cQUGV/lb3gnsUY5CHbc40zOQXj0dvELsTK0sYH9+atX87eGBi f7p8uutMGa6QS2zKZdME4857y7CyH60TCG/t24cHNT2Zq+jmW8FZEZkCADKri08lhgxg M4Y4uCEBxg9Seq54B4ajYDo1vkwEzOK+3EBalc4GWA48FDyPm0FAa9VcwHB+tW35kUJ0 gJrFaN4z06X0bDHO7fadIlN/G/R0Ut4AI4KWd4HlAc34gDsC+75IWMu6f+1nL1JgX195 sahw== X-Gm-Message-State: AOAM530I5CXEwhgoZ4zkC3jYguz/B9Ihj8RAotu3fwUsd39tk3yxZT0b q4oT1ya6rXYu8svOlr1FSZpvsQ== X-Google-Smtp-Source: ABdhPJxN2UUeEMnch3pEuRUUEokgQahKExYj5llrR7NV2+e+8MnY9ISBobIpa33noRK7gjJ8rEbt9w== X-Received: by 2002:a5d:4046:: with SMTP id w6mr5322756wrp.369.1611659988764; Tue, 26 Jan 2021 03:19:48 -0800 (PST) Return-Path: Received: from vanye (cpc1-cmbg19-2-0-cust915.5-4.cable.virginm.net. [82.27.183.148]) by smtp.gmail.com with ESMTPSA id r10sm2783532wmd.15.2021.01.26.03.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 03:19:48 -0800 (PST) Date: Tue, 26 Jan 2021 11:19:46 +0000 From: "Leif Lindholm" To: Vikas Singh Cc: devel@edk2.groups.io, Sami Mujawar , meenakshi.aggarwal@nxp.com, Paul Yang , Augustine Philips , samer.el-haj-mahmoud@arm.com, Varun Sethi , Arokia Samy , Kuldip Dwivedi , ard.biesheuvel@arm.com, Vikas Singh Subject: Re: [PATCH v0] Platform/NXP: Add Dynamic Acpi for layerscape platforms Message-ID: <20210126111946.GN1664@vanye> References: <1609226758-19867-1-git-send-email-vikas.singh@puresoftware.com> <1609226758-19867-2-git-send-email-vikas.singh@puresoftware.com> <20210110032612.GK1664@vanye> <20210118165530.GX1664@vanye> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Vikas, On Tue, Jan 19, 2021 at 10:11:43 +0530, Vikas Singh wrote: > > > > > +/** A helper macro for returning configuration manager objects > > > > > +*/ > > > > > +#define HANDLE_CM_OBJECT(ObjId, CmObjectId, Object, ObjectCount) \ > > > > > + case ObjId: { \ > > > > > + CmObject->ObjectId = CmObjectId; \ > > > > > + CmObject->Size = sizeof (Object); \ > > > > > + CmObject->Data = (VOID*)&Object; \ > > > > > + CmObject->Count = ObjectCount; \ > > > > > + DEBUG (( \ > > > > > + DEBUG_INFO, \ > > > > > + #CmObjectId ": Ptr = 0x%p, Size = %d, Count = %d\n", \ > > > > > + CmObject->Data, \ > > > > > + CmObject->Size, \ > > > > > + CmObject->Count \ > > > > > + )); \ > > > > > + break; \ > > > > > + } > > > > > > > > This is code obfuscation. Please don't invent your own programming > > > > languages. In C, the case, the start bracket, the break and the end > > > > bracket always go inline. > > > > The rest would be better as a static helper function than a macro. > > > > > > > Leif, changes are in accordance with : > > > https://raw.githubusercontent.com/tianocore-docs/Docs/master/Specifications/CCS_2_1_Draft.pdf > > > > Do you mean 5.5.2.1: > > Functional macros are generally discouraged. > > ? > > Leif + Sami, I was referring section 5.7.3.7, since you commented on > switch case & break statement. > However keeping section 5.5.2.1 in consideration, I have done few > changes and shared updated V1 series. > Could you please have a look on it and revert, if in case you have any concerns. I have not seen any update? Please have a look at Sami's updates to the ARM platform code, which I merged yeaterday. Best Regards, Leif