diff mbox series

[kvm-unit-tests,5/5] s390x: Fix sclp-ascii.c indents

Message ID 20181204134838.5841-6-frankja@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: Add cross hypervisor and disk boot | expand

Commit Message

Janosch Frank Dec. 4, 2018, 1:48 p.m. UTC
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
 lib/s390x/sclp-ascii.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

Comments

David Hildenbrand Dec. 4, 2018, 2:07 p.m. UTC | #1
On 04.12.18 14:48, Janosch Frank wrote:
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
> ---
>  lib/s390x/sclp-ascii.c | 34 +++++++++++++++++-----------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/lib/s390x/sclp-ascii.c b/lib/s390x/sclp-ascii.c
> index 5e23207..d60a5a2 100644
> --- a/lib/s390x/sclp-ascii.c
> +++ b/lib/s390x/sclp-ascii.c
> @@ -93,20 +93,20 @@ static bool initialized = false;
>  
>  static void sclp_print_ascii(const char *str)
>  {
> -    int len = strlen(str);
> -    WriteEventData *sccb = (void *)_sccb;
> +	int len = strlen(str);
> +	WriteEventData *sccb = (void *)_sccb;
>  
> -    while (sclp_busy)
> -	    /* Wait for SCLP request to complete */;
> -    sclp_busy = true;
> -    memset(sccb, 0, sizeof(*sccb));
> -    sccb->h.length = sizeof(WriteEventData) + len;
> -    sccb->h.function_code = SCLP_FC_NORMAL_WRITE;
> -    sccb->ebh.length = sizeof(EventBufferHeader) + len;
> -    sccb->ebh.type = SCLP_EVENT_ASCII_CONSOLE_DATA;
> -    memcpy(sccb->data, str, len);
> +	while (sclp_busy)
> +		/* Wait for SCLP request to complete */;
> +	sclp_busy = true;
> +	memset(sccb, 0, sizeof(*sccb));
> +	sccb->h.length = sizeof(WriteEventData) + len;
> +	sccb->h.function_code = SCLP_FC_NORMAL_WRITE;
> +	sccb->ebh.length = sizeof(EventBufferHeader) + len;
> +	sccb->ebh.type = SCLP_EVENT_ASCII_CONSOLE_DATA;
> +	memcpy(sccb->data, str, len);
>  
> -    sclp_service_call(SCLP_CMD_WRITE_EVENT_DATA, sccb);
> +	sclp_service_call(SCLP_CMD_WRITE_EVENT_DATA, sccb);
>  }
>  
>  static void sclp_print_lm(const char *str)
> @@ -165,7 +165,7 @@ static void sclp_print_lm(const char *str)
>   */
>  static bool sclp_set_write_mask(void)
>  {
> -    WriteEventMask *sccb = (void *)_sccb;
> +	WriteEventMask *sccb = (void *)_sccb;
>  
>  	while (sclp_busy)
>  		/* Wait for SCLP request to complete */;
> @@ -175,10 +175,10 @@ static bool sclp_set_write_mask(void)
>  	sccb->h.function_code = 0;
>  	sccb->mask_length = sizeof(sccb_mask_t);
>  
> -    /* For now we don't process sclp input. */
> -    sccb->cp_receive_mask = 0;
> -    /* We send ASCII and line mode. */
> -    sccb->cp_send_mask = SCLP_EVENT_MASK_MSG_ASCII | SCLP_EVENT_MASK_MSG;
> +	/* For now we don't process sclp input. */
> +	sccb->cp_receive_mask = 0;
> +	/* We send ASCII and line mode. */
> +	sccb->cp_send_mask = SCLP_EVENT_MASK_MSG_ASCII | SCLP_EVENT_MASK_MSG;
>  
>  	sclp_service_call(SCLP_CMD_WRITE_EVENT_MASK, sccb);
>  	while (sclp_busy) {
> 

For now we kept that file like that because it was essentially copied
from QEMU s390x-ccw sources. I don't have any strong opinions about this.
diff mbox series

Patch

diff --git a/lib/s390x/sclp-ascii.c b/lib/s390x/sclp-ascii.c
index 5e23207..d60a5a2 100644
--- a/lib/s390x/sclp-ascii.c
+++ b/lib/s390x/sclp-ascii.c
@@ -93,20 +93,20 @@  static bool initialized = false;
 
 static void sclp_print_ascii(const char *str)
 {
-    int len = strlen(str);
-    WriteEventData *sccb = (void *)_sccb;
+	int len = strlen(str);
+	WriteEventData *sccb = (void *)_sccb;
 
-    while (sclp_busy)
-	    /* Wait for SCLP request to complete */;
-    sclp_busy = true;
-    memset(sccb, 0, sizeof(*sccb));
-    sccb->h.length = sizeof(WriteEventData) + len;
-    sccb->h.function_code = SCLP_FC_NORMAL_WRITE;
-    sccb->ebh.length = sizeof(EventBufferHeader) + len;
-    sccb->ebh.type = SCLP_EVENT_ASCII_CONSOLE_DATA;
-    memcpy(sccb->data, str, len);
+	while (sclp_busy)
+		/* Wait for SCLP request to complete */;
+	sclp_busy = true;
+	memset(sccb, 0, sizeof(*sccb));
+	sccb->h.length = sizeof(WriteEventData) + len;
+	sccb->h.function_code = SCLP_FC_NORMAL_WRITE;
+	sccb->ebh.length = sizeof(EventBufferHeader) + len;
+	sccb->ebh.type = SCLP_EVENT_ASCII_CONSOLE_DATA;
+	memcpy(sccb->data, str, len);
 
-    sclp_service_call(SCLP_CMD_WRITE_EVENT_DATA, sccb);
+	sclp_service_call(SCLP_CMD_WRITE_EVENT_DATA, sccb);
 }
 
 static void sclp_print_lm(const char *str)
@@ -165,7 +165,7 @@  static void sclp_print_lm(const char *str)
  */
 static bool sclp_set_write_mask(void)
 {
-    WriteEventMask *sccb = (void *)_sccb;
+	WriteEventMask *sccb = (void *)_sccb;
 
 	while (sclp_busy)
 		/* Wait for SCLP request to complete */;
@@ -175,10 +175,10 @@  static bool sclp_set_write_mask(void)
 	sccb->h.function_code = 0;
 	sccb->mask_length = sizeof(sccb_mask_t);
 
-    /* For now we don't process sclp input. */
-    sccb->cp_receive_mask = 0;
-    /* We send ASCII and line mode. */
-    sccb->cp_send_mask = SCLP_EVENT_MASK_MSG_ASCII | SCLP_EVENT_MASK_MSG;
+	/* For now we don't process sclp input. */
+	sccb->cp_receive_mask = 0;
+	/* We send ASCII and line mode. */
+	sccb->cp_send_mask = SCLP_EVENT_MASK_MSG_ASCII | SCLP_EVENT_MASK_MSG;
 
 	sclp_service_call(SCLP_CMD_WRITE_EVENT_MASK, sccb);
 	while (sclp_busy) {