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

Re: [XEN PATCH] xen/emul-i8254: address a violation of MISRA C:2012 Rule 8.3


  • To: Federico Serafini <federico.serafini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 22 Sep 2023 10:29:09 +0200
  • 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=qbz9ElN/mDGzWPVcjYZpu8p/NaR/gc34RAT5U5elxLw=; b=aWC0+lehC1lxtyM4gbDC8la7Pqqp+RNi1QyBb8nl5YxHVq+a4s5ypAiTNkrsjcl5KbxEuDrhnyX3sKQt2bhEx/DJbYtV3q+AOW/7Amtqjy9R3lMTb5EFr9PlHUH1V0BUY+QpqgduRV94jPjHCvfWnoRkR2sZ1T4ubN4X8DxqBLfe92FlxrnxctRNVMMIOnZPMfHzUx7YVD3HXhICc12otU5xTqjiADtWqMrilsuyDb5umZrZ6T4qM59wV9LFOoWbG1mGAVe6aN+DmonlIcctkJq2gkI2tdWkvu1Waquyhr9sE3o7zxnNxf/ZcAaAKBJW9TYNkvzO7M35gy9HLLPFiA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m6/wFs7EovzFkriHC48sLYniip3PBA0w3QwA/t/Q0qyS0z1ILw23n/CmZRCXHgRIavran/kl+/De168v3ak/05uPilZ7hd8atCvlyac8Vmdp2IFgkb7k4WO2RJNVqsSd88zzwUbEQ/G11O7dUUacIBWR7OS56jUrnp+dK+/bU2YC2zFEirq+KvJgOrA2KhED5rErINPlaiRP2kDsf9EuizaO6FpmJ5yK6hjJeUT0WD0MIZcvOrb4UAW43VPgXWMSknvYHMHsFjoFSCPltq0POe7M2JN9S0+OPJmz/7+zDDVAfSSiaj9vwF424hgCcUM4l4YY5wQ4r7X4CTN38Iy+Zg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: consulting@xxxxxxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 22 Sep 2023 08:29:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 21.09.2023 17:05, Federico Serafini wrote:
> Make function declaration and definition consistent.
> No fuctional change.
> 
> Signed-off-by: Federico Serafini <federico.serafini@xxxxxxxxxxx>
> ---
>  xen/arch/x86/emul-i8254.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/arch/x86/emul-i8254.c b/xen/arch/x86/emul-i8254.c
> index 41ec4a1ef1..c48a3606a2 100644
> --- a/xen/arch/x86/emul-i8254.c
> +++ b/xen/arch/x86/emul-i8254.c
> @@ -572,7 +572,7 @@ static uint32_t speaker_ioport_read(
>  }
>  
>  static int cf_check handle_speaker_io(
> -    int dir, unsigned int port, uint32_t bytes, uint32_t *val)
> +    int dir, unsigned int port, unsigned int bytes, uint32_t *val)
>  {
>      struct PITState *vpit = vcpu_vpit(current);
>  

While okay-ish, could I talk you into addressing the problem at its root,
by eliminating the two forward declarations? Afaict all it takes is to
move pit_init() down past the two functions it takes the address of. (Of
course at that point it may want considering whether to keep
pit_{,de}init() and pit_reset() close together.)

Jan



 


Rackspace

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