* [PATCH] checkpatch.pl: ERROR: spaces required
@ 2010-12-13 18:12 Toralf Förster
2010-12-13 18:49 ` Miguel Ojeda
0 siblings, 1 reply; 3+ messages in thread
From: Toralf Förster @ 2010-12-13 18:12 UTC (permalink / raw)
To: kernel-janitors; +Cc: linux-kernel, Toralf Förster
Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
---
kernel/acct.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/kernel/acct.c b/kernel/acct.c
index fa7eb3d..9ca7be8 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -144,7 +144,7 @@ static int check_free_space(struct bsd_acct_struct *acct, struct file *file)
spin_lock(&acct_lock);
if (file != acct->file) {
if (act)
- res = act>0;
+ res = act > 0;
goto out;
}
@@ -396,7 +396,7 @@ static comp_t encode_comp_t(unsigned long value)
return exp;
}
-#if ACCT_VERSION==1 || ACCT_VERSION==2
+#if ACCT_VERSION == 1 || ACCT_VERSION == 2
/*
* encode an u64 into a comp2_t (24 bits)
*
@@ -440,7 +440,7 @@ static comp2_t encode_comp2_t(u64 value)
}
#endif
-#if ACCT_VERSION==3
+#if ACCT_VERSION == 3
/*
* encode an u64 into a 32 bit IEEE float
*/
@@ -449,8 +449,8 @@ static u32 encode_float(u64 value)
unsigned exp = 190;
unsigned u;
- if (value==0) return 0;
- while ((s64)value > 0){
+ if (value == 0) return 0;
+ while ((s64)value > 0) {
value <<= 1;
exp--;
}
@@ -510,13 +510,13 @@ static void do_acct_process(struct bsd_acct_struct *acct,
+ current->group_leader->start_time.tv_nsec;
/* convert nsec -> AHZ */
elapsed = nsec_to_AHZ(run_time);
-#if ACCT_VERSION==3
+#if ACCT_VERSION == 3
ac.ac_etime = encode_float(elapsed);
#else
ac.ac_etime = encode_comp_t(elapsed < (unsigned long) -1l ?
(unsigned long) elapsed : (unsigned long) -1l);
#endif
-#if ACCT_VERSION==1 || ACCT_VERSION==2
+#if ACCT_VERSION == 1 || ACCT_VERSION == 2
{
/* new enlarged etime field */
comp2_t etime = encode_comp2_t(elapsed);
@@ -529,15 +529,15 @@ static void do_acct_process(struct bsd_acct_struct *acct,
/* we really need to bite the bullet and change layout */
ac.ac_uid = orig_cred->uid;
ac.ac_gid = orig_cred->gid;
-#if ACCT_VERSION==2
+#if ACCT_VERSION == 2
ac.ac_ahz = AHZ;
#endif
-#if ACCT_VERSION==1 || ACCT_VERSION==2
+#if ACCT_VERSION == 1 || ACCT_VERSION == 2
/* backward-compatible 16 bit fields */
ac.ac_uid16 = ac.ac_uid;
ac.ac_gid16 = ac.ac_gid;
#endif
-#if ACCT_VERSION==3
+#if ACCT_VERSION == 3
ac.ac_pid = task_tgid_nr_ns(current, ns);
rcu_read_lock();
ac.ac_ppid = task_tgid_nr_ns(rcu_dereference(current->real_parent), ns);
--
1.7.2.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch.pl: ERROR: spaces required
2010-12-13 18:12 [PATCH] checkpatch.pl: ERROR: spaces required Toralf Förster
@ 2010-12-13 18:49 ` Miguel Ojeda
2010-12-13 21:59 ` Toralf Förster
0 siblings, 1 reply; 3+ messages in thread
From: Miguel Ojeda @ 2010-12-13 18:49 UTC (permalink / raw)
To: Toralf Förster; +Cc: kernel-janitors, linux-kernel
2010/12/13 Toralf Förster <toralf.foerster@gmx.de>:
>
> Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
> ---
> kernel/acct.c | 20 ++++++++++----------
> 1 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/kernel/acct.c b/kernel/acct.c
> index fa7eb3d..9ca7be8 100644
> --- a/kernel/acct.c
> +++ b/kernel/acct.c
> @@ -144,7 +144,7 @@ static int check_free_space(struct bsd_acct_struct *acct, struct file *file)
> spin_lock(&acct_lock);
> if (file != acct->file) {
> if (act)
> - res = act>0;
> + res = act > 0;
> goto out;
> }
>
> @@ -396,7 +396,7 @@ static comp_t encode_comp_t(unsigned long value)
> return exp;
> }
>
> -#if ACCT_VERSION==1 || ACCT_VERSION==2
> +#if ACCT_VERSION == 1 || ACCT_VERSION == 2
> /*
> * encode an u64 into a comp2_t (24 bits)
> *
> @@ -440,7 +440,7 @@ static comp2_t encode_comp2_t(u64 value)
> }
> #endif
>
> -#if ACCT_VERSION==3
> +#if ACCT_VERSION == 3
> /*
> * encode an u64 into a 32 bit IEEE float
> */
> @@ -449,8 +449,8 @@ static u32 encode_float(u64 value)
> unsigned exp = 190;
> unsigned u;
>
> - if (value==0) return 0;
> - while ((s64)value > 0){
> + if (value == 0) return 0;
Newline here. Doesn't checkpatch.pl complain? It is an old rule:
http://lxr.linux.no/linux+v2.6.36/Documentation/CodingStyle#L60
> + while ((s64)value > 0) {
> value <<= 1;
> exp--;
> }
> @@ -510,13 +510,13 @@ static void do_acct_process(struct bsd_acct_struct *acct,
> + current->group_leader->start_time.tv_nsec;
> /* convert nsec -> AHZ */
> elapsed = nsec_to_AHZ(run_time);
> -#if ACCT_VERSION==3
> +#if ACCT_VERSION == 3
> ac.ac_etime = encode_float(elapsed);
> #else
> ac.ac_etime = encode_comp_t(elapsed < (unsigned long) -1l ?
> (unsigned long) elapsed : (unsigned long) -1l);
> #endif
> -#if ACCT_VERSION==1 || ACCT_VERSION==2
> +#if ACCT_VERSION == 1 || ACCT_VERSION == 2
> {
> /* new enlarged etime field */
> comp2_t etime = encode_comp2_t(elapsed);
> @@ -529,15 +529,15 @@ static void do_acct_process(struct bsd_acct_struct *acct,
> /* we really need to bite the bullet and change layout */
> ac.ac_uid = orig_cred->uid;
> ac.ac_gid = orig_cred->gid;
> -#if ACCT_VERSION==2
> +#if ACCT_VERSION == 2
> ac.ac_ahz = AHZ;
> #endif
> -#if ACCT_VERSION==1 || ACCT_VERSION==2
> +#if ACCT_VERSION == 1 || ACCT_VERSION == 2
> /* backward-compatible 16 bit fields */
> ac.ac_uid16 = ac.ac_uid;
> ac.ac_gid16 = ac.ac_gid;
> #endif
> -#if ACCT_VERSION==3
> +#if ACCT_VERSION == 3
> ac.ac_pid = task_tgid_nr_ns(current, ns);
> rcu_read_lock();
> ac.ac_ppid = task_tgid_nr_ns(rcu_dereference(current->real_parent), ns);
> --
> 1.7.2.2
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch.pl: ERROR: spaces required
2010-12-13 18:49 ` Miguel Ojeda
@ 2010-12-13 21:59 ` Toralf Förster
0 siblings, 0 replies; 3+ messages in thread
From: Toralf Förster @ 2010-12-13 21:59 UTC (permalink / raw)
To: Miguel Ojeda; +Cc: kernel-janitors, linux-kernel
Miguel Ojeda wrote at 19:49:43
> 2010/12/13 Toralf Förster <toralf.foerster@gmx.de>:
> > Signed-off-by: Toralf Förster <toralf.foerster@gmx.de>
> > ---
> > kernel/acct.c | 20 ++++++++++----------
> > 1 files changed, 10 insertions(+), 10 deletions(-)
> >
...
> > - if (value==0) return 0;
> > - while ((s64)value > 0){
> > + if (value == 0) return 0;
>
> Newline here. Doesn't checkpatch.pl complain? It is an old rule:
>
> http://lxr.linux.no/linux+v2.6.36/Documentation/CodingStyle#L60
>
I'd like to do only one thing at a time - not one file at a time.
--
MfG/Kind regards
Toralf Förster
pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-13 21:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-13 18:12 [PATCH] checkpatch.pl: ERROR: spaces required Toralf Förster
2010-12-13 18:49 ` Miguel Ojeda
2010-12-13 21:59 ` Toralf Förster
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®