From patchwork Mon Oct 7 14:16:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Federico Serafini X-Patchwork-Id: 13824788 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 449D7CFB43F for ; Mon, 7 Oct 2024 14:29:50 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.812107.1224831 (Exim 4.92) (envelope-from ) id 1sxojy-00056T-Tf; Mon, 07 Oct 2024 14:29:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 812107.1224831; Mon, 07 Oct 2024 14:29:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sxojy-00055m-Qj; Mon, 07 Oct 2024 14:29:38 +0000 Received: by outflank-mailman (input) for mailman id 812107; Mon, 07 Oct 2024 14:29:37 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sxoXO-0002dC-IW for xen-devel@lists.xenproject.org; Mon, 07 Oct 2024 14:16:38 +0000 Received: from support.bugseng.com (mail.bugseng.com [162.55.131.47]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id c2f69c14-84b6-11ef-99a2-01e77a169b0f; Mon, 07 Oct 2024 16:16:36 +0200 (CEST) Received: from truciolo.bugseng.com (unknown [37.162.58.49]) by support.bugseng.com (Postfix) with ESMTPSA id 67D704EE0746; Mon, 7 Oct 2024 16:16:35 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c2f69c14-84b6-11ef-99a2-01e77a169b0f DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bugseng.com; s=mail; t=1728310596; bh=E7dB2FCofs9MFp7zihxh1wxnARDyNN7WgWI2FwQOK0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xVPGjM9WjmZpi8GG7K9MaKDBHZwteFI3oEC0yibwshSbIA5MxmazJ2nlmAPH8z8XV ydBaf+FQ3AAfT6hfAwEp+ksKFO0j3UVtrKrGnAda5JHB1CZ95YQ3HUS/3Q1OZ2nTxQ H8syHKDPHxjy1fQyO5r4zkGDoCtrIXjXLuLv8lw5Kczd1hIT4IKijqL9g9v9qI11gI +qEtVlpB+dKouWU80A4wXuR4lR6tr4lT2lzuSLkIu6ghEwCTary4FKkxx9+cdLJx3x CXMSp0RmQwR08y0eiH6H9A5HEKEw+OjqeWqpyEo39l4OUfYP5eQLpvAWdO2oIA/i1I 0gH2S1Owz3nLA== From: Federico Serafini To: xen-devel@lists.xenproject.org Cc: consulting@bugseng.com, Federico Serafini , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Stefano Stabellini Subject: [XEN PATCH v2 3/4] xen/vpci: address violations of MISRA C Rule 16.3 Date: Mon, 7 Oct 2024 16:16:18 +0200 Message-ID: X-Mailer: git-send-email 2.43.0 In-Reply-To: References: MIME-Version: 1.0 Address violations of MISRA C:2012 Rule 16.3: "An unconditional `break' statement shall terminate every switch-clause". No functional change. Signed-off-by: Federico Serafini Acked-by: Roger Pau Monné --- Changes from v2: - simply break without returning X86EMUL_UNHANDLEABLE. As pointed out by Jan, these functions only return X86EMUL_OKAY but: https://lists.xenproject.org/archives/html/xen-devel/2024-09/msg00727.html Do you have any comments? --- xen/drivers/vpci/msix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/drivers/vpci/msix.c b/xen/drivers/vpci/msix.c index fbe710ab92..5bb4444ce2 100644 --- a/xen/drivers/vpci/msix.c +++ b/xen/drivers/vpci/msix.c @@ -364,6 +364,7 @@ static int adjacent_read(const struct domain *d, const struct vpci_msix *msix, default: ASSERT_UNREACHABLE(); + break; } spin_unlock(&vpci->lock); @@ -512,6 +513,7 @@ static int adjacent_write(const struct domain *d, const struct vpci_msix *msix, default: ASSERT_UNREACHABLE(); + break; } spin_unlock(&vpci->lock);