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

Re: [PATCH] xen: Remove the use of K&R functions


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 17 Feb 2023 08:29:07 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; 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=wBqs4R9eKENvrHqWiCYRWjtxO1AdlHPNBVD2Vuf3rUg=; b=S4X3s/xm/guLlsQRPY1tjaVnfQcS9ILVhx3ilx7jBA147V0GDEO29wSPFIccu/W9lsInqhCWdJfnFrUXUQvozLQG7O5NNSkJzuJhZ2HrbNL2wMpa7m45Ng3ViYE690QYm9DqLEtyc+I916rYRJYccvL5iVLYhXf0e+eWfssbPR9HYIYV5bQKyLweMB9frDLOnsVaHN1J7kFijZw+TtlzOpXQcci3dgBVtBr/LAC7Ge/NN+Uv+Nf3pteoI7DAe9tozPQ5Oa1XhUrSBlWHND3fo1zIpQDuSIAfN2Md6t2MUrFKja+KJow6vdOZ0HFlNSSvL1v9+2zWkFa/7vuOSuTK1w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NAVIGJmDJCIyGngK+KAS+UZCyciUdSwk28TqPJfRaagE5gvVoasmxLDJoD6dG0tYZDZqSUeH7wAtSI7fdR5pGqjmmlYCqHenrTBg3hoAGYf7WuGGh/CFhepIwChPvR91U9ej0ZOwrT6DD6WDyWolrhPpuzSO3sY+xEea3dSUH5Co9fI4h6U0abBvNhZ4EdAuaalSVDvltoBmZE/hH8LnDA1396FwxW+CBzlKl1Xy7Qh69/JtJN3Wc0GndOWqbcbj67Rac+aqTgxHFZOTYbyh3kgtq1eA3XQtGxnzVyCHl7SMJ5jK3vaOVQIKMAVa0LQ2pQ0A/NZP400VPk+pduF22Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 17 Feb 2023 07:29:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.02.2023 00:17, Andrew Cooper wrote:
> On 16/02/2023 11:02 pm, Andrew Cooper wrote:
>> On 16/02/2023 10:44 pm, Andrew Cooper wrote:
>>> Clang-15 (as seen in the FreeBSD 14 tests) complains:
>>>
>>>   arch/x86/time.c:1364:20: error: a function declaration without a
>>>   prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
>>>   s_time_t get_s_time()
>>>                      ^
>>>                       void
>>>
>>> The error message is a bit confusing but appears to new as part of
>>> -Wdeprecated-non-prototype which is part of supporting C2x which formally
>>> removes K&R syntax.
>>>
>>> Either way, fix the offending functions.
>>>
>>> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>>> ---
>>> CC: Jan Beulich <JBeulich@xxxxxxxx>
>>> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>>> CC: Wei Liu <wl@xxxxxxx>
>>>
>>> These are all the examples found in a default build of Xen.  I'm still 
>>> finding
>>> toolstack violations.
>> Apparently not.  int cf_check vmx_cpu_up() too.
> 
> Ok, finally got a clean Clang-15 build.  I've folded this hunk into the
> patch:
> 
> diff --git a/xen/arch/x86/hvm/vmx/vmcs.c b/xen/arch/x86/hvm/vmx/vmcs.c
> index 09edbd23b399..e1c268789e7e 100644
> --- a/xen/arch/x86/hvm/vmx/vmcs.c
> +++ b/xen/arch/x86/hvm/vmx/vmcs.c
> @@ -781,7 +781,7 @@ static int _vmx_cpu_up(bool bsp)
>      return 0;
>  }
>  
> -int cf_check vmx_cpu_up()
> +int cf_check vmx_cpu_up(void)
>  {
>      return _vmx_cpu_up(false);
>  }
> 
> 
> but am not intending to send a v2 given how trivial it is.

Sure.

Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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