[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] xen: Append a newline character to panic() where missing


  • To: Julien Grall <julien@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Wed, 14 Jun 2023 11:06:01 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=STYl5yEiI795xS/21poxsmL38Aumxeui2Ad5+dtqIXQ=; b=XgR/UnxB0+kp95Oo7p4hGo985w5BfgU/nbwQBk69x0rE3+AgjmcFUS1Go4eQKSwvj9rySZh52yE5jl7QEpOg3EbNCDHU85zFHEvdjr2LWHRFKeba33UY6BXbSvIQcpJlJfxfZMV7OBvfQP8VDH4xx5UuwvIs+W0py0XaZ1oyV4xux0ctEnhcXqXLTdd7cQAteNsNYqCLCJabRv3o4MhFXpKhGBQfCj4DRKYhVOAD5cUF0qagKp8RvfL/Nh8z2hcMV1js7qGz+qHI7IpPwrmLNHDfznt56s2wqPsjqsuYVp2wctvV9B5HTKgwzEx16EmuUNpHIPC/BbeEQ3ZTorb4Dg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bM4fc+MXfdyWgIAJWJWwlKEzNJy6pGJ75Gtj42xDtEq2erTZTCKpepMobh264yxEat/CHLlcvf6AXXRlPyYdYb4LDdYpsh7qQ/WtXQdUo4yL/beVAMhqyI/o5P5Vhgkdr3WH0MrEmAdXGrUZLUEzABBQftBKLWsz7iMs3kYty4o+K64MgGvbnzBC8+oLf0DKwpF1p9I7W2v8rZhT3rIpixoimmEV7Vn5Xt0L+wz1CzUWa4KrlvZtOndpj58sfX6qwtF/y6WPMjbTFr97ZwAW/TYAEXbujx/foe61zr7arSVlhmwYtWSzOmYRsWN0SxbAllf0vDCse6tRxvf1eEXAOA==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Wed, 14 Jun 2023 09:06:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 14/06/2023 11:02, Julien Grall wrote:
> 
> 
> On 14/06/2023 09:09, Michal Orzel wrote:
>>
>>
>> On 14/06/2023 10:04, Andrew Cooper wrote:
>>>
>>>
>>> On 14/06/2023 8:30 am, Michal Orzel wrote:
>>>> Missing newline is inconsistent with the rest of the callers, since
>>>> panic() expects it.
>>>>
>>>> Signed-off-by: Michal Orzel <michal.orzel@xxxxxxx>
>>>
>>> Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>>
>>> although...
>>>
>>>> ---
>>>>   xen/arch/arm/bootfdt.c            | 2 +-
>>>>   xen/arch/arm/domain_build.c       | 6 +++---
>>>>   xen/arch/x86/cpu/microcode/core.c | 2 +-
>>>>   3 files changed, 5 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c
>>>> index b6f92a174f5f..2673ad17a1e1 100644
>>>> --- a/xen/arch/arm/bootfdt.c
>>>> +++ b/xen/arch/arm/bootfdt.c
>>>> @@ -225,7 +225,7 @@ static int __init process_reserved_memory_node(const 
>>>> void *fdt, int node,
>>>>                                    size_cells, data);
>>>>
>>>>       if ( rc == -ENOSPC )
>>>> -        panic("Max number of supported reserved-memory regions reached.");
>>>> +        panic("Max number of supported reserved-memory regions 
>>>> reached.\n");
>>>
>>> Trailing punctuation like . or ! is useless.  Most messages don't have
>>> them, and it just takes up space in .rodata, the console ring, and time
>>> on the UART.
>>>
>>> I'd recommend dropping the ones you modify, and/or cleaning it up more
>>> widely.
>> I will keep in mind to do that in global scope in the next patch.
>> We also have quite a lot of printk() with trailing punctuation.
> 
> This is quite a bit of churn and I am unconvinced this is necessary.
> Also, if the others want such style, then this should be agreed on in
> the CODING_STYLE first. Otherwise, I am afraid this is not something I
> will enforce because I see limited value.
> 
I then suggest to take this patch as is if you are also happy with it like 
others.

~Michal



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.