linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ia64: Fix style guide breakage
@ 2021-02-05 22:06 Amy Parker
  2021-02-06 16:07 ` John Paul Adrian Glaubitz
  2021-02-08  0:02 ` David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Amy Parker @ 2021-02-05 22:06 UTC (permalink / raw)
  To: schnelle, corbet, mchehab+huawei, tsbogend
  Cc: linux-ia64, linux-kernel, Amy Parker

Some statements do not have proper spacing between their C
keywords (commonly if and for) throughout files in the ia64 tree.
This patch corrects this to follow the kernel code style guide.

Signed-off-by: Amy Parker <enbyamy@gmail.com>
---
 arch/ia64/hp/common/sba_iommu.c  | 6 +++---
 arch/ia64/kernel/machine_kexec.c | 2 +-
 arch/ia64/kernel/palinfo.c       | 6 +++---
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 9148ddbf02e5..84a410f3e68f 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -139,7 +139,7 @@
 
 #ifdef ASSERT_PDIR_SANITY
 #define ASSERT(expr) \
-        if(!(expr)) { \
+        if (!(expr)) { \
                 printk( "\n" __FILE__ ":%d: Assertion " #expr " failed!\n",__LINE__); \
                 panic(#expr); \
         }
@@ -510,7 +510,7 @@ sba_search_bitmap(struct ioc *ioc, struct device *dev,
 
 	if (likely(bits_wanted == 1)) {
 		unsigned int bitshiftcnt;
-		for(; res_ptr < res_end ; res_ptr++) {
+		for (; res_ptr < res_end ; res_ptr++) {
 			if (likely(*res_ptr != ~0UL)) {
 				bitshiftcnt = ffz(*res_ptr);
 				*res_ptr |= (1UL << bitshiftcnt);
@@ -538,7 +538,7 @@ sba_search_bitmap(struct ioc *ioc, struct device *dev,
 		mask = base_mask << bitshiftcnt;
 
 		DBG_RES("%s() o %ld %p", __func__, o, res_ptr);
-		for(; res_ptr < res_end ; res_ptr++)
+		for (; res_ptr < res_end ; res_ptr++)
 		{ 
 			DBG_RES("    %p %lx %lx\n", res_ptr, mask, *res_ptr);
 			ASSERT(0 != mask);
diff --git a/arch/ia64/kernel/machine_kexec.c b/arch/ia64/kernel/machine_kexec.c
index efc9b568401c..8de286450578 100644
--- a/arch/ia64/kernel/machine_kexec.c
+++ b/arch/ia64/kernel/machine_kexec.c
@@ -137,7 +137,7 @@ void machine_kexec(struct kimage *image)
 {
 	BUG_ON(!image);
 	unw_init_running(ia64_machine_kexec, image);
-	for(;;);
+	for (;;);
 }
 
 void arch_crash_save_vmcoreinfo(void)
diff --git a/arch/ia64/kernel/palinfo.c b/arch/ia64/kernel/palinfo.c
index 78fa6579c9ea..ec2ff3e510c0 100644
--- a/arch/ia64/kernel/palinfo.c
+++ b/arch/ia64/kernel/palinfo.c
@@ -155,7 +155,7 @@ static void bitregister_process(struct seq_file *m, u64 *reg_info, int max)
 
 	value >>= i = begin = ffs(value) - 1;
 
-	for(; i < max; i++ ) {
+	for (; i < max; i++ ) {
 
 		if (i != 0 && (i%64) == 0) value = *++reg_info;
 
@@ -523,7 +523,7 @@ static void feature_set_info(struct seq_file *m, u64 avail, u64 status, u64 cont
 	int i;
 
 	vf = v = proc_features[set];
-	for(i=0; i < 64; i++, avail >>=1, status >>=1, control >>=1) {
+	for (i=0; i < 64; i++, avail >>=1, status >>=1, control >>=1) {
 
 		if (!(control))		/* No remaining bits set */
 			break;
@@ -613,7 +613,7 @@ static int bus_info(struct seq_file *m)
 	status  = st.pal_bus_features_val;
 	control = ct.pal_bus_features_val;
 
-	for(i=0; i < 64; i++, v++, avail >>=1, status >>=1, control >>=1) {
+	for (i=0; i < 64; i++, v++, avail >>=1, status >>=1, control >>=1) {
 		if ( ! *v )
 			continue;
 		seq_printf(m, "%-48s : %s%s %s\n", *v,
-- 
2.29.2


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

* Re: [PATCH] ia64: Fix style guide breakage
  2021-02-05 22:06 [PATCH] ia64: Fix style guide breakage Amy Parker
@ 2021-02-06 16:07 ` John Paul Adrian Glaubitz
  2021-02-06 17:09   ` Amy Parker
  2021-02-08  0:02 ` David Sterba
  1 sibling, 1 reply; 4+ messages in thread
From: John Paul Adrian Glaubitz @ 2021-02-06 16:07 UTC (permalink / raw)
  To: Amy Parker, schnelle, corbet, mchehab+huawei, tsbogend
  Cc: linux-ia64, linux-kernel

Hi Amy!

On 2/5/21 11:06 PM, Amy Parker wrote:
> Some statements do not have proper spacing between their C
> keywords (commonly if and for) throughout files in the ia64 tree.
> This patch corrects this to follow the kernel code style guide.
> 
> Signed-off-by: Amy Parker <enbyamy@gmail.com>

I never noticed. Does the kernel coding style guideline actually require
space after "for" and "if" and similar statements but not before function
names?

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


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

* Re: [PATCH] ia64: Fix style guide breakage
  2021-02-06 16:07 ` John Paul Adrian Glaubitz
@ 2021-02-06 17:09   ` Amy Parker
  0 siblings, 0 replies; 4+ messages in thread
From: Amy Parker @ 2021-02-06 17:09 UTC (permalink / raw)
  To: John Paul Adrian Glaubitz
  Cc: schnelle, corbet, mchehab+huawei, tsbogend, linux-ia64, LKML

On Sat, Feb 6, 2021 at 8:07 AM John Paul Adrian Glaubitz
<glaubitz@physik.fu-berlin.de> wrote:
>
> Hi Amy!
>
> On 2/5/21 11:06 PM, Amy Parker wrote:
> > Some statements do not have proper spacing between their C
> > keywords (commonly if and for) throughout files in the ia64 tree.
> > This patch corrects this to follow the kernel code style guide.
> >
> > Signed-off-by: Amy Parker <enbyamy@gmail.com>
>
> I never noticed. Does the kernel coding style guideline actually require
> space after "for" and "if" and similar statements but not before function
> names?

Yes it does, actually!

> So use a space after these keywords:
> if, switch, case, for, do, while

> int system_is_up(void)
> {
>         return system_state == SYSTEM_RUNNING;
> }


   -Amy IP

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

* Re: [PATCH] ia64: Fix style guide breakage
  2021-02-05 22:06 [PATCH] ia64: Fix style guide breakage Amy Parker
  2021-02-06 16:07 ` John Paul Adrian Glaubitz
@ 2021-02-08  0:02 ` David Sterba
  1 sibling, 0 replies; 4+ messages in thread
From: David Sterba @ 2021-02-08  0:02 UTC (permalink / raw)
  To: Amy Parker
  Cc: schnelle, corbet, mchehab+huawei, tsbogend, linux-ia64, linux-kernel

On Fri, Feb 05, 2021 at 02:06:18PM -0800, Amy Parker wrote:
> Some statements do not have proper spacing between their C
> keywords (commonly if and for) throughout files in the ia64 tree.
> This patch corrects this to follow the kernel code style guide.
> 
> Signed-off-by: Amy Parker <enbyamy@gmail.com>
> ---
>  arch/ia64/hp/common/sba_iommu.c  | 6 +++---
>  arch/ia64/kernel/machine_kexec.c | 2 +-
>  arch/ia64/kernel/palinfo.c       | 6 +++---

ia64 got orphaned and not maintained in 96ec72a3425d1515b6, it's just
not really worth the time to spend the time cleaning up the code base.

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

end of thread, other threads:[~2021-02-08  0:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-05 22:06 [PATCH] ia64: Fix style guide breakage Amy Parker
2021-02-06 16:07 ` John Paul Adrian Glaubitz
2021-02-06 17:09   ` Amy Parker
2021-02-08  0:02 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).