From patchwork Fri Nov 11 13:26:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Klauser X-Patchwork-Id: 9423033 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 819A6601C0 for ; Fri, 11 Nov 2016 13:26:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7384829AE8 for ; Fri, 11 Nov 2016 13:26:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6810729AF0; Fri, 11 Nov 2016 13:26:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9ECD429AE8 for ; Fri, 11 Nov 2016 13:26:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756413AbcKKN0m (ORCPT ); Fri, 11 Nov 2016 08:26:42 -0500 Received: from mail.zhinst.com ([212.126.164.98]:56806 "EHLO mail.zhinst.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756358AbcKKN0m (ORCPT ); Fri, 11 Nov 2016 08:26:42 -0500 Received: from ziws08.zhinst.com ([10.42.0.7]) by mail.zhinst.com (Kerio Connect 9.1.1) with ESMTP; Fri, 11 Nov 2016 14:26:36 +0100 From: Tobias Klauser To: Stefan Hajnoczi , "Michael S. Tsirkin" , Jason Wang Cc: kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org Subject: [PATCH] vhost/vsock: Remove unused but set variable Date: Fri, 11 Nov 2016 14:26:31 +0100 Message-Id: <20161111132631.25708-1-tklauser@distanz.ch> X-Mailer: git-send-email 2.11.0.rc0.7.gbe5a750 MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove the unused but set variable vq in vhost_transport_send_pkt() to fix the following GCC warning when building with 'W=1': drivers/vhost/vsock.c:198:26: warning: variable ‘vq’ set but not used Signed-off-by: Tobias Klauser Reviewed-by: Stefan Hajnoczi --- drivers/vhost/vsock.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index e3b30ea9ece5..9c3c68b9a49e 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -195,7 +195,6 @@ static int vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) { struct vhost_vsock *vsock; - struct vhost_virtqueue *vq; int len = pkt->len; /* Find the vhost_vsock according to guest context id */ @@ -205,8 +204,6 @@ vhost_transport_send_pkt(struct virtio_vsock_pkt *pkt) return -ENODEV; } - vq = &vsock->vqs[VSOCK_VQ_RX]; - if (pkt->reply) atomic_inc(&vsock->queued_replies);