public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] context_tracking: Fix checkpatch warnings
@ 2014-09-16  4:20 Martin Kelly
  2014-09-25 16:25 ` Martin Kelly
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Kelly @ 2014-09-16  4:20 UTC (permalink / raw)
  To: x86; +Cc: hpa, mingo, tglx, linux-kernel, Martin Kelly, Martin Kelly

checkpatch emits several warnings for context_tracking.c, which are
fixed in this patch:

- No space after "("
- Lines longer than 80 characters

Signed-off-by: Martin Kelly <martkell@amazon.com>
---
 kernel/context_tracking.c | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
index 5664985..bf29065 100644
--- a/kernel/context_tracking.c
+++ b/kernel/context_tracking.c
@@ -54,8 +54,8 @@ void context_tracking_user_enter(void)
 	/*
 	 * Repeat the user_enter() check here because some archs may be calling
 	 * this from asm and if no CPU needs context tracking, they shouldn't
-	 * go further. Repeat the check here until they support the inline static
-	 * key check.
+	 * go further. Repeat the check here until they support the inline
+	 * static key check.
 	 */
 	if (!context_tracking_is_enabled())
 		return;
@@ -75,31 +75,33 @@ void context_tracking_user_enter(void)
 	WARN_ON_ONCE(!current->mm);
 
 	local_irq_save(flags);
-	if ( __this_cpu_read(context_tracking.state) != IN_USER) {
+	if (__this_cpu_read(context_tracking.state) != IN_USER) {
 		if (__this_cpu_read(context_tracking.active)) {
 			trace_user_enter(0);
 			/*
-			 * At this stage, only low level arch entry code remains and
-			 * then we'll run in userspace. We can assume there won't be
-			 * any RCU read-side critical section until the next call to
-			 * user_exit() or rcu_irq_enter(). Let's remove RCU's dependency
-			 * on the tick.
+			 * At this stage, only low level arch entry code
+			 * remains and then we'll run in userspace. We can
+			 * assume there won't be any RCU read-side critical
+			 * section until the next call to user_exit() or
+			 * rcu_irq_enter(). Let's remove RCU's dependency on
+			 * the tick.
 			 */
 			vtime_user_enter(current);
 			rcu_user_enter();
 		}
 		/*
-		 * Even if context tracking is disabled on this CPU, because it's outside
-		 * the full dynticks mask for example, we still have to keep track of the
-		 * context transitions and states to prevent inconsistency on those of
-		 * other CPUs.
-		 * If a task triggers an exception in userspace, sleep on the exception
-		 * handler and then migrate to another CPU, that new CPU must know where
-		 * the exception returns by the time we call exception_exit().
-		 * This information can only be provided by the previous CPU when it called
-		 * exception_enter().
-		 * OTOH we can spare the calls to vtime and RCU when context_tracking.active
-		 * is false because we know that CPU is not tickless.
+		 * Even if context tracking is disabled on this CPU, because
+		 * it's outside the full dynticks mask for example, we still
+		 * have to keep track of the context transitions and states to
+		 * prevent inconsistency on those of other CPUs.  If a task
+		 * triggers an exception in userspace, sleep on the exception
+		 * handler and then migrate to another CPU, that new CPU must
+		 * know where the exception returns by the time we call
+		 * exception_exit().  This information can only be provided by
+		 * the previous CPU when it called exception_enter().  OTOH we
+		 * can spare the calls to vtime and RCU when
+		 * context_tracking.active is false because we know that CPU is
+		 * not tickless.
 		 */
 		__this_cpu_write(context_tracking.state, IN_USER);
 	}
-- 
2.1.0


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

* Re: [PATCH] context_tracking: Fix checkpatch warnings
  2014-09-16  4:20 [PATCH] context_tracking: Fix checkpatch warnings Martin Kelly
@ 2014-09-25 16:25 ` Martin Kelly
  2014-10-11 16:29   ` Martin Kelly
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Kelly @ 2014-09-25 16:25 UTC (permalink / raw)
  To: x86; +Cc: hpa, mingo, tglx, linux-kernel, Martin Kelly, Martin Kelly

On Mon, Sep 15, 2014 at 9:20 PM, Martin Kelly <martin@martingkelly.com> wrote:
> checkpatch emits several warnings for context_tracking.c, which are
> fixed in this patch:
>
> - No space after "("
> - Lines longer than 80 characters
>
> Signed-off-by: Martin Kelly <martkell@amazon.com>
> ---
>  kernel/context_tracking.c | 40 +++++++++++++++++++++-------------------
>  1 file changed, 21 insertions(+), 19 deletions(-)
>
> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
> index 5664985..bf29065 100644
> --- a/kernel/context_tracking.c
> +++ b/kernel/context_tracking.c
> @@ -54,8 +54,8 @@ void context_tracking_user_enter(void)
>         /*
>          * Repeat the user_enter() check here because some archs may be calling
>          * this from asm and if no CPU needs context tracking, they shouldn't
> -        * go further. Repeat the check here until they support the inline static
> -        * key check.
> +        * go further. Repeat the check here until they support the inline
> +        * static key check.
>          */
>         if (!context_tracking_is_enabled())
>                 return;
> @@ -75,31 +75,33 @@ void context_tracking_user_enter(void)
>         WARN_ON_ONCE(!current->mm);
>
>         local_irq_save(flags);
> -       if ( __this_cpu_read(context_tracking.state) != IN_USER) {
> +       if (__this_cpu_read(context_tracking.state) != IN_USER) {
>                 if (__this_cpu_read(context_tracking.active)) {
>                         trace_user_enter(0);
>                         /*
> -                        * At this stage, only low level arch entry code remains and
> -                        * then we'll run in userspace. We can assume there won't be
> -                        * any RCU read-side critical section until the next call to
> -                        * user_exit() or rcu_irq_enter(). Let's remove RCU's dependency
> -                        * on the tick.
> +                        * At this stage, only low level arch entry code
> +                        * remains and then we'll run in userspace. We can
> +                        * assume there won't be any RCU read-side critical
> +                        * section until the next call to user_exit() or
> +                        * rcu_irq_enter(). Let's remove RCU's dependency on
> +                        * the tick.
>                          */
>                         vtime_user_enter(current);
>                         rcu_user_enter();
>                 }
>                 /*
> -                * Even if context tracking is disabled on this CPU, because it's outside
> -                * the full dynticks mask for example, we still have to keep track of the
> -                * context transitions and states to prevent inconsistency on those of
> -                * other CPUs.
> -                * If a task triggers an exception in userspace, sleep on the exception
> -                * handler and then migrate to another CPU, that new CPU must know where
> -                * the exception returns by the time we call exception_exit().
> -                * This information can only be provided by the previous CPU when it called
> -                * exception_enter().
> -                * OTOH we can spare the calls to vtime and RCU when context_tracking.active
> -                * is false because we know that CPU is not tickless.
> +                * Even if context tracking is disabled on this CPU, because
> +                * it's outside the full dynticks mask for example, we still
> +                * have to keep track of the context transitions and states to
> +                * prevent inconsistency on those of other CPUs.  If a task
> +                * triggers an exception in userspace, sleep on the exception
> +                * handler and then migrate to another CPU, that new CPU must
> +                * know where the exception returns by the time we call
> +                * exception_exit().  This information can only be provided by
> +                * the previous CPU when it called exception_enter().  OTOH we
> +                * can spare the calls to vtime and RCU when
> +                * context_tracking.active is false because we know that CPU is
> +                * not tickless.
>                  */
>                 __this_cpu_write(context_tracking.state, IN_USER);
>         }
> --
> 2.1.0
>

(ping)

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

* Re: [PATCH] context_tracking: Fix checkpatch warnings
  2014-09-25 16:25 ` Martin Kelly
@ 2014-10-11 16:29   ` Martin Kelly
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Kelly @ 2014-10-11 16:29 UTC (permalink / raw)
  To: x86; +Cc: hpa, mingo, tglx, linux-kernel, Martin Kelly

On 09/25/2014 09:25 AM, Martin Kelly wrote:
> On Mon, Sep 15, 2014 at 9:20 PM, Martin Kelly <martin@martingkelly.com> wrote:
>> checkpatch emits several warnings for context_tracking.c, which are
>> fixed in this patch:
>>
>> - No space after "("
>> - Lines longer than 80 characters
>>
>> Signed-off-by: Martin Kelly <martkell@amazon.com>
>> ---
>>  kernel/context_tracking.c | 40 +++++++++++++++++++++-------------------
>>  1 file changed, 21 insertions(+), 19 deletions(-)
>>
>> diff --git a/kernel/context_tracking.c b/kernel/context_tracking.c
>> index 5664985..bf29065 100644
>> --- a/kernel/context_tracking.c
>> +++ b/kernel/context_tracking.c
>> @@ -54,8 +54,8 @@ void context_tracking_user_enter(void)
>>         /*
>>          * Repeat the user_enter() check here because some archs may be calling
>>          * this from asm and if no CPU needs context tracking, they shouldn't
>> -        * go further. Repeat the check here until they support the inline static
>> -        * key check.
>> +        * go further. Repeat the check here until they support the inline
>> +        * static key check.
>>          */
>>         if (!context_tracking_is_enabled())
>>                 return;
>> @@ -75,31 +75,33 @@ void context_tracking_user_enter(void)
>>         WARN_ON_ONCE(!current->mm);
>>
>>         local_irq_save(flags);
>> -       if ( __this_cpu_read(context_tracking.state) != IN_USER) {
>> +       if (__this_cpu_read(context_tracking.state) != IN_USER) {
>>                 if (__this_cpu_read(context_tracking.active)) {
>>                         trace_user_enter(0);
>>                         /*
>> -                        * At this stage, only low level arch entry code remains and
>> -                        * then we'll run in userspace. We can assume there won't be
>> -                        * any RCU read-side critical section until the next call to
>> -                        * user_exit() or rcu_irq_enter(). Let's remove RCU's dependency
>> -                        * on the tick.
>> +                        * At this stage, only low level arch entry code
>> +                        * remains and then we'll run in userspace. We can
>> +                        * assume there won't be any RCU read-side critical
>> +                        * section until the next call to user_exit() or
>> +                        * rcu_irq_enter(). Let's remove RCU's dependency on
>> +                        * the tick.
>>                          */
>>                         vtime_user_enter(current);
>>                         rcu_user_enter();
>>                 }
>>                 /*
>> -                * Even if context tracking is disabled on this CPU, because it's outside
>> -                * the full dynticks mask for example, we still have to keep track of the
>> -                * context transitions and states to prevent inconsistency on those of
>> -                * other CPUs.
>> -                * If a task triggers an exception in userspace, sleep on the exception
>> -                * handler and then migrate to another CPU, that new CPU must know where
>> -                * the exception returns by the time we call exception_exit().
>> -                * This information can only be provided by the previous CPU when it called
>> -                * exception_enter().
>> -                * OTOH we can spare the calls to vtime and RCU when context_tracking.active
>> -                * is false because we know that CPU is not tickless.
>> +                * Even if context tracking is disabled on this CPU, because
>> +                * it's outside the full dynticks mask for example, we still
>> +                * have to keep track of the context transitions and states to
>> +                * prevent inconsistency on those of other CPUs.  If a task
>> +                * triggers an exception in userspace, sleep on the exception
>> +                * handler and then migrate to another CPU, that new CPU must
>> +                * know where the exception returns by the time we call
>> +                * exception_exit().  This information can only be provided by
>> +                * the previous CPU when it called exception_enter().  OTOH we
>> +                * can spare the calls to vtime and RCU when
>> +                * context_tracking.active is false because we know that CPU is
>> +                * not tickless.
>>                  */
>>                 __this_cpu_write(context_tracking.state, IN_USER);
>>         }
>> --
>> 2.1.0
>>
> 
> (ping)
> 

(re-ping)

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

end of thread, other threads:[~2014-10-11 16:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-16  4:20 [PATCH] context_tracking: Fix checkpatch warnings Martin Kelly
2014-09-25 16:25 ` Martin Kelly
2014-10-11 16:29   ` Martin Kelly

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