Re: [PATCH 02/29] alpha: Avoid comma separated statements
On Tue, 2021-02-16 at 15:39 +0100, Robert Richter wrote: > On 30.01.21 10:54:42, Joe Perches wrote: > > On Mon, 2020-08-24 at 21:55 -0700, Joe Perches wrote: > > > Use semicolons and braces. > > > > ping? > > > > > > > > Signed-off-by: Joe Perches > > > --- > > > arch/alpha/kernel/pci_iommu.c | 8 +--- > > > arch/alpha/oprofile/op_model_ev4.c | 22 ++ > > > arch/alpha/oprofile/op_model_ev5.c | 8 +--- > > This patch should be rebased as oprofile is going to be removed in > 5.12. A branch is in linux-next. git am --include=arch/alpha/kernel/pci_iommu.c
Re: [PATCH 02/29] alpha: Avoid comma separated statements
On 30.01.21 10:54:42, Joe Perches wrote: > On Mon, 2020-08-24 at 21:55 -0700, Joe Perches wrote: > > Use semicolons and braces. > > ping? > > > > > Signed-off-by: Joe Perches > > --- > > arch/alpha/kernel/pci_iommu.c | 8 +--- > > arch/alpha/oprofile/op_model_ev4.c | 22 ++ > > arch/alpha/oprofile/op_model_ev5.c | 8 +--- This patch should be rebased as oprofile is going to be removed in 5.12. A branch is in linux-next. -Robert > > 3 files changed, 24 insertions(+), 14 deletions(-)
Re: [PATCH 02/29] alpha: Avoid comma separated statements
On Mon, 2020-08-24 at 21:55 -0700, Joe Perches wrote: > Use semicolons and braces. ping? > > Signed-off-by: Joe Perches > --- > 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)
Re: [PATCH 02/29] alpha: Avoid comma separated statements
On 24.08.20 21:55:59, Joe Perches wrote: > Use semicolons and braces. > > Signed-off-by: Joe Perches > --- > 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(-) For oprofile: Acked-by: Robert Richter
[PATCH 02/29] alpha: Avoid comma separated statements
Use semicolons and braces. Signed-off-by: Joe Perches --- 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) -- 2.26.0