From patchwork Wed Mar 17 08:56:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 403052 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp284080jai; Wed, 17 Mar 2021 01:58:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ+/vCWI9Som8VFtUbRlgQ4pf5utinF/vvdyDWOtFP370dW9DDG9/vuULxXcIiFGO4tpKb X-Received: by 2002:a17:906:6703:: with SMTP id a3mr18267712ejp.240.1615971505651; Wed, 17 Mar 2021 01:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615971505; cv=none; d=google.com; s=arc-20160816; b=A3loQbIpWcucuxxeWq72+eU6gluTZqoEcpB8GvavJM7OmFxGFQA0pYdI96qWscrMlQ dEqyOFslV/HSupHXFlB/uQMvQGkQkFkdDhKgUZualwFPHrttTrkOS22Slk+cFlHR9441 9UYXqtJRc2t3KOwbh3XFszUYHj0HKcX/ekAd1j5aZjS5qBK/aSQDtnJbW7Z/o/tlVUIt Q7JYo0iX83txXeN36F3/MuTr6pstlhxIDF6Vpza1rPSblj3MUSkJlXxoUxQX1B9PbT5N SjIVCVgWVGHNScM8sbLcK80y2XpY88G4qvy3clg1EBRbOjxjVjPmv13vTesDSpHv5HyJ 5/Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=lgdjb93mQlErKIT9nxRZ2QkPnfSG57zjDQqjLAihewI=; b=p+WpUFdzlp6Y0emTplWEEXqT39/xPZKsQM4hK8vmKqBWLgrMxrChlaYoyue9k7TfeQ lJeouJYBnQluLcVGhyJ+GvZ/BO2nJyBTSVAqKEulx638pVLU7+YVyld/LGJkNnY7A68G BOUL8uJd7dLarOqmHrGetjg8sStPK8QI5+TmBf7YnJC5E7sXkudzRAalPFYvOQxGsSBi KZFi509rMwpAGrHZ+oU3G+81YT9aKxeP6CbNQ4v5Wznw8sy35iCjSV3HzHtZoJzuV2py ZQ7Ir8cXCThpleEuQTbLjfse+4dTq1gSFJmup3P6yRof0qt9P5m13dywytfxJ7j04fPz l5OQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MwCP4itu; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kd10si15492094ejc.41.2021.03.17.01.58.25 for ; Wed, 17 Mar 2021 01:58:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=MwCP4itu; spf=pass (google.com: domain of linux-scsi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-scsi-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229880AbhCQI5y (ORCPT ); Wed, 17 Mar 2021 04:57:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229636AbhCQI5T (ORCPT ); Wed, 17 Mar 2021 04:57:19 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B545CC06174A for ; Wed, 17 Mar 2021 01:57:18 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id f22-20020a7bc8d60000b029010c024a1407so2928929wml.2 for ; Wed, 17 Mar 2021 01:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=lgdjb93mQlErKIT9nxRZ2QkPnfSG57zjDQqjLAihewI=; b=MwCP4itucxztl9l8FkEqeHILNX3nzDKtzAzs/tgBHBSDafSTLboWBRYxz76cEG3V8x 2xPAdCZJokzSSlLfv+qzwK97CvIP36SaiFEwnjBxG2YqcnPTFOG6Y8yGU/sc93iJTImW Sf5oXGbJujAphZM9Z0eQHUk+a2N9aMmyEM0TD+JA736pUUbP4J1B/a6m2ATgyhF3av6r 9PegckNneVMjHCE/+3dm96hlEVMIKRRWWqENGlNOfKX0L4FDpm7LBalWvzUiccsqDZMU HhC7Z4Xa2Vj8iKt1skT9IvgA7GqwKfwWY1Dw/Gju/4U+Isx7ARnIEOgV0eQfxeHAvSaN lflg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=lgdjb93mQlErKIT9nxRZ2QkPnfSG57zjDQqjLAihewI=; b=FYeQJ/+OWQavxxxRTrMdW4HbXk1jBIxoXsY6modd5QJNKYGCJJejA8k/7xgBE2hj29 OPfxHenrF7NK6mnodMn+Rb6XdYrnpqrFkI+iDxxFK9DI0SfDRAf/nTCIDCihHRvb46Hh jZ+KHZD+q1tzUdAHwWKmyuECLB1ea6azw+adhX9qJDlz6NE2WH/EQJVgTJO5Gy/Hejes MmlnpSf1icTB7TGjYlvSKO21YAESqal7oYoDCuWwqSKHRrYjN7d+R27aVK6/pZis1TgR 1WmmwWDKCLgDdLCVQsSlwvTBlULP99caorbkpAXag9kN/eKW13Th3pJiwulS03uONvOL gHFg== X-Gm-Message-State: AOAM532I7r6ZleNlvIIRrHoK1iIn1Nx2cPuLoYUVQnAf7tyqGkCMARNy DAZVmHL2wcETLBWfmEhPmUPeLw== X-Received: by 2002:a05:600c:4ed1:: with SMTP id g17mr2645321wmq.67.1615971437511; Wed, 17 Mar 2021 01:57:17 -0700 (PDT) Received: from dell.default ([91.110.221.194]) by smtp.gmail.com with ESMTPSA id j123sm1807243wmb.1.2021.03.17.01.57.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Mar 2021 01:57:17 -0700 (PDT) From: Lee Jones To: lee.jones@linaro.org Cc: linux-kernel@vger.kernel.org, Adam Radford , "James E.J. Bottomley" , "Martin K. Petersen" , linux-scsi@vger.kernel.org Subject: [PATCH 12/18] scsi: 3w-sas: Remove unused variables 'sglist' and 'tw_dev' Date: Wed, 17 Mar 2021 08:56:55 +0000 Message-Id: <20210317085701.2891231-13-lee.jones@linaro.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210317085701.2891231-1-lee.jones@linaro.org> References: <20210317085701.2891231-1-lee.jones@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Fixes the following W=1 kernel build warning(s): drivers/scsi/3w-sas.c: In function ‘twl_scsiop_execute_scsi’: drivers/scsi/3w-sas.c:298:22: warning: variable ‘sglist’ set but not used [-Wunused-but-set-variable] drivers/scsi/3w-sas.c: In function ‘twl_scsi_biosparam’: drivers/scsi/3w-sas.c:1411:23: warning: variable ‘tw_dev’ set but not used [-Wunused-but-set-variable] Cc: Adam Radford Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: linux-scsi@vger.kernel.org Signed-off-by: Lee Jones --- drivers/scsi/3w-sas.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) -- 2.27.0 diff --git a/drivers/scsi/3w-sas.c b/drivers/scsi/3w-sas.c index 3db0e42e9aa75..383f6f204c24b 100644 --- a/drivers/scsi/3w-sas.c +++ b/drivers/scsi/3w-sas.c @@ -295,14 +295,11 @@ static int twl_scsiop_execute_scsi(TW_Device_Extension *tw_dev, int request_id, TW_Command_Apache *command_packet; int i, sg_count; struct scsi_cmnd *srb = NULL; - struct scatterlist *sglist = NULL, *sg; + struct scatterlist *sg; int retval = 1; - if (tw_dev->srb[request_id]) { + if (tw_dev->srb[request_id]) srb = tw_dev->srb[request_id]; - if (scsi_sglist(srb)) - sglist = scsi_sglist(srb); - } /* Initialize command packet */ full_command_packet = tw_dev->command_packet_virt[request_id]; @@ -1408,9 +1405,6 @@ static int twl_reset_device_extension(TW_Device_Extension *tw_dev, int ioctl_res static int twl_scsi_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]) { int heads, sectors; - TW_Device_Extension *tw_dev; - - tw_dev = (TW_Device_Extension *)sdev->host->hostdata; if (capacity >= 0x200000) { heads = 255;