Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3550641pxp; Tue, 8 Mar 2022 17:13:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcAXOuni9l8VFE/JA2W9/2RCKTPP/W4v3i/fEedZS3O3S6GQu5mbZz3QO2ODGFmPf9Kdkm X-Received: by 2002:a17:902:f545:b0:151:fa7a:7d57 with SMTP id h5-20020a170902f54500b00151fa7a7d57mr7674978plf.62.1646788416081; Tue, 08 Mar 2022 17:13:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646788416; cv=none; d=google.com; s=arc-20160816; b=fgmCMyy1FLmyRI0N8kqunYtqLQVdqCIXLgLpnFu78WpNuvtoW3iavhDEMrsey6DnZs a0s7CL+V49W19GmBEON1nSzjwJZ9BDTWhqzmZbY/6e1iIKRNshcXHdugeOm705xfFwH0 nzq3VQmXQhPXykToxKwa/ejRNGekmLL/93wWwdM4sD8beZJOSHAnPoWK+wEbxEl9mV45 MM1/OfeNtnRi5rZAHdUTtV1mC3n9qcfHWyUI9tb2wyzzLSv6du25t+YuDCJJNEU6XVG4 lp4BmaTU5dCfRLrmPE1nktkhPLhz89fBU8ReYfLNd/NZvaWa//PdqQ44rMmoPyZChjyA x6wA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=R4SzGHB4EMoH0TucRLXDeINInbLU9vXmVDJwZiRxHtU=; b=FoQQ35aP+7VZalTJvUApa9ktucWML558Hw/Wiw9ttuXSphgSSiQKhCPKSgIUXRmDbq 7Hyg8bvq1JnF7HUvxeJOWT86TsjWFU/dGqd5hZh9aTcyTMOM00oprxGpSJEcPksjmTXk VnR/LjjsZm4aFdRS4dRHPlvQ7V7N7bfkzbahgKfF/EVpR7gcm/sa2fY+kYA5po1o2s2d m5x8wOMB3/FnzJQa3w3fCYKsix6ToIDudoeCiV5GER5B+eTg02qb/thPeKnY2/F4Yb0i zynFHM546017SU4HwarSXhtU0p82NI4BXYGQP1bEvczx0EzcY5li9/UxW7TVYdCDoqSO NN+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mVFXmd5i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id t191-20020a6378c8000000b00378dbeea808si412703pgc.124.2022.03.08.17.13.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 17:13:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mVFXmd5i; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6C43B1C0254; Tue, 8 Mar 2022 16:21:46 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244559AbiCGRzb (ORCPT + 99 others); Mon, 7 Mar 2022 12:55:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244269AbiCGRz2 (ORCPT ); Mon, 7 Mar 2022 12:55:28 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 592E26FA18 for ; Mon, 7 Mar 2022 09:54:34 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id C2FCCCE0EDB for ; Mon, 7 Mar 2022 17:54:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C82ECC340F6; Mon, 7 Mar 2022 17:54:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646675671; bh=skJXL8/N2xCsgKAp+CXm32RgRJoIRM8CbDaIsqyS5+A=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=mVFXmd5iXoXH64fcOXo1x8kyRaopJJw7P0/ydyBOtJiC4KItvqq3AicpSs44vn1R1 0hM+MVkZk3BWyZIrzK0QLlWxeI6+8y27fhD63zmOfJk2Z8yrsXoEAm2W53wQmoteGE e20cUSpUPPMvyySRtwRZS2NoBcxsIJbPB8G6IY2NNe6VW4rtq5SrVSoarx0Fy3W3LP YGMaVIkxneeBXxN+M3tq+/BsAanyhmbsfaxP2a9xw2+bX7YhTQVIy9CyDsiPfJh1Cr CUzPiFXLrPGY+blvo1zyWmq4IumfSEMLfUB4f69QbIqyUeRyLkNd8g8HBCmIta1EwG Y96HaS1kd3SMg== Date: Mon, 7 Mar 2022 10:54:24 -0700 From: Nathan Chancellor To: trix@redhat.com Cc: mst@redhat.com, jasowang@redhat.com, ndesaulniers@google.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH] virtio_ring: Initialize vring_size_in_bytes Message-ID: References: <20220307174916.892433-1-trix@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220307174916.892433-1-trix@redhat.com> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 07, 2022 at 09:49:16AM -0800, trix@redhat.com wrote: > From: Tom Rix > > On the clang build, there is this error > virtio_ring.c:1772:26: error: variable 'ring_size_in_bytes' > is uninitialized when used here > vring_free_queue(vdev, ring_size_in_bytes, > ^~~~~~~~~~~~~~~~~~ > > ring_dma_addr was intialized twice, once with the ring_size_in_bytes. > value. So fix typo. > > Signed-off-by: Tom Rix I was getting ready to send the same patch. Reviewed-by: Nathan Chancellor > --- > drivers/virtio/virtio_ring.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index 905c882600618..b2b567ebb9120 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -1756,7 +1756,7 @@ static void vring_free_vring_packed(struct vring_packed *vring, > ring = vring->ring; > driver = vring->driver; > device = vring->device; > - ring_dma_addr = vring->ring_size_in_bytes; > + ring_size_in_bytes = vring->ring_size_in_bytes; > event_size_in_bytes = vring->event_size_in_bytes; > ring_dma_addr = vring->ring_dma_addr; > driver_event_dma_addr = vring->driver_event_dma_addr; > -- > 2.26.3 > >