All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29  4:23 ` Andrew Cooper
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Cooper @ 2019-05-29  4:23 UTC (permalink / raw)
  To: Xen-devel
  Cc: Tamas K Lengyel, Wei Liu, George Dunlap, Andrew Cooper,
	Jan Beulich, Roger Pau Monné

Drop introduced trailing whitespace, excessively long lines, mal-indention,
superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
macros for gfns and mfns.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: George Dunlap <george.dunlap@eu.citrix.com>
CC: Tamas K Lengyel <tamas@tklengyel.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/hvm/hvm.c | 5 +++--
 xen/arch/x86/mm/p2m.c  | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 0e33e04..a44944b 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -1765,12 +1765,13 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla,
     {
         p2m = p2m_get_altp2m(curr);
 
-        /* 
+        /*
          * Get the altp2m entry if present; or if not, propagate from
          * the host p2m.  NB that this returns with gfn locked in the
          * altp2m.
          */
-        if ( p2m_altp2m_get_or_propagate(p2m, gfn, &mfn, &p2mt, &p2ma, page_order) )
+        if ( p2m_altp2m_get_or_propagate(p2m, gfn, &mfn, &p2mt,
+                                         &p2ma, page_order) )
         {
             /* Entry was copied from host -- retry fault */
             rc = 1;
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 0ea8941..4c99548 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -2440,7 +2440,7 @@ bool p2m_altp2m_get_or_propagate(struct p2m_domain *ap2m, unsigned long gfn_l,
      * gfns below.
      */
     p2m_lock(ap2m);
-    
+
     amfn = get_gfn_type_access(ap2m, gfn_l, &ap2mt, &ap2ma, 0, NULL);
 
     if ( !mfn_eq(amfn, INVALID_MFN) )
@@ -2474,11 +2474,11 @@ bool p2m_altp2m_get_or_propagate(struct p2m_domain *ap2m, unsigned long gfn_l,
     if ( rc )
     {
         gprintk(XENLOG_ERR,
-        "failed to set entry for %#"PRIx64" -> %#"PRIx64" altp2m %#"PRIx16". rc: %"PRIi32"\n",
-        gfn_l, mfn_x(amfn), vcpu_altp2m(current).p2midx, rc);
+                "failed to set entry for %"PRI_gfn" -> %"PRI_mfn" altp2m %u, rc %d\n",
+                gfn_l, mfn_x(amfn), vcpu_altp2m(current).p2midx, rc);
         domain_crash(ap2m->domain);
     }
-    
+
     return true;
 }
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* [Xen-devel] [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29  4:23 ` Andrew Cooper
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Cooper @ 2019-05-29  4:23 UTC (permalink / raw)
  To: Xen-devel
  Cc: Tamas K Lengyel, Wei Liu, George Dunlap, Andrew Cooper,
	Jan Beulich, Roger Pau Monné

Drop introduced trailing whitespace, excessively long lines, mal-indention,
superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
macros for gfns and mfns.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: George Dunlap <george.dunlap@eu.citrix.com>
CC: Tamas K Lengyel <tamas@tklengyel.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/hvm/hvm.c | 5 +++--
 xen/arch/x86/mm/p2m.c  | 8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c
index 0e33e04..a44944b 100644
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -1765,12 +1765,13 @@ int hvm_hap_nested_page_fault(paddr_t gpa, unsigned long gla,
     {
         p2m = p2m_get_altp2m(curr);
 
-        /* 
+        /*
          * Get the altp2m entry if present; or if not, propagate from
          * the host p2m.  NB that this returns with gfn locked in the
          * altp2m.
          */
-        if ( p2m_altp2m_get_or_propagate(p2m, gfn, &mfn, &p2mt, &p2ma, page_order) )
+        if ( p2m_altp2m_get_or_propagate(p2m, gfn, &mfn, &p2mt,
+                                         &p2ma, page_order) )
         {
             /* Entry was copied from host -- retry fault */
             rc = 1;
diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c
index 0ea8941..4c99548 100644
--- a/xen/arch/x86/mm/p2m.c
+++ b/xen/arch/x86/mm/p2m.c
@@ -2440,7 +2440,7 @@ bool p2m_altp2m_get_or_propagate(struct p2m_domain *ap2m, unsigned long gfn_l,
      * gfns below.
      */
     p2m_lock(ap2m);
-    
+
     amfn = get_gfn_type_access(ap2m, gfn_l, &ap2mt, &ap2ma, 0, NULL);
 
     if ( !mfn_eq(amfn, INVALID_MFN) )
@@ -2474,11 +2474,11 @@ bool p2m_altp2m_get_or_propagate(struct p2m_domain *ap2m, unsigned long gfn_l,
     if ( rc )
     {
         gprintk(XENLOG_ERR,
-        "failed to set entry for %#"PRIx64" -> %#"PRIx64" altp2m %#"PRIx16". rc: %"PRIi32"\n",
-        gfn_l, mfn_x(amfn), vcpu_altp2m(current).p2midx, rc);
+                "failed to set entry for %"PRI_gfn" -> %"PRI_mfn" altp2m %u, rc %d\n",
+                gfn_l, mfn_x(amfn), vcpu_altp2m(current).p2midx, rc);
         domain_crash(ap2m->domain);
     }
-    
+
     return true;
 }
 
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29  4:43   ` Andrew Cooper
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Cooper @ 2019-05-29  4:43 UTC (permalink / raw)
  To: Xen-devel
  Cc: George Dunlap, Tamas K Lengyel, Wei Liu, Jan Beulich,
	Roger Pau Monné

On 29/05/2019 05:23, Andrew Cooper wrote:
> Drop introduced trailing whitespace, excessively long lines, mal-indention,
> superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
> macros for gfns and mfns.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: George Dunlap <george.dunlap@eu.citrix.com>
> CC: Tamas K Lengyel <tamas@tklengyel.com>
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Wei Liu <wl@xen.org>
> CC: Roger Pau Monné <roger.pau@citrix.com>

And can I take this opportunity to remind all committers that `git diff
--check` exists and to please make sure it is used as part of pre-push
checks.

When used against c.s 9abcac7ff, it identifies:

andrew@andrew-laptop:~/xen.git/xen$ git diff --check 9abcac7ff^
xen/arch/x86/hvm/hvm.c:1768: trailing whitespace.
+        /*
xen/arch/x86/mm/p2m.c:2443: trailing whitespace.
+   
xen/arch/x86/mm/p2m.c:2481: trailing whitespace.
+   
andrew@andrew-laptop:~/xen.git/xen$ echo $?
2

(and also spots the introduction of conflict markers, although there
appear to be no incidents of this mistake in Xen's history.)

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29  4:43   ` Andrew Cooper
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Cooper @ 2019-05-29  4:43 UTC (permalink / raw)
  To: Xen-devel
  Cc: George Dunlap, Tamas K Lengyel, Wei Liu, Jan Beulich,
	Roger Pau Monné

On 29/05/2019 05:23, Andrew Cooper wrote:
> Drop introduced trailing whitespace, excessively long lines, mal-indention,
> superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
> macros for gfns and mfns.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: George Dunlap <george.dunlap@eu.citrix.com>
> CC: Tamas K Lengyel <tamas@tklengyel.com>
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Wei Liu <wl@xen.org>
> CC: Roger Pau Monné <roger.pau@citrix.com>

And can I take this opportunity to remind all committers that `git diff
--check` exists and to please make sure it is used as part of pre-push
checks.

When used against c.s 9abcac7ff, it identifies:

andrew@andrew-laptop:~/xen.git/xen$ git diff --check 9abcac7ff^
xen/arch/x86/hvm/hvm.c:1768: trailing whitespace.
+        /*
xen/arch/x86/mm/p2m.c:2443: trailing whitespace.
+   
xen/arch/x86/mm/p2m.c:2481: trailing whitespace.
+   
andrew@andrew-laptop:~/xen.git/xen$ echo $?
2

(and also spots the introduction of conflict markers, although there
appear to be no incidents of this mistake in Xen's history.)

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29  8:04     ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-29  8:04 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: George Dunlap, xen-devel, Tamas K Lengyel, WeiLiu, Roger Pau Monne

>>> On 29.05.19 at 06:43, <andrew.cooper3@citrix.com> wrote:
> On 29/05/2019 05:23, Andrew Cooper wrote:
>> Drop introduced trailing whitespace, excessively long lines, mal-indention,
>> superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
>> macros for gfns and mfns.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> CC: George Dunlap <george.dunlap@eu.citrix.com>
>> CC: Tamas K Lengyel <tamas@tklengyel.com>
>> CC: Jan Beulich <JBeulich@suse.com>
>> CC: Wei Liu <wl@xen.org>
>> CC: Roger Pau Monné <roger.pau@citrix.com>
> 
> And can I take this opportunity to remind all committers that `git diff
> --check` exists and to please make sure it is used as part of pre-push
> checks.

I don't think committers should do any checking. This should be part
of the review process (and even better be part of the submitter's
actions before sending out a patch). Committing should be a
mechanical act. Many of us doing build checks already goes beyond
what should really be required.

That said I've nevertheless added it to my script, but I'll drop it again
if the necessary cleaning up turns out to be too time consuming.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29  8:04     ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-29  8:04 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: George Dunlap, xen-devel, Tamas K Lengyel, WeiLiu, Roger Pau Monne

>>> On 29.05.19 at 06:43, <andrew.cooper3@citrix.com> wrote:
> On 29/05/2019 05:23, Andrew Cooper wrote:
>> Drop introduced trailing whitespace, excessively long lines, mal-indention,
>> superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
>> macros for gfns and mfns.
>>
>> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> CC: George Dunlap <george.dunlap@eu.citrix.com>
>> CC: Tamas K Lengyel <tamas@tklengyel.com>
>> CC: Jan Beulich <JBeulich@suse.com>
>> CC: Wei Liu <wl@xen.org>
>> CC: Roger Pau Monné <roger.pau@citrix.com>
> 
> And can I take this opportunity to remind all committers that `git diff
> --check` exists and to please make sure it is used as part of pre-push
> checks.

I don't think committers should do any checking. This should be part
of the review process (and even better be part of the submitter's
actions before sending out a patch). Committing should be a
mechanical act. Many of us doing build checks already goes beyond
what should really be required.

That said I've nevertheless added it to my script, but I'll drop it again
if the necessary cleaning up turns out to be too time consuming.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29  8:08   ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-29  8:08 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: George Dunlap, xen-devel, Tamas K Lengyel, WeiLiu, Roger Pau Monne

>>> On 29.05.19 at 06:23, <andrew.cooper3@citrix.com> wrote:
> Drop introduced trailing whitespace, excessively long lines, mal-indention,
> superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
> macros for gfns and mfns.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29  8:08   ` Jan Beulich
  0 siblings, 0 replies; 10+ messages in thread
From: Jan Beulich @ 2019-05-29  8:08 UTC (permalink / raw)
  To: Andrew Cooper
  Cc: George Dunlap, xen-devel, Tamas K Lengyel, WeiLiu, Roger Pau Monne

>>> On 29.05.19 at 06:23, <andrew.cooper3@citrix.com> wrote:
> Drop introduced trailing whitespace, excessively long lines, mal-indention,
> superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
> macros for gfns and mfns.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29 12:56   ` George Dunlap
  0 siblings, 0 replies; 10+ messages in thread
From: George Dunlap @ 2019-05-29 12:56 UTC (permalink / raw)
  To: Andrew Cooper, Xen-devel
  Cc: George Dunlap, Tamas K Lengyel, Wei Liu, Jan Beulich,
	Roger Pau Monné

On 5/29/19 5:23 AM, Andrew Cooper wrote:
> Drop introduced trailing whitespace, excessively long lines, mal-indention,
> superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
> macros for gfns and mfns.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: George Dunlap <george.dunlap@citrix.com>

Sorry about that.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

* Re: [Xen-devel] [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff
@ 2019-05-29 12:56   ` George Dunlap
  0 siblings, 0 replies; 10+ messages in thread
From: George Dunlap @ 2019-05-29 12:56 UTC (permalink / raw)
  To: Andrew Cooper, Xen-devel
  Cc: George Dunlap, Tamas K Lengyel, Wei Liu, Jan Beulich,
	Roger Pau Monné

On 5/29/19 5:23 AM, Andrew Cooper wrote:
> Drop introduced trailing whitespace, excessively long lines, mal-indention,
> superfluous use of PRI macros for int-or-smaller types, and incorrect PRI
> macros for gfns and mfns.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: George Dunlap <george.dunlap@citrix.com>

Sorry about that.

 -George

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2019-05-29 12:57 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29  4:23 [PATCH] x86/altp2m: Fix style errors introduced with c/s 9abcac7ff Andrew Cooper
2019-05-29  4:23 ` [Xen-devel] " Andrew Cooper
2019-05-29  4:43 ` Andrew Cooper
2019-05-29  4:43   ` [Xen-devel] " Andrew Cooper
2019-05-29  8:04   ` Jan Beulich
2019-05-29  8:04     ` [Xen-devel] " Jan Beulich
2019-05-29  8:08 ` Jan Beulich
2019-05-29  8:08   ` [Xen-devel] " Jan Beulich
2019-05-29 12:56 ` George Dunlap
2019-05-29 12:56   ` [Xen-devel] " George Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.