public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH EDK2 v1 0/1] NetworkPkg/DnsDxe: cosmetic fixups
@ 2020-12-04  7:05 wenyi,xie
  2020-12-04  7:05 ` [PATCH EDK2 v1 1/1] " wenyi,xie
  0 siblings, 1 reply; 4+ messages in thread
From: wenyi,xie @ 2020-12-04  7:05 UTC (permalink / raw)
  To: devel, maciej.rabeda, jiaxin.wu, siyuan.fu; +Cc: songdongkuang, xiewenyi2

Main Changes :
add whitespace according to coding style.

Wenyi Xie (1):
  NetworkPkg/DnsDxe: cosmetic fixups

 NetworkPkg/DnsDxe/DnsImpl.h     | 2 +-
 NetworkPkg/DnsDxe/DnsDhcp.c     | 4 ++--
 NetworkPkg/DnsDxe/DnsDriver.c   | 4 ++--
 NetworkPkg/DnsDxe/DnsImpl.c     | 8 ++++----
 NetworkPkg/DnsDxe/DnsProtocol.c | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

-- 
2.20.1.windows.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH EDK2 v1 1/1] NetworkPkg/DnsDxe: cosmetic fixups
  2020-12-04  7:05 [PATCH EDK2 v1 0/1] NetworkPkg/DnsDxe: cosmetic fixups wenyi,xie
@ 2020-12-04  7:05 ` wenyi,xie
  2021-01-05 14:16   ` Maciej Rabeda
       [not found]   ` <16575BAFF098A13A.29174@groups.io>
  0 siblings, 2 replies; 4+ messages in thread
From: wenyi,xie @ 2020-12-04  7:05 UTC (permalink / raw)
  To: devel, maciej.rabeda, jiaxin.wu, siyuan.fu; +Cc: songdongkuang, xiewenyi2

add whitespace according to coding style.

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
---
 NetworkPkg/DnsDxe/DnsImpl.h     | 2 +-
 NetworkPkg/DnsDxe/DnsDhcp.c     | 4 ++--
 NetworkPkg/DnsDxe/DnsDriver.c   | 4 ++--
 NetworkPkg/DnsDxe/DnsImpl.c     | 8 ++++----
 NetworkPkg/DnsDxe/DnsProtocol.c | 4 ++--
 5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/NetworkPkg/DnsDxe/DnsImpl.h b/NetworkPkg/DnsDxe/DnsImpl.h
index 10bc399e9ed5..affbb4be8ded 100644
--- a/NetworkPkg/DnsDxe/DnsImpl.h
+++ b/NetworkPkg/DnsDxe/DnsImpl.h
@@ -125,7 +125,7 @@ typedef struct {
   EFI_DNS6_COMPLETION_TOKEN  *Token;
 } DNS6_TOKEN_ENTRY;
 
-union _DNS_FLAGS{
+union _DNS_FLAGS {
   struct {
     UINT16     RCode:4;
     UINT16     Zero:3;
diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c
index 9ea9d7c8f674..8f8b2aab1e32 100644
--- a/NetworkPkg/DnsDxe/DnsDhcp.c
+++ b/NetworkPkg/DnsDxe/DnsDhcp.c
@@ -131,7 +131,7 @@ ParseDhcp4Ack (
         return EFI_OUT_OF_RESOURCES;
       }
 
-      for(Count=0; Count < ServerCount; Count++){
+      for (Count=0; Count < ServerCount; Count++) {
         CopyMem (ServerList + Count, &OptionList[Index]->Data[4 * Count], sizeof (EFI_IPv4_ADDRESS));
       }
 
@@ -225,7 +225,7 @@ ParseDhcp6Ack (
         return EFI_OUT_OF_RESOURCES;
       }
 
-      for(Count=0; Count < ServerCount; Count++){
+      for (Count=0; Count < ServerCount; Count++) {
         CopyMem (ServerList + Count, &OptionList[Index]->Data[16 * Count], sizeof (EFI_IPv6_ADDRESS));
       }
 
diff --git a/NetworkPkg/DnsDxe/DnsDriver.c b/NetworkPkg/DnsDxe/DnsDriver.c
index f099da8a5a95..4db0c6bdd1eb 100644
--- a/NetworkPkg/DnsDxe/DnsDriver.c
+++ b/NetworkPkg/DnsDxe/DnsDriver.c
@@ -197,11 +197,11 @@ DnsDestroyService (
 {
   UdpIoFreeIo (DnsSb->ConnectUdp);
 
-  if (DnsSb->TimerToGetMap != NULL){
+  if (DnsSb->TimerToGetMap != NULL) {
     gBS->CloseEvent (DnsSb->TimerToGetMap);
   }
 
-  if (DnsSb->Timer != NULL){
+  if (DnsSb->Timer != NULL) {
     gBS->CloseEvent (DnsSb->Timer);
   }
 
diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
index 25628a5704f0..2edcb280ac4d 100644
--- a/NetworkPkg/DnsDxe/DnsImpl.c
+++ b/NetworkPkg/DnsDxe/DnsImpl.c
@@ -799,7 +799,7 @@ UpdateDns4Cache (
         Item->DnsCache.Timeout = DnsCacheEntry.Timeout;
 
         return EFI_SUCCESS;
-      }else {
+      } else {
         return EFI_ACCESS_DENIED;
       }
     }
@@ -897,7 +897,7 @@ UpdateDns6Cache (
         Item->DnsCache.Timeout = DnsCacheEntry.Timeout;
 
         return EFI_SUCCESS;
-      }else {
+      } else {
         return EFI_ACCESS_DENIED;
       }
     }
@@ -1080,7 +1080,7 @@ IsValidDnsResponse (
   NET_LIST_FOR_EACH (Entry, &TokensMap->Used) {
     *Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
     Packet = (NET_BUF *) ((*Item)->Value);
-    if (Packet == NULL){
+    if (Packet == NULL) {
 
       continue;
     } else {
@@ -2127,7 +2127,7 @@ DnsOnTimerRetransmit (
         }
       }
     }
-  }else {
+  } else {
     //
     // Iterate through all the children of the DNS service instance. Time
     // out the packet. If maximum retries reached, clean the Token up.
diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c b/NetworkPkg/DnsDxe/DnsProtocol.c
index 4acc5fca46cf..a0bb58ef1db3 100644
--- a/NetworkPkg/DnsDxe/DnsProtocol.c
+++ b/NetworkPkg/DnsDxe/DnsProtocol.c
@@ -217,7 +217,7 @@ Dns4Configure (
       Dns4InstanceCancelToken(Instance, NULL);
     }
 
-    if (Instance->UdpIo != NULL){
+    if (Instance->UdpIo != NULL) {
       UdpIoCleanIo (Instance->UdpIo);
     }
 
@@ -1061,7 +1061,7 @@ Dns6Configure (
       Dns6InstanceCancelToken(Instance, NULL);
     }
 
-    if (Instance->UdpIo != NULL){
+    if (Instance->UdpIo != NULL) {
       UdpIoCleanIo (Instance->UdpIo);
     }
 
-- 
2.20.1.windows.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH EDK2 v1 1/1] NetworkPkg/DnsDxe: cosmetic fixups
  2020-12-04  7:05 ` [PATCH EDK2 v1 1/1] " wenyi,xie
@ 2021-01-05 14:16   ` Maciej Rabeda
       [not found]   ` <16575BAFF098A13A.29174@groups.io>
  1 sibling, 0 replies; 4+ messages in thread
From: Maciej Rabeda @ 2021-01-05 14:16 UTC (permalink / raw)
  To: Wenyi Xie, devel, jiaxin.wu, siyuan.fu; +Cc: songdongkuang

Thanks for the patch!

Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>

On 04-Dec-20 08:05, Wenyi Xie wrote:
> add whitespace according to coding style.
>
> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
> Cc: Siyuan Fu <siyuan.fu@intel.com>
> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
> ---
>   NetworkPkg/DnsDxe/DnsImpl.h     | 2 +-
>   NetworkPkg/DnsDxe/DnsDhcp.c     | 4 ++--
>   NetworkPkg/DnsDxe/DnsDriver.c   | 4 ++--
>   NetworkPkg/DnsDxe/DnsImpl.c     | 8 ++++----
>   NetworkPkg/DnsDxe/DnsProtocol.c | 4 ++--
>   5 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/NetworkPkg/DnsDxe/DnsImpl.h b/NetworkPkg/DnsDxe/DnsImpl.h
> index 10bc399e9ed5..affbb4be8ded 100644
> --- a/NetworkPkg/DnsDxe/DnsImpl.h
> +++ b/NetworkPkg/DnsDxe/DnsImpl.h
> @@ -125,7 +125,7 @@ typedef struct {
>     EFI_DNS6_COMPLETION_TOKEN  *Token;
>   } DNS6_TOKEN_ENTRY;
>   
> -union _DNS_FLAGS{
> +union _DNS_FLAGS {
>     struct {
>       UINT16     RCode:4;
>       UINT16     Zero:3;
> diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c
> index 9ea9d7c8f674..8f8b2aab1e32 100644
> --- a/NetworkPkg/DnsDxe/DnsDhcp.c
> +++ b/NetworkPkg/DnsDxe/DnsDhcp.c
> @@ -131,7 +131,7 @@ ParseDhcp4Ack (
>           return EFI_OUT_OF_RESOURCES;
>         }
>   
> -      for(Count=0; Count < ServerCount; Count++){
> +      for (Count=0; Count < ServerCount; Count++) {
>           CopyMem (ServerList + Count, &OptionList[Index]->Data[4 * Count], sizeof (EFI_IPv4_ADDRESS));
>         }
>   
> @@ -225,7 +225,7 @@ ParseDhcp6Ack (
>           return EFI_OUT_OF_RESOURCES;
>         }
>   
> -      for(Count=0; Count < ServerCount; Count++){
> +      for (Count=0; Count < ServerCount; Count++) {
>           CopyMem (ServerList + Count, &OptionList[Index]->Data[16 * Count], sizeof (EFI_IPv6_ADDRESS));
>         }
>   
> diff --git a/NetworkPkg/DnsDxe/DnsDriver.c b/NetworkPkg/DnsDxe/DnsDriver.c
> index f099da8a5a95..4db0c6bdd1eb 100644
> --- a/NetworkPkg/DnsDxe/DnsDriver.c
> +++ b/NetworkPkg/DnsDxe/DnsDriver.c
> @@ -197,11 +197,11 @@ DnsDestroyService (
>   {
>     UdpIoFreeIo (DnsSb->ConnectUdp);
>   
> -  if (DnsSb->TimerToGetMap != NULL){
> +  if (DnsSb->TimerToGetMap != NULL) {
>       gBS->CloseEvent (DnsSb->TimerToGetMap);
>     }
>   
> -  if (DnsSb->Timer != NULL){
> +  if (DnsSb->Timer != NULL) {
>       gBS->CloseEvent (DnsSb->Timer);
>     }
>   
> diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
> index 25628a5704f0..2edcb280ac4d 100644
> --- a/NetworkPkg/DnsDxe/DnsImpl.c
> +++ b/NetworkPkg/DnsDxe/DnsImpl.c
> @@ -799,7 +799,7 @@ UpdateDns4Cache (
>           Item->DnsCache.Timeout = DnsCacheEntry.Timeout;
>   
>           return EFI_SUCCESS;
> -      }else {
> +      } else {
>           return EFI_ACCESS_DENIED;
>         }
>       }
> @@ -897,7 +897,7 @@ UpdateDns6Cache (
>           Item->DnsCache.Timeout = DnsCacheEntry.Timeout;
>   
>           return EFI_SUCCESS;
> -      }else {
> +      } else {
>           return EFI_ACCESS_DENIED;
>         }
>       }
> @@ -1080,7 +1080,7 @@ IsValidDnsResponse (
>     NET_LIST_FOR_EACH (Entry, &TokensMap->Used) {
>       *Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
>       Packet = (NET_BUF *) ((*Item)->Value);
> -    if (Packet == NULL){
> +    if (Packet == NULL) {
>   
>         continue;
>       } else {
> @@ -2127,7 +2127,7 @@ DnsOnTimerRetransmit (
>           }
>         }
>       }
> -  }else {
> +  } else {
>       //
>       // Iterate through all the children of the DNS service instance. Time
>       // out the packet. If maximum retries reached, clean the Token up.
> diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c b/NetworkPkg/DnsDxe/DnsProtocol.c
> index 4acc5fca46cf..a0bb58ef1db3 100644
> --- a/NetworkPkg/DnsDxe/DnsProtocol.c
> +++ b/NetworkPkg/DnsDxe/DnsProtocol.c
> @@ -217,7 +217,7 @@ Dns4Configure (
>         Dns4InstanceCancelToken(Instance, NULL);
>       }
>   
> -    if (Instance->UdpIo != NULL){
> +    if (Instance->UdpIo != NULL) {
>         UdpIoCleanIo (Instance->UdpIo);
>       }
>   
> @@ -1061,7 +1061,7 @@ Dns6Configure (
>         Dns6InstanceCancelToken(Instance, NULL);
>       }
>   
> -    if (Instance->UdpIo != NULL){
> +    if (Instance->UdpIo != NULL) {
>         UdpIoCleanIo (Instance->UdpIo);
>       }
>   


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [edk2-devel] [PATCH EDK2 v1 1/1] NetworkPkg/DnsDxe: cosmetic fixups
       [not found]   ` <16575BAFF098A13A.29174@groups.io>
@ 2021-01-05 14:44     ` Maciej Rabeda
  0 siblings, 0 replies; 4+ messages in thread
From: Maciej Rabeda @ 2021-01-05 14:44 UTC (permalink / raw)
  To: Wenyi Xie, devel, jiaxin.wu, siyuan.fu; +Cc: songdongkuang

Patch merged.

Commit: 
https://github.com/tianocore/edk2/commit/4ad1bd63b28ca103eba21e383c4375a3a91080cf
PR: https://github.com/tianocore/edk2/pull/1293

On 05-Jan-21 15:16, Maciej Rabeda wrote:
> Thanks for the patch!
>
> Reviewed-by: Maciej Rabeda <maciej.rabeda@linux.intel.com>
>
> On 04-Dec-20 08:05, Wenyi Xie wrote:
>> add whitespace according to coding style.
>>
>> Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
>> Cc: Jiaxin Wu <jiaxin.wu@intel.com>
>> Cc: Siyuan Fu <siyuan.fu@intel.com>
>> Signed-off-by: Wenyi Xie <xiewenyi2@huawei.com>
>> ---
>>   NetworkPkg/DnsDxe/DnsImpl.h     | 2 +-
>>   NetworkPkg/DnsDxe/DnsDhcp.c     | 4 ++--
>>   NetworkPkg/DnsDxe/DnsDriver.c   | 4 ++--
>>   NetworkPkg/DnsDxe/DnsImpl.c     | 8 ++++----
>>   NetworkPkg/DnsDxe/DnsProtocol.c | 4 ++--
>>   5 files changed, 11 insertions(+), 11 deletions(-)
>>
>> diff --git a/NetworkPkg/DnsDxe/DnsImpl.h b/NetworkPkg/DnsDxe/DnsImpl.h
>> index 10bc399e9ed5..affbb4be8ded 100644
>> --- a/NetworkPkg/DnsDxe/DnsImpl.h
>> +++ b/NetworkPkg/DnsDxe/DnsImpl.h
>> @@ -125,7 +125,7 @@ typedef struct {
>>     EFI_DNS6_COMPLETION_TOKEN  *Token;
>>   } DNS6_TOKEN_ENTRY;
>>   -union _DNS_FLAGS{
>> +union _DNS_FLAGS {
>>     struct {
>>       UINT16     RCode:4;
>>       UINT16     Zero:3;
>> diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c
>> index 9ea9d7c8f674..8f8b2aab1e32 100644
>> --- a/NetworkPkg/DnsDxe/DnsDhcp.c
>> +++ b/NetworkPkg/DnsDxe/DnsDhcp.c
>> @@ -131,7 +131,7 @@ ParseDhcp4Ack (
>>           return EFI_OUT_OF_RESOURCES;
>>         }
>>   -      for(Count=0; Count < ServerCount; Count++){
>> +      for (Count=0; Count < ServerCount; Count++) {
>>           CopyMem (ServerList + Count, &OptionList[Index]->Data[4 * 
>> Count], sizeof (EFI_IPv4_ADDRESS));
>>         }
>>   @@ -225,7 +225,7 @@ ParseDhcp6Ack (
>>           return EFI_OUT_OF_RESOURCES;
>>         }
>>   -      for(Count=0; Count < ServerCount; Count++){
>> +      for (Count=0; Count < ServerCount; Count++) {
>>           CopyMem (ServerList + Count, &OptionList[Index]->Data[16 * 
>> Count], sizeof (EFI_IPv6_ADDRESS));
>>         }
>>   diff --git a/NetworkPkg/DnsDxe/DnsDriver.c 
>> b/NetworkPkg/DnsDxe/DnsDriver.c
>> index f099da8a5a95..4db0c6bdd1eb 100644
>> --- a/NetworkPkg/DnsDxe/DnsDriver.c
>> +++ b/NetworkPkg/DnsDxe/DnsDriver.c
>> @@ -197,11 +197,11 @@ DnsDestroyService (
>>   {
>>     UdpIoFreeIo (DnsSb->ConnectUdp);
>>   -  if (DnsSb->TimerToGetMap != NULL){
>> +  if (DnsSb->TimerToGetMap != NULL) {
>>       gBS->CloseEvent (DnsSb->TimerToGetMap);
>>     }
>>   -  if (DnsSb->Timer != NULL){
>> +  if (DnsSb->Timer != NULL) {
>>       gBS->CloseEvent (DnsSb->Timer);
>>     }
>>   diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c
>> index 25628a5704f0..2edcb280ac4d 100644
>> --- a/NetworkPkg/DnsDxe/DnsImpl.c
>> +++ b/NetworkPkg/DnsDxe/DnsImpl.c
>> @@ -799,7 +799,7 @@ UpdateDns4Cache (
>>           Item->DnsCache.Timeout = DnsCacheEntry.Timeout;
>>             return EFI_SUCCESS;
>> -      }else {
>> +      } else {
>>           return EFI_ACCESS_DENIED;
>>         }
>>       }
>> @@ -897,7 +897,7 @@ UpdateDns6Cache (
>>           Item->DnsCache.Timeout = DnsCacheEntry.Timeout;
>>             return EFI_SUCCESS;
>> -      }else {
>> +      } else {
>>           return EFI_ACCESS_DENIED;
>>         }
>>       }
>> @@ -1080,7 +1080,7 @@ IsValidDnsResponse (
>>     NET_LIST_FOR_EACH (Entry, &TokensMap->Used) {
>>       *Item = NET_LIST_USER_STRUCT (Entry, NET_MAP_ITEM, Link);
>>       Packet = (NET_BUF *) ((*Item)->Value);
>> -    if (Packet == NULL){
>> +    if (Packet == NULL) {
>>           continue;
>>       } else {
>> @@ -2127,7 +2127,7 @@ DnsOnTimerRetransmit (
>>           }
>>         }
>>       }
>> -  }else {
>> +  } else {
>>       //
>>       // Iterate through all the children of the DNS service 
>> instance. Time
>>       // out the packet. If maximum retries reached, clean the Token up.
>> diff --git a/NetworkPkg/DnsDxe/DnsProtocol.c 
>> b/NetworkPkg/DnsDxe/DnsProtocol.c
>> index 4acc5fca46cf..a0bb58ef1db3 100644
>> --- a/NetworkPkg/DnsDxe/DnsProtocol.c
>> +++ b/NetworkPkg/DnsDxe/DnsProtocol.c
>> @@ -217,7 +217,7 @@ Dns4Configure (
>>         Dns4InstanceCancelToken(Instance, NULL);
>>       }
>>   -    if (Instance->UdpIo != NULL){
>> +    if (Instance->UdpIo != NULL) {
>>         UdpIoCleanIo (Instance->UdpIo);
>>       }
>>   @@ -1061,7 +1061,7 @@ Dns6Configure (
>>         Dns6InstanceCancelToken(Instance, NULL);
>>       }
>>   -    if (Instance->UdpIo != NULL){
>> +    if (Instance->UdpIo != NULL) {
>>         UdpIoCleanIo (Instance->UdpIo);
>>       }
>
>
>
> 
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-05 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-04  7:05 [PATCH EDK2 v1 0/1] NetworkPkg/DnsDxe: cosmetic fixups wenyi,xie
2020-12-04  7:05 ` [PATCH EDK2 v1 1/1] " wenyi,xie
2021-01-05 14:16   ` Maciej Rabeda
     [not found]   ` <16575BAFF098A13A.29174@groups.io>
2021-01-05 14:44     ` [edk2-devel] " Maciej Rabeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox