Message ID | 20200703174148.2749969-20-lee.jones@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2595757ilg; Fri, 3 Jul 2020 10:43:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhT7sWLCEaepb766sRvZ0A824FSOFdpZi2B5KLLIYhglalbb3GtXplJP3A+a3H5FfJNuYF X-Received: by 2002:a17:906:26c3:: with SMTP id u3mr32275003ejc.483.1593798231703; Fri, 03 Jul 2020 10:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593798231; cv=none; d=google.com; s=arc-20160816; b=JhGcJKl3hPfpSJAXUSDDwASOursW9Yi3ipPlqtxg/0cTCdq80/wLzYA15hU0iF15Vr 0wffcJXaf+2KwkJ2IkZCqoQVKpdkPGGlv9AzsDpEIthyt6+4Nz0g0CWgNas74ZRPuUbQ y8wct9t22skwwzzQOXYhKwQAiv7kgKLKkEJOifI6cTBcdrvE0zPjCPqzy9kLZyTUwWF0 BiCQZZctAOyfMwqso4fjlJFP+NJsC/Ww6qKyBaKk7OhAMQDhl/pJ8X4VeoiXAvRaQqwX BQ+uTHMrlDqNiJpUgsOF0QJ+N7CVBJ7+2V8XdVexjXgYiRa0sPIYV/+xQi1yS9H4S4qJ MDiQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BRma9lRqEYDVOCUnxuxL1ar6KYSuaKRVNlo6MvalKh8=; b=cxnjsq35wuw3tgB1EWCNti4zGaGx6cZctc+YTYRvTT/SwO1wiNGq75oCOXtv13VlBm pRndXjLoh2UrqRKRCwPnp1hjGz198oEQn+3L1De/Oc1KdYS84wX6N+g1Pa1vVHDhVere s9e8n54/ZeRtsmkCq8b6ChSFJMFKAZKrWoJsFeGeHJAw+4nufryXN6b/ha8oFrl/ALCc Eaq7J9+61xluPiFy2mvGKjAAtnqpEa5Dd3OgsdoQuj7nwC5rudzclB7P4Bdzy2qMHRKF CKWOgbLQIlvWcodERnEZIZ+iHIuAMRg+OnOg9uFbfxSvNfv32IB/O7gnPYdCARQhPLne Swdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mWYGekfi; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <linux-usb-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qp2si8411725ejb.598.2020.07.03.10.43.51; Fri, 03 Jul 2020 10:43:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-usb-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=mWYGekfi; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-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 S1727776AbgGCRnq (ORCPT <rfc822;patch@linaro.org> + 5 others); Fri, 3 Jul 2020 13:43:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726956AbgGCRmq (ORCPT <rfc822;linux-usb@vger.kernel.org>); Fri, 3 Jul 2020 13:42:46 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D22C08C5DD for <linux-usb@vger.kernel.org>; Fri, 3 Jul 2020 10:42:46 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id k6so33581471wrn.3 for <linux-usb@vger.kernel.org>; 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=thEdA1OPeUeoyeHuzeS8l7lQnzt3yu0SfFJpGYhZ29livbMLYe2cqxM7/r1QignM6T PlN1olxSxxTkosipaAUtVytQB1QpQRlqLWNC4Oqe/nCzD+G6ISPlslPJkfo7zwla8BkF c060Ow3NPGMKKtmkQLqHJJCxnE+suRz1Vo0FNlAovPkxPt9Jc/CVRTNGBxNxrYFxravK 2X04sgmOmRNfrqXIBnlp2JB5NVQ/fo1OoyUdAkC/GdtMiu0zFXC3UDZKWyYgNMCVqZpj hlUqdbU8kU0flsb+WYZ2tVNALp0d7ytgDAa+SB88hFQ6mW+32yhxdpB4X6lnSwVZO+An 2cyQ== X-Gm-Message-State: AOAM533OkPJxMFCOW9aU4pAGYGRA5bxJaJSuByMPtm0oq2kaB4YbcnkF H7MekglPYPI/PhM8rLu+48PybmLgY64= 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 <lee.jones@linaro.org> To: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones <lee.jones@linaro.org>, Alan Stern <stern@rowland.harvard.edu>, Daniel Drake <dsd@gentoo.org>, usb-storage@lists.one-eyed-alien.net 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: <linux-usb.vger.kernel.org> X-Mailing-List: linux-usb@vger.kernel.org |
Series |
Fix a bunch more W=1 issues in USB
|
expand
|
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)
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 <stern@rowland.harvard.edu> Cc: Daniel Drake <dsd@gentoo.org> Cc: usb-storage@lists.one-eyed-alien.net Signed-off-by: Lee Jones <lee.jones@linaro.org> --- drivers/usb/storage/alauda.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.25.1