Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 19631C433DF for ; Wed, 29 Jul 2020 15:49:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F38C1207E8 for ; Wed, 29 Jul 2020 15:49:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727098AbgG2PtX (ORCPT ); Wed, 29 Jul 2020 11:49:23 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:8294 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726365AbgG2PtX (ORCPT ); Wed, 29 Jul 2020 11:49:23 -0400 Received: from DGGEMS403-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 947B91F0596D060985ED; Wed, 29 Jul 2020 23:49:20 +0800 (CST) Received: from kernelci-master.huawei.com (10.175.101.6) by DGGEMS403-HUB.china.huawei.com (10.3.19.203) with Microsoft SMTP Server id 14.3.487.0; Wed, 29 Jul 2020 23:49:13 +0800 From: Wei Yongjun To: Hulk Robot , Oded Gabbay , "Arnd Bergmann" , Greg Kroah-Hartman , Sumit Semwal , =?UTF-8?q?Christian=20K=C3=B6nig?= , Omer Shpigelman , "Tomer Tayar" , Ofir Bitton CC: Wei Yongjun , , , Subject: [PATCH -next] habanalabs: remove unused but set variable 'ctx_asid' Date: Wed, 29 Jul 2020 23:59:02 +0800 Message-ID: <20200729155902.33976-1-weiyongjun1@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.175.101.6] X-CFilter-Loop: Reflected Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Gcc report warning as follows: drivers/misc/habanalabs/common/command_submission.c:373:6: warning: variable 'ctx_asid' set but not used [-Wunused-but-set-variable] 373 | int ctx_asid, rc; | ^~~~~~~~ This variable is not used in function cs_timedout(), this commit remove it to fix the warning. Reported-by: Hulk Robot Signed-off-by: Wei Yongjun --- .../misc/habanalabs/common/command_submission.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/misc/habanalabs/common/command_submission.c b/drivers/misc/habanalabs/common/command_submission.c index e096532c0e48..b9840e368eb5 100644 --- a/drivers/misc/habanalabs/common/command_submission.c +++ b/drivers/misc/habanalabs/common/command_submission.c @@ -370,7 +370,7 @@ static void cs_do_release(struct kref *ref) static void cs_timedout(struct work_struct *work) { struct hl_device *hdev; - int ctx_asid, rc; + int rc; struct hl_cs *cs = container_of(work, struct hl_cs, work_tdr.work); rc = cs_get_unless_zero(cs); @@ -386,7 +386,6 @@ static void cs_timedout(struct work_struct *work) cs->timedout = true; hdev = cs->ctx->hdev; - ctx_asid = cs->ctx->asid; dev_err(hdev->dev, "Command submission %llu has not finished in time!\n",