From patchwork Mon Jul 13 14:10:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 235413 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2882298ilg; Mon, 13 Jul 2020 07:19:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNnd2YI3gPQcn9gZIuHfaIyZZQGR1MorPJ4kxXoDaqHaMJU1wecXqRazABxPzKzYVEiWyN X-Received: by 2002:a25:ae01:: with SMTP id a1mr303162ybj.119.1594649947910; Mon, 13 Jul 2020 07:19:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594649947; cv=none; d=google.com; s=arc-20160816; b=zDa1r9YT4zrYF40OdbGEMJRM0RgdS3kpkuCPxtjdy3hCYfuY0DGx/uq3jao5amufdt Bt+KZ8YsE4smPxa2J0xsT/LBfZ9j/KNqOdd3nrPur6lm7ou5HJI9GY3JRz36HXEVAaag 40no8c0X2eXf+9JtL02lBxqKz7nFiyvSRzfqaDd02gj3xfw2xDzDHKOJA5eY8Uw0RNBa Q5dHK4+yjS33YABlbSsf4uaC+ELg6nCJeLRzvzyL0F7dWMjgwOQro5QIeA73qgBcKi/E XeKQEdOVzKV+NGbm2icpkwzF8K4Zh2GikOp2jsBaNifJ8WV9QdqjZZTVxBhH15+q3q+8 0hIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=aypUxU7C2gYLlTPZ8asdzkNfN+z6lUCzbwNisQbIlr4=; b=ZSFRV98W2JJD/1OnFTELYV1+W6cJOQStgcq6i9oluPeuwO5L3doyui+hzsm6CPUuDR /bdVpWaM10sZT25gmnTBiGFRKMnenTJLB+feLCXuC30o0Q+ef07nx+ajSepHsBtSvOrP B5+S4+sXukPeEiz44DikxJJJtOzOQLGCQdDTxAhdtJnLvYxnsN7S2mxhA2+JpaThomtO yfV4vdxoc4aMWJ864E0opJGqeJUsrnmGHlXmjso5EXppI5Jy6P1jJvD66xkxLp6iLLAZ BmT1n+zXbQHlrBO98UFnUMpBkYsZNTtdkGnPcmWuCWKlAhlWvRNPNUc3h4q1ijqisX4M 4D4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g6CBjEWZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id k23si13784291ybk.162.2020.07.13.07.19.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Jul 2020 07:19:07 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=g6CBjEWZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:51548 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juzIR-0001Wm-C9 for patch@linaro.org; Mon, 13 Jul 2020 10:19:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1juzAs-00055d-9P for qemu-devel@nongnu.org; Mon, 13 Jul 2020 10:11:18 -0400 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]:38397) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1juzAq-0006co-Gu for qemu-devel@nongnu.org; Mon, 13 Jul 2020 10:11:17 -0400 Received: by mail-wm1-x330.google.com with SMTP id f18so13313836wml.3 for ; Mon, 13 Jul 2020 07:11:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=aypUxU7C2gYLlTPZ8asdzkNfN+z6lUCzbwNisQbIlr4=; b=g6CBjEWZi3idyWARMDdSRQbdouAMNIEAOGeNx8OJ27gxIdaO6ezZxtyoZ5W/GzwKH5 E3tFXlEFGPOjx9X9YhorEkYTpCGWKb+ecT4jhc5wQquqUG1L2VlMyIH+7BPe4s2uHvYp XBwKTFFM4BWG+ncBJoli1RFWNDSWiesETIxeqlUTZt3WexW8PCGUsjxl1vOLpebSc22x bOtDi6oZhk3/O02tdrUkfh2T9dtAtYrbLAo3hf4xSgq6FYtGbYgQii3Y7kx/eFyRR3IZ NS6AzrtzIMUilItYMHfbT53czYcBWHGlFDyO/8y8LjQjy0LWBwYCqDaUiZv3qlRgC4/k gWJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aypUxU7C2gYLlTPZ8asdzkNfN+z6lUCzbwNisQbIlr4=; b=LVt50HUDAJU/1sIKvvNHhcALSAIFsYaEldVKGMCElltvgHAqQCru6tEVAfooYchaka TWx2ROaHtN6Tjz2YXa2rWmVkTpNFBdkg1q35wXXxml+w1FUpFE508yfzJk5x1X0HYvgy DUDKL6r8tSI8JtYAIAO5tQhmdWijvP0WQttNeNthYanYpN7jMA/eseaH6z8r0VvEQLXy vqdN6lisEeDk0FpMafc8ock4BP9skBUnhVTHiE7WmDFJZhcjOq4mtj3tSvYZw2oKme7x COfwOj0yV4nD43OI3RXvCKV6pCzikGFimtVVvwiozD8L9+HElIrJAbHFVN4aD43j9DMy 0SIg== X-Gm-Message-State: AOAM533OSw1srHFZzCui/zmCctdhgHFJsKx536GjBnEs1StG72FYWj9D VdtCWCHXI+ToV0CKXxrvIjZZ20jKy3yzDw== X-Received: by 2002:a1c:ba08:: with SMTP id k8mr182121wmf.28.1594649474583; Mon, 13 Jul 2020 07:11:14 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id c136sm24031297wmd.10.2020.07.13.07.11.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 07:11:13 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/25] virtio-iommu: Fix coverity issue in virtio_iommu_handle_command() Date: Mon, 13 Jul 2020 15:10:46 +0100 Message-Id: <20200713141104.5139-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200713141104.5139-1-peter.maydell@linaro.org> References: <20200713141104.5139-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Eric Auger Coverity points out (CID 1430180) that the new case is missing break or a /* fallthrough */ comment. Break is the right thing to do as in that case, tail is not used. Fixes 1733eebb9e ("virtio-iommu: Implement RESV_MEM probe request") Signed-off-by: Eric Auger Reported-by: Peter Maydell Message-id: 20200708160147.18426-1-eric.auger@redhat.com Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/virtio/virtio-iommu.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/hw/virtio/virtio-iommu.c b/hw/virtio/virtio-iommu.c index b39e836181e..5d56865e569 100644 --- a/hw/virtio/virtio-iommu.c +++ b/hw/virtio/virtio-iommu.c @@ -534,6 +534,7 @@ static void virtio_iommu_handle_command(VirtIODevice *vdev, VirtQueue *vq) ptail = (struct virtio_iommu_req_tail *) (buf + s->config.probe_size); ptail->status = virtio_iommu_handle_probe(s, iov, iov_cnt, buf); + break; } default: tail.status = VIRTIO_IOMMU_S_UNSUPP;