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

RE: [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation


  • To: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiamei Xie <Jiamei.Xie@xxxxxxx>
  • Date: Thu, 7 Jul 2022 03:30:57 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=AS0SBTOWGJQLdu77eJQoj3EcSdOsUilKvSb+THZxMdc=; b=IErxdtLMXTdZF7rj2oc+ApmVEbeZFJZ0PV+oc6tfcddDUCPRx0v+crMBr73gvhh3BEx0hFs05t6tmCCMXO71UTtJiGkbtbUS4LwZ2rLDl264JrGw9rVqodWaBrQyWO62onnXWgxL49VPFGIHxGqDoWMM+9+ZTGL+QAwCsD+5+wMr4PwZ8amAfHS2eThCOj6k+8IAbJLrsBccXAiGoYLxg9CoXNl7xeZMD9hJS70AybAq/IMnx+hdEvVCe2Fh3UsN7TNhC5GPPcqOGXAofLBSQIyef2KsaYnj4F2OTjDM8ZXXK1LirB0Qp+V0QyYGmTuvoT/J2GmLgrnn5KzFgXxcPw==
  • 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=AS0SBTOWGJQLdu77eJQoj3EcSdOsUilKvSb+THZxMdc=; b=WJwvercPGJdRMBks4Goe3YnhqcqGWWtf4snQSvpPcnASeWGXup1FayUfBmfLLT5yLiMGCAvuSxAbaqryPPObwQM8e4Eck0HX7YjqTTNue0dsya6imv2sq7Xf0sG5KppceAu6YqVPHtPRDf7nGy4uTrSoi/+TzBmIeSI5PTC5xPwE19gk9H9TN1HrS0bJPvnqobwQjpVWtEb1ftIgPqQWhy+QoPkiByffXK613JuD/HFXt4Gt833QJHG2TykHM2CHngY33E3EwsMgo75ZVJPjiEQF9Woo6g02EHJbG0vGxAXKXUrZX2eZ3/u/cC/2KJNqihmJmuAEkDBrKMQBSysD0g==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=T+lZ6GTIMMfiqf82O6h4mC3CkUUkHY/TA/NNwzVrfUXjbJpxnky0ixHJnA/ptPmpbeI1ZQNyicsGf1LQVTzAvHkL1tjR85Ut0gbeYwmQPcjn5I3I4vW6rY5QhmDTysp82zueXDh/t3D8n2JawbG/lAaMBue0PWypQG6D70+ZdtxLZ2+bXuCEO8bsLxivcEfZGBmv2p+6agGYYMqyJEvElpsrOHNmd8Nc/N9cZu9M4JggLUig0JGF5a96wYFy66qEysnwqdPO9OQTJeNKyWv4XJU8ILoCmgTenffZSoAb6aq4sm/4cUiNk/UjbxoQd1+bpeSkqKBvjiEU4RxPizNoyQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AHxJgnpZKlSt+ZYN3NkTfyR/saV4yVDpslwT8NaRHEPbVSENA1YwOg2yWgn0xse7rAHsCcioPIU1crSk7V2NQelasd9cVHOATL9iUuRxLSUsBj5kYyv6ZOG9/ej7OtD1Iej/KQ6OR4QaRZbfOpScXdpES/lbFf2kVv8KC1P8ihb4JqeuBBpMvrcQj90l5a0bYcXdXJ5pnoUmbD83ICT32twi6evc6X4NnDrO++4reyS/tNFN/d8vJjjx1FQ3WkxIm2/DutYXf0k8Hgw9T6s2qoKvI8O5l8nse5Mam7sRdlZWYWvgA993AfC43gsTTu2xi0c4AM3Zd/C895xCmUf5VA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 07 Jul 2022 03:31:29 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYkWD/iwSB6pN2ukOyl9oTmyPHm61yPTaA
  • Thread-topic: [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation

Hi Xenia,

> -----Original Message-----
> From: Xen-devel <xen-devel-bounces@xxxxxxxxxxxxxxxxxxxx> On Behalf Of
> Xenia Ragiadakou
> Sent: Thursday, July 7, 2022 1:50 AM
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>; George Dunlap
> <george.dunlap@xxxxxxxxxx>; Jan Beulich <jbeulich@xxxxxxxx>; Julien Grall
> <julien@xxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>; Wei Liu
> <wl@xxxxxxx>
> Subject: [PATCH] xen/char: pv_console: Fix MISRA C 2012 Rule 2.1 violation
> 
> Remove the definition of the function pv_console_evtchn(),
> when CONFIG_XEN_GUEST is not set, because the function is not used.
> 
> Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
> ---
>  xen/include/xen/pv_console.h | 5 -----
>  1 file changed, 5 deletions(-)
> 
> diff --git a/xen/include/xen/pv_console.h b/xen/include/xen/pv_console.h
> index 4745f46f2d..55b20323fb 100644
> --- a/xen/include/xen/pv_console.h
> +++ b/xen/include/xen/pv_console.h
> @@ -19,11 +19,6 @@ static inline void
> pv_console_set_rx_handler(serial_rx_fn fn) { }
>  static inline void pv_console_init_postirq(void) { }
>  static inline void pv_console_puts(const char *buf, size_t nr) { }
>  static inline size_t pv_console_rx(struct cpu_user_regs *regs) { return 0; }
> -evtchn_port_t pv_console_evtchn(void)
> -{
> -    ASSERT_UNREACHABLE();
> -    return 0;
> -}
> 
>  #endif /* !CONFIG_XEN_GUEST */
>  #endif /* __XEN_PV_CONSOLE_H__ */
> --
> 2.34.1
> 

I have run it on arm64, booting Xen+Dom0 and starting few guests, connecting 
consoles. It all works fine.
Tested-by: Jiamei Xie <jiamei.xie@xxxxxxx>



 


Rackspace

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