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

Re: [XEN PATCH 10/11] xen/sched: add ASSERT_UNREACHABLE() to address MISRA C:2012 Rule 2.1


  • To: Nicola Vetrini <nicola.vetrini@xxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 3 Aug 2023 11:17:45 +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=enfIGUhhvDBmZOOL1jGIxqtRs6Basm68Vb70YeM5t5A=; b=BQsl7swxVwQzPZGumSXYsDKiLW9+J8emC5bFkyR20VhCSMSRYjYhoHfdwrxG8sNETGmXrfzZRCul7PIZHgVDkMCao8tJPbT1J+Ti535JxQBNopewz3/orf5PUivzHvnu6aV/S4SR9XnjOExKd51FWwtquQL4r2ahsYw8pf7LHQPv6pJU+qS6qa/939Q68RaiWSmxjdKiZsGfTI7I0m9IV/P+h2O6MXwgOQvl43OO9ziIvr9WoRQHxQ8R/d8M3yz3L9XMdgltVvtMbsDkLjyYY0CsHTumHVEJ5ylJpwQ15QwyqGrDc/oJ4SCs1OkgkHycT/dbRWCyaTZQao9BKK6tPw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BfSmX5lDI7WU/+3s1fMwFAoK5fwYkUGS0BRfQaenDQlNYtg5eQrrr8uo2WYVrnP9Zm2wSL/v/Xt0uR8etWl07An1v9c7IBoMSelrfo5KrkGeJw5+g5OJYeLcq1JH/wbR970ZIU1p/nwsynAV3udkgm2PaTfXje4D2C7D3NfbGjxK3GZy0TncJclhNrwMLZDY67I0SGy7NqDAgsTnh4RPWGluVsannN2Ychzutzh0nrx66OhT9CMLXrW6oLIoIa3ZmbUSU38fomtBDbLSyWNcSVXYctJq7tajzUCahpTaD7BAZ1fPexqpIGhZBRKPAQ2MR6mlPy2aWnGX0zpm35w/Dw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: sstabellini@xxxxxxxxxx, michal.orzel@xxxxxxx, xenia.ragiadakou@xxxxxxx, ayan.kumar.halder@xxxxxxx, consulting@xxxxxxxxxxx, George Dunlap <george.dunlap@xxxxxxxxxx>, Dario Faggioli <dfaggioli@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 03 Aug 2023 09:17:54 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 02.08.2023 16:38, Nicola Vetrini wrote:
> --- a/xen/common/sched/core.c
> +++ b/xen/common/sched/core.c
> @@ -2233,6 +2233,7 @@ static bool sched_tasklet_check_cpu(unsigned int cpu)
>          /* fallthrough */
>      case TASKLET_enqueued|TASKLET_scheduled:
>          return true;
> +        ASSERT_UNREACHABLE();
>          break;

What use is "break" after "return"? IOW rather than adding code here,
imo a line wants removing.

Jan



 


Rackspace

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