From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) by mx.groups.io with SMTP id smtpd.web08.4681.1611730331987510678 for ; Tue, 26 Jan 2021 22:52:12 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@puresoftware.com header.s=google header.b=n0YpxRIL; spf=pass (domain: puresoftware.com, ip: 209.85.167.171, mailfrom: vikas.singh@puresoftware.com) Received: by mail-oi1-f171.google.com with SMTP id w8so1160789oie.2 for ; Tue, 26 Jan 2021 22:52:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=puresoftware.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TKdE1GKNeu5At8Fp/ltYkLpQzrqA7gk17CijA0R1wAw=; b=n0YpxRIL2p/hlc++KO20X3GVughRI51MofklzCnX33q9kMY7KSLuszlULfrow920SV kpMiWvTRGVD9PI5od3mpu3AbGFSDoqJUUOyI7TrCbVyDnC0g5SAVnM659bASSkxUHtir jfArvG2pO0mvNXuoBvNWBOOkMN9nMY3HRI+Cc= 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=TKdE1GKNeu5At8Fp/ltYkLpQzrqA7gk17CijA0R1wAw=; b=FJXH1EGLDen5wf8cqfNGpK6r29GB3s+ySp7T/7feAzLS6ta+oMK7AeA1PhAVH2tz4T JDWpyihTlO/ByVX6q2Q2FmKsTXv+MY/BH1tGrJrZ3OhRXwxTu8P3T9fs0T3c/9WwIhNT Jm77AwByoC7KbqhzbP3aoaRE9zVMknpxqyMABh0wzhRzeGuPlphvjOMixA14yipOHZaV MuylZWmY96noTHmsYWZK9Y9acr/VuPTZBlexYNX1kJjBsNWqPipKt265OK/N+Q7Lfjxr 1VEfFUaC03Bx/eKlGFgRia4lqZvx6N70lx5lYFFhuMZXVAU+inJmIsdUgvsw34+JAgdU w/zA== X-Gm-Message-State: AOAM5308+YNnl69UFu27hUZ41aNmcLwF2kUzoDaAWHrtHJWsqBMSgdGa QOCh7gclQMKGDl2JxpBrGE+V4WevKikT1HxvsfeKUw== X-Google-Smtp-Source: ABdhPJxjMS1Fvc1YbDhWbVAltKCnru9PHPVZcpbj25iQAmgSdfRX9iWnSmFebErKzUjLNZIPhfvR/uU9ZB/Yl1svu5s= X-Received: by 2002:a54:478c:: with SMTP id o12mr2226137oic.28.1611730331350; Tue, 26 Jan 2021 22:52:11 -0800 (PST) MIME-Version: 1.0 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> <20210126111946.GN1664@vanye> In-Reply-To: <20210126111946.GN1664@vanye> From: "Vikas Singh" Date: Wed, 27 Jan 2021 12:21:46 +0530 Message-ID: Subject: Re: [PATCH v0] Platform/NXP: Add Dynamic Acpi for layerscape platforms To: Leif Lindholm 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 Content-Type: text/plain; charset="UTF-8" On Tue, Jan 26, 2021 at 4:49 PM Leif Lindholm wrote: > > 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 > Leif , I have sent an updated V2 patch series today. FYI. Thnx.