Re: [PATCH 02/29] alpha: Avoid comma separated statements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2020-08-24 at 21:55 -0700, Joe Perches wrote:
> Use semicolons and braces.

ping?

> 
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
> ---
>  arch/alpha/kernel/pci_iommu.c      |  8 +++++---
>  arch/alpha/oprofile/op_model_ev4.c | 22 ++++++++++++++--------
>  arch/alpha/oprofile/op_model_ev5.c |  8 +++++---
>  3 files changed, 24 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c
> index 81037907268d..b8af7ad6c607 100644
> --- a/arch/alpha/kernel/pci_iommu.c
> +++ b/arch/alpha/kernel/pci_iommu.c
> @@ -161,10 +161,12 @@ iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena,
>  			goto again;
>  		}
>  
> 
> -		if (ptes[p+i])
> -			p = ALIGN(p + i + 1, mask + 1), i = 0;
> -		else
> +		if (ptes[p+i]) {
> +			p = ALIGN(p + i + 1, mask + 1);
> +			i = 0;
> +		} else {
>  			i = i + 1;
> +		}
>  	}
>  
> 
>  	if (i < n) {
> diff --git a/arch/alpha/oprofile/op_model_ev4.c b/arch/alpha/oprofile/op_model_ev4.c
> index 086a0d5445c5..004f80a4291f 100644
> --- a/arch/alpha/oprofile/op_model_ev4.c
> +++ b/arch/alpha/oprofile/op_model_ev4.c
> @@ -46,18 +46,24 @@ ev4_reg_setup(struct op_register_config *reg,
>  	   map it onto one of the possible values, and write it back.  */
>  
> 
>  	count = ctr[0].count;
> -	if (count <= 4096)
> -		count = 4096, hilo = 1;
> -	else
> -		count = 65536, hilo = 0;
> +	if (count <= 4096) {
> +		count = 4096;
> +		hilo = 1;
> +	} else {
> +		count = 65536;
> +		hilo = 0;
> +	}
>  	ctr[0].count = count;
>  	ctl |= (ctr[0].enabled && hilo) << 3;
>  
> 
>  	count = ctr[1].count;
> -	if (count <= 256)
> -		count = 256, hilo = 1;
> -	else
> -		count = 4096, hilo = 0;
> +	if (count <= 256) {
> +		count = 256;
> +		hilo = 1;
> +	} else {
> +		count = 4096;
> +		hilo = 0;
> +	}
>  	ctr[1].count = count;
>  	ctl |= (ctr[1].enabled && hilo);
>  
> 
> diff --git a/arch/alpha/oprofile/op_model_ev5.c b/arch/alpha/oprofile/op_model_ev5.c
> index c300f5ef3482..6f52244e1181 100644
> --- a/arch/alpha/oprofile/op_model_ev5.c
> +++ b/arch/alpha/oprofile/op_model_ev5.c
> @@ -92,9 +92,11 @@ common_reg_setup(struct op_register_config *reg,
>  		if (!ctr[i].enabled)
>  			continue;
>  
> 
> -		if (count <= 256)
> -			count = 256, hilo = 3, max = 256;
> -		else {
> +		if (count <= 256) {
> +			max = 256;
> +			hilo = 3;
> +			count = 256;
> +		} else {
>  			max = (i == 2 ? 16384 : 65536);
>  			hilo = 2;
>  			if (count > max)





[Index of Archives]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux