Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3393099ima; Tue, 23 Oct 2018 05:19:58 -0700 (PDT) X-Google-Smtp-Source: ACcGV62CR0viGlNeJUvoi9jIDiKlDq9y0M84UIPtCfPlob2DwfNxROn0LIf1BUBBKaDbw2IJ4Raz X-Received: by 2002:aa7:88c2:: with SMTP id p2-v6mr41998838pfo.32.1540297198495; Tue, 23 Oct 2018 05:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540297198; cv=none; d=google.com; s=arc-20160816; b=iVwLl5jdAyEfv5Z1Nw+RuKz+qii73KLfuEoiFy1SKObCdyR+Idg6GxKX0Vkb/lPG0n Pqno6CA7b1C92cWFUDUJXELlilojV4Gibsa2oorzNCpMCfmwnpAJhrlLSEfQ6Nr2t1rK XEY6Nwznfa8Wl4OrE7K4wVm8gTXnPkheY1DqQUeXZLFpndnsPcB/CnhdpTOxAKxfAB2b LRP2uvfkdnp6kv/aTbLRgivRczHXdhI2hA5tiIyDBhb06Nsg9cRuTy1QgYbkMh3LLW1L xL2cXzSXO8+f4Ur8K8f1fMG4pU+1deRyCEwfpznmqa6vBV7pePRxYfeUMpPOXFtBbCE1 4sUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from; bh=cBiE6ZsHeVNjmP1HVT6JzN1jGmMFBliRgqFdE3EqOSM=; b=CKrkG8qnVNkZpInapoM0MuLJW/CbNn3+ZAomCIMRDz7NqNs/Gj8cxv9CZCnmkgK7Rv lwbuMy28gD2pVbiPkitYU8aijn+KNmrE5rocCGh1iKBZO2uXZbwUdIuUXWTNjYFabIX3 c4n9q7xEMRYN8DxA9MVfIQC4hWkpoAJh9vW3DMdngH4pVuQwhLitR1TFD/9c/UbCGDBv DkxPoNjDRZc0CF0/E1AG+paUOpZfyBJj16scwNo5dT3VLSdzBKl+sxztejmtzJm+o/VA 944wqNG6b+aT1C5SZYfi1DJQeWa7D3z6IK+tBMcv4KusC3baQhNsDFEi1vzly1c5IHdy 8wow== 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 q188-v6si853535pfb.132.2018.10.23.05.19.42; Tue, 23 Oct 2018 05:19:58 -0700 (PDT) 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 S1727758AbeJWUme (ORCPT + 99 others); Tue, 23 Oct 2018 16:42:34 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:13684 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726277AbeJWUme (ORCPT ); Tue, 23 Oct 2018 16:42:34 -0400 Received: from DGGEMS411-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id C1D288ACC333B; Tue, 23 Oct 2018 20:19:15 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS411-HUB.china.huawei.com (10.3.19.211) with Microsoft SMTP Server id 14.3.408.0; Tue, 23 Oct 2018 20:19:15 +0800 From: zhong jiang To: , CC: Subject: [PATCH] cdrom: remove set but not used variable 'tocuse' Date: Tue, 23 Oct 2018 20:06:37 +0800 Message-ID: <1540296397-23835-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org tocuse is not used after setting its value. It is safe to remove the unused variable. Signed-off-by: zhong jiang --- drivers/cdrom/gdrom.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index 757e85b..b45c543 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c @@ -327,15 +327,15 @@ static int get_entry_track(int track) static int gdrom_get_last_session(struct cdrom_device_info *cd_info, struct cdrom_multisession *ms_info) { - int fentry, lentry, track, data, tocuse, err; + int fentry, lentry, track, data, err; + if (!gd.toc) return -ENOMEM; - tocuse = 1; + /* Check if GD-ROM */ err = gdrom_readtoc_cmd(gd.toc, 1); /* Not a GD-ROM so check if standard CD-ROM */ if (err) { - tocuse = 0; err = gdrom_readtoc_cmd(gd.toc, 0); if (err) { pr_info("Could not get CD table of contents\n"); -- 1.7.12.4