[PATCH] misc: Remove redundant new line in perror()

Li Zhijian posted 1 patch 2 years, 10 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210706094433.1766952-1-lizhijian@cn.fujitsu.com
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Juan Quintela <quintela@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>
migration/rdma.c | 2 +-
softmmu/cpus.c   | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[PATCH] misc: Remove redundant new line in perror()
Posted by Li Zhijian 2 years, 10 months ago
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
---
 migration/rdma.c | 2 +-
 softmmu/cpus.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/migration/rdma.c b/migration/rdma.c
index 7fb9646f6ef..e99e2e16a73 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -1133,7 +1133,7 @@ static int qemu_rdma_reg_whole_ram_blocks(RDMAContext *rdma)
                     IBV_ACCESS_REMOTE_WRITE
                     );
         if (!local->block[i].mr) {
-            perror("Failed to register local dest ram block!\n");
+            perror("Failed to register local dest ram block!");
             break;
         }
         rdma->total_registrations++;
diff --git a/softmmu/cpus.c b/softmmu/cpus.c
index c3caaeb26ec..071085f840b 100644
--- a/softmmu/cpus.c
+++ b/softmmu/cpus.c
@@ -325,7 +325,7 @@ static void sigbus_reraise(void)
         sigaddset(&set, SIGBUS);
         pthread_sigmask(SIG_UNBLOCK, &set, NULL);
     }
-    perror("Failed to re-raise SIGBUS!\n");
+    perror("Failed to re-raise SIGBUS!");
     abort();
 }
 
-- 
2.30.2




Re: [PATCH] misc: Remove redundant new line in perror()
Posted by Philippe Mathieu-Daudé 2 years, 10 months ago
Cc'ing qemu-trivial@

On 7/6/21 11:44 AM, Li Zhijian wrote:
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> ---
>  migration/rdma.c | 2 +-
>  softmmu/cpus.c   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/migration/rdma.c b/migration/rdma.c
> index 7fb9646f6ef..e99e2e16a73 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -1133,7 +1133,7 @@ static int qemu_rdma_reg_whole_ram_blocks(RDMAContext *rdma)
>                      IBV_ACCESS_REMOTE_WRITE
>                      );
>          if (!local->block[i].mr) {
> -            perror("Failed to register local dest ram block!\n");
> +            perror("Failed to register local dest ram block!");
>              break;
>          }
>          rdma->total_registrations++;
> diff --git a/softmmu/cpus.c b/softmmu/cpus.c
> index c3caaeb26ec..071085f840b 100644
> --- a/softmmu/cpus.c
> +++ b/softmmu/cpus.c
> @@ -325,7 +325,7 @@ static void sigbus_reraise(void)
>          sigaddset(&set, SIGBUS);
>          pthread_sigmask(SIG_UNBLOCK, &set, NULL);
>      }
> -    perror("Failed to re-raise SIGBUS!\n");
> +    perror("Failed to re-raise SIGBUS!");
>      abort();
>  }

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>


Re: [PATCH] misc: Remove redundant new line in perror()
Posted by Laurent Vivier 2 years, 9 months ago
Le 06/07/2021 à 11:55, Philippe Mathieu-Daudé a écrit :
> Cc'ing qemu-trivial@
> 
> On 7/6/21 11:44 AM, Li Zhijian wrote:
>> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
>> ---
>>  migration/rdma.c | 2 +-
>>  softmmu/cpus.c   | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/migration/rdma.c b/migration/rdma.c
>> index 7fb9646f6ef..e99e2e16a73 100644
>> --- a/migration/rdma.c
>> +++ b/migration/rdma.c
>> @@ -1133,7 +1133,7 @@ static int qemu_rdma_reg_whole_ram_blocks(RDMAContext *rdma)
>>                      IBV_ACCESS_REMOTE_WRITE
>>                      );
>>          if (!local->block[i].mr) {
>> -            perror("Failed to register local dest ram block!\n");
>> +            perror("Failed to register local dest ram block!");
>>              break;
>>          }
>>          rdma->total_registrations++;
>> diff --git a/softmmu/cpus.c b/softmmu/cpus.c
>> index c3caaeb26ec..071085f840b 100644
>> --- a/softmmu/cpus.c
>> +++ b/softmmu/cpus.c
>> @@ -325,7 +325,7 @@ static void sigbus_reraise(void)
>>          sigaddset(&set, SIGBUS);
>>          pthread_sigmask(SIG_UNBLOCK, &set, NULL);
>>      }
>> -    perror("Failed to re-raise SIGBUS!\n");
>> +    perror("Failed to re-raise SIGBUS!");
>>      abort();
>>  }
> 
> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> 
>


Applied to my trivial-patches branch.

Thanks,
Laurent