Re: [edk2] [PATCH edk2-staging 11/19] IntelUndiPkg/GigUndiDxe: fix incorrect use of CPP token pasting

2019-01-30 Thread Ryszard Knop
Reviewed-by: Ryszard Knop 

On Tue, 2018-11-06 at 18:58 +0100, ard.biesheuvela wrote:
> The ## CPP token pasting operator is used to paste *tokens*, which
> is not the same thing as pasting arbitrary macro arguments. Since a
> token cannot contain . or ) characters in the first place, using
> the ## operator here is wrong and unnecessary, so just remove it.
> 
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Ard Biesheuvel 
> ---
>  IntelUndiPkg/GigUndiDxe/NVDataStruc.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/IntelUndiPkg/GigUndiDxe/NVDataStruc.h
> b/IntelUndiPkg/GigUndiDxe/NVDataStruc.h
> index 72f6a95ccb6d..04f08b41c842 100644
> --- a/IntelUndiPkg/GigUndiDxe/NVDataStruc.h
> +++ b/IntelUndiPkg/GigUndiDxe/NVDataStruc.h
> @@ -112,7 +112,7 @@ typedef struct {
>  
> @return   Width of given field is returned
>  **/
> -#define UNDI_CONFIG_WIDTH(Field) sizeof (UndiPrivateData-
> >Configuration. ## Field ## )
> +#define UNDI_CONFIG_WIDTH(Field) sizeof (UndiPrivateData-
> >Configuration.Field)
>  
>  // General parameters
>  #define QUESTION_ID_EFI_DRIVER_VER  0x11
> 00

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [PATCH edk2-staging 11/19] IntelUndiPkg/GigUndiDxe: fix incorrect use of CPP token pasting

2018-11-06 Thread Ard Biesheuvel
The ## CPP token pasting operator is used to paste *tokens*, which
is not the same thing as pasting arbitrary macro arguments. Since a
token cannot contain . or ) characters in the first place, using
the ## operator here is wrong and unnecessary, so just remove it.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel 
---
 IntelUndiPkg/GigUndiDxe/NVDataStruc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/IntelUndiPkg/GigUndiDxe/NVDataStruc.h 
b/IntelUndiPkg/GigUndiDxe/NVDataStruc.h
index 72f6a95ccb6d..04f08b41c842 100644
--- a/IntelUndiPkg/GigUndiDxe/NVDataStruc.h
+++ b/IntelUndiPkg/GigUndiDxe/NVDataStruc.h
@@ -112,7 +112,7 @@ typedef struct {
 
@return   Width of given field is returned
 **/
-#define UNDI_CONFIG_WIDTH(Field) sizeof (UndiPrivateData->Configuration. ## 
Field ## )
+#define UNDI_CONFIG_WIDTH(Field) sizeof (UndiPrivateData->Configuration.Field)
 
 // General parameters
 #define QUESTION_ID_EFI_DRIVER_VER  0x1100
-- 
2.19.1

___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel