Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1553839ybl; Thu, 5 Dec 2019 03:20:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwLDQt5AAvEcrPpjn63lOonZGthKksjF3gmIXuMy2ItuFsDDA+gaLe7pxAB3LOJ4tVHBZ/u X-Received: by 2002:aca:c415:: with SMTP id u21mr6756992oif.49.1575544816669; Thu, 05 Dec 2019 03:20:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575544816; cv=none; d=google.com; s=arc-20160816; b=UOfZHT9MHZkZ/fcvGqb/W8JXfi2wJTAruDhFX5DdHey8d+dqccdzGYslnZ+FIfqrVy sfugJj9KHoCB8D8L7lZaOQjvpw777XySIXUfI3F9FmLRhJ11rH8Jy7jJcAHRp6al1RxH jQq4Tb2RiTVl3Jh6vnyHkCGMhvJhG/LsAr33t6tgPn21m2n1eoIx42WPPhRPHEk7Gv/S ZOmXBAgrQJK1cUEA/OVCD+xycNAZv/nfLPGSkaD4YtC08b5DHvUAT6BG5sJeZTEvaCfg 9xhgZSUxFtp44FOBwiSUBD29viY5RlA8SvykBy64PLuArZK2ycL5ewPTg/nMH2qo+SZC FQ/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=dO+WystgqFsPwD+ujzwk6/ao0nsBekcRebzU891lfyc=; b=TBW8VFNdaiTXM6afYgjiT5e6IriXQ7s5LGyjnM7h+i/dQUuRaSeXYdsgiOa+iVeibl d6wIskjYWt74w6PTI0a9TV59BUS0yYh2jW6oxfyCLyJrKImqIGcV0Tl29wgW5py7lQy8 QxuX9HLbuDq9m4A0V0f27HsQ4A7PVC8RZrTLPwS6d5EfvFdsW3pNk/lJLLQ+TTYC7YNr PNodqJIw6rddUED6fejn1srnSSmrwyKPzUXjzc3ltEBV+y4//X3nojtpJibGA91dITqK 9Skeq0H5f9Y3e5tKAz+6GM09tinBws7Aml7j4t/v098vqlCc6ycIYvUhchkKiQOEOZff y2og== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r132si4507399oig.263.2019.12.05.03.20.03; Thu, 05 Dec 2019 03:20:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729074AbfLELTc (ORCPT + 99 others); Thu, 5 Dec 2019 06:19:32 -0500 Received: from szxga06-in.huawei.com ([45.249.212.32]:47966 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729017AbfLELTc (ORCPT ); Thu, 5 Dec 2019 06:19:32 -0500 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 9B570BC9944553746866; Thu, 5 Dec 2019 19:19:28 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.439.0; Thu, 5 Dec 2019 19:19:19 +0800 From: Hongbo Yao To: , , CC: , , Subject: [PATCH] misc: genwqe: fix compile warnings Date: Thu, 5 Dec 2019 19:16:55 +0800 Message-ID: <20191205111655.170382-1-yaohongbo@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using the following command will get compile warnings: make W=1 drivers/misc/genwqe/card_ddcb.o ARCH=x86_64 drivers/misc/genwqe/card_ddcb.c: In function setup_ddcb_queue: drivers/misc/genwqe/card_ddcb.c:1024:6: warning: variable rc set but not used [-Wunused-but-set-variable] drivers/misc/genwqe/card_ddcb.c: In function genwqe_card_thread: drivers/misc/genwqe/card_ddcb.c:1190:23: warning: variable rc set but not used [-Wunused-but-set-variable] Reported-by: Hulk Robot Signed-off-by: Hongbo Yao --- drivers/misc/genwqe/card_ddcb.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/genwqe/card_ddcb.c b/drivers/misc/genwqe/card_ddcb.c index 026c6ca24540..905106579935 100644 --- a/drivers/misc/genwqe/card_ddcb.c +++ b/drivers/misc/genwqe/card_ddcb.c @@ -1084,7 +1084,7 @@ static int setup_ddcb_queue(struct genwqe_dev *cd, struct ddcb_queue *queue) queue->ddcb_daddr); queue->ddcb_vaddr = NULL; queue->ddcb_daddr = 0ull; - return -ENODEV; + return rc; } @@ -1179,7 +1179,7 @@ static irqreturn_t genwqe_vf_isr(int irq, void *dev_id) */ static int genwqe_card_thread(void *data) { - int should_stop = 0, rc = 0; + int should_stop = 0; struct genwqe_dev *cd = (struct genwqe_dev *)data; while (!kthread_should_stop()) { @@ -1187,12 +1187,12 @@ static int genwqe_card_thread(void *data) genwqe_check_ddcb_queue(cd, &cd->queue); if (GENWQE_POLLING_ENABLED) { - rc = wait_event_interruptible_timeout( + wait_event_interruptible_timeout( cd->queue_waitq, genwqe_ddcbs_in_flight(cd) || (should_stop = kthread_should_stop()), 1); } else { - rc = wait_event_interruptible_timeout( + wait_event_interruptible_timeout( cd->queue_waitq, genwqe_next_ddcb_ready(cd) || (should_stop = kthread_should_stop()), HZ); -- 2.20.1