From patchwork Fri Jul 3 17:41:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11642551 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E6F7A60D for ; Fri, 3 Jul 2020 17:47:56 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9E322206B6 for ; Fri, 3 Jul 2020 17:47:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="A3CQmNI2"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mWYGekfi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9E322206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=MkPufp2HvmGdwF4yl/c6edrdv2XP3dc1oyy7Z8HBbRw=; b=A3CQmNI2UDGytV9IkE4idfwCM XzxiA+48I5aaXLWz5t1EuOz7S9ibo5IWr4NnDO9phF/UezqAm0Fao48rjTHQWXjo1/POI3oRF8zPg Hr5JUg6sdaq5HmOXeILjMYKZlUWSpAsiKHhCLCKUQyzxYpAlWLia3KrrEha8nreL5emVM7Nn8WGuK ILF2ZdliCAU1YPuR7bQnBVpyXr5kuVOOManCc/HfGQVkufeVIslGk3sx3TJA1dmXqgFid0PCgNa5R wJ6qWJ+t1Pt++tSnFDHJMfyeLKRBjv6Lu1piG7x632N9VRjya0boZ5Z7sIrIb1ThCcqCa5u4wh70M 2RgUp6HWw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrPl5-0004Ky-Th; Fri, 03 Jul 2020 17:45:56 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jrPi3-0002EX-RF for linux-arm-kernel@lists.infradead.org; Fri, 03 Jul 2020 17:42:51 +0000 Received: by mail-wr1-x443.google.com with SMTP id a6so33569000wrm.4 for ; Fri, 03 Jul 2020 10:42:46 -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=BRma9lRqEYDVOCUnxuxL1ar6KYSuaKRVNlo6MvalKh8=; b=mWYGekfinDDvmP/iCmqV/aGkYJf6TP1fCPcz7wB25vsA8+FLckg8N9Orh4YU9GBn/J LnXRemGrce3PfQHQ02bLqOsJwHZSgzTTaFULUBk7HNn6wHu/7bJM2WWusHZKqVQseNTF TUmfsyRjzeqzo7RG5Arncs7yNnvFLUcMyADe7l3VoDzFTFRXeCc/P4bBM/NE4J9N4xRz uiuCZAVBHkjJ2NG1VnhYVRhKfwuMfIFpsty3kYsap8/Aa7O5rfvZCED2Jpn+WZsIuk/n 6huQcc3LZJY6QqbtVD/W7yN5yad9GobhUVi6igXsbAQcfy04fJ1fVqcE1mmm/UtI1ixZ B7Pg== 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=BRma9lRqEYDVOCUnxuxL1ar6KYSuaKRVNlo6MvalKh8=; b=JX4gMqH5cS0HjJ8ocPDYImLGxqq3hxHfH9yvpimE9f5hq+R0XRQ7moeQq9smT9Twlb lvvgbme/PMpdxEgzSFIsIaEPp7rrFh00ioV5TxqRzb4VX3I/dNXRfSu4L1JSP61KxN6f 4aS6T6JZQEWnl4MJvxp/H2OLNfmHIuoeR30kEd15mWE/0A92ghGEHB/Hy7gcVbvOeOc5 UmeE5OGfvAGMWR5UHntZCoYoCbAnu2MJD6xCH0f1gTyifSL14keCynORkKVpBBs/GoOu N2KbxpDhwcE80o0GxRl/UbFMiPqpGM0t7O1hwtactvaCtZ1RKol/HlfMFDD+foBZNnZ4 WMPA== X-Gm-Message-State: AOAM532ATEuaKPQitjC0mkqhCo1wMWlz96OeoDP5jELM6SZCmaEQemSs CeE9uRwV3kY7SivqfNA2FCBHMQ== X-Google-Smtp-Source: ABdhPJyONWDFPwyDvztIk4FcoSOK/rZ5PGRPGACL6sxaodQwaxlQC+PL+MLJ6JrU2yDAbU41YE1QXA== X-Received: by 2002:a05:6000:d0:: with SMTP id q16mr4673145wrx.166.1593798165048; Fri, 03 Jul 2020 10:42:45 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.144]) by smtp.gmail.com with ESMTPSA id x11sm13625799wmc.26.2020.07.03.10.42.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 10:42:44 -0700 (PDT) From: Lee Jones To: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org Subject: [PATCH 19/30] usb: storage: alauda: Remove set but unchecked variable Date: Fri, 3 Jul 2020 18:41:37 +0100 Message-Id: <20200703174148.2749969-20-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200703174148.2749969-1-lee.jones@linaro.org> References: <20200703174148.2749969-1-lee.jones@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200703_134248_164749_18E43121 X-CRM114-Status: GOOD ( 13.76 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:443 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org, Alan Stern , Daniel Drake , Lee Jones , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The return value of alauda_get_media_status() hasn't been checked since the driver's inception back in 2005. If nothing have gone wrong/been detected until this point, it's probably safe to just remove the variable. Fixes the following W=1 kernel build warning(s): drivers/usb/storage/alauda.c: In function ‘alauda_check_media’: drivers/usb/storage/alauda.c:456:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable] 456 | int rc; | ^~ Cc: Alan Stern Cc: Daniel Drake Cc: usb-storage@lists.one-eyed-alien.net Signed-off-by: Lee Jones --- drivers/usb/storage/alauda.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/usb/storage/alauda.c b/drivers/usb/storage/alauda.c index ddab2cd3d2e75..20b857e97e60c 100644 --- a/drivers/usb/storage/alauda.c +++ b/drivers/usb/storage/alauda.c @@ -453,9 +453,8 @@ static int alauda_check_media(struct us_data *us) { struct alauda_info *info = (struct alauda_info *) us->extra; unsigned char status[2]; - int rc; - rc = alauda_get_media_status(us, status); + alauda_get_media_status(us, status); /* Check for no media or door open */ if ((status[0] & 0x80) || ((status[0] & 0x1F) == 0x10)