From patchwork Wed Jul 1 12:46:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11636243 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 AC9B413B4 for ; Wed, 1 Jul 2020 12:49:21 +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 512EA20702 for ; Wed, 1 Jul 2020 12:49:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GJnzpvGa"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hvlv+tX5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 512EA20702 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=1PJ27RTbQd/q2bYpemf4SGXl9QEiC8HlnS65ejnekrM=; b=GJnzpvGanR2Z7EeWpriPvdDkn dqYpcSBEOTCmcP3A6zQ85YbK9F5gbUPXpPgmmUQw07zUV+EKyiThzRaL8K/hpkXuRzVUeisS2UvyE JkRCDdLlspZ+z+6II0zUxUBoBQ4qZOE6qQKmRjW0HqfGHTTRmP7K6J8VXN46QYLJe8uJpCdcIj24/ QER/1hGuZCd2o3rJlb0E9278DdRRFvayFU+FcPXEa7oUzE25PeVMWUqOHrbPKZzB9MXrWKpusXMn/ b0iZl5zD3+RNKQpTfTHsW7XjlGCLgjV5YuSD6atKfOWplAAXljgnIhP+yxmVtfj/IzxrJxb/WsAMx ybvm53acQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqc9Q-00055N-Cg; Wed, 01 Jul 2020 12:47:44 +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 1jqc90-0004st-7H for linux-arm-kernel@lists.infradead.org; Wed, 01 Jul 2020 12:47:19 +0000 Received: by mail-wr1-x443.google.com with SMTP id j4so21212333wrp.10 for ; Wed, 01 Jul 2020 05:47: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=N515jYO+XViE4rxUKT5HCQLZtJJRT/LcfFcciYDmBeM=; b=hvlv+tX5KbtfpPHuAr/9nPcfbWbt2OM+cAiArO7rBU+Y2+hvUnLaSo0jEyJTSCNtqf /BDU4lYL9oLCcqTop/giUBCPoSMdBObVhCbOzDajIg7Xy6OW+ZanytcIK27fFPUGoSVU 2HU2a9hqOlOZrJOszUR6SdV2AyaDNo6lSEkB+ew6DMnwFNMd/BNLqTiFAHq1aJUyK533 vZApsJFvDH9s4cvNsik/dIsdQTNB9Xgck4l+CjFOQg+hSyhnw/3cQ4TbqOVFFZ9q5zuU Hx3f33mBeGd2YAWoPZsDHGAAQN8Ba5WzdLuFqKRs0IHGKbASYvKxZqTge82v1stAPd6T vuAA== 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=N515jYO+XViE4rxUKT5HCQLZtJJRT/LcfFcciYDmBeM=; b=Cfjmlpsaz9xH/X8Px/2cuRH5qvb/k8MPC/LQJdUdJjqV5T+lndVLKelO/OO6eD76xP xtutTkbbYYrqiS7rR/1J9NLZ+RHSQYcfWjMAWt5DTp4MtJk2wLQpAq4tuHAwb0zFD+KH qkPi5ehBDAounnxHsQYruabeGeHMJ87/fKrClEqorK9mjCpnVBSn0NuhF37RBh2Z4Y+J k/o0IbmaOho/bGgINT/czKXjJOX9H8QLssnpnbvq12enBCHgdBjSA0IgtWfosVJkX61V 4MfCuUaMXJhJOjW1x+rAFd2/YS+NIFnPIt5AGn5JCEmePxaBcNo5bgIFMoJ6OO9JIQ6k uT6A== X-Gm-Message-State: AOAM530lCGVVHY1WxTvCLk5a7oxdfHHyxLcS9O0+L/Bi+Plc90tm3vyr KUm96QfVYZXm4V1YH282CqZFLw== X-Google-Smtp-Source: ABdhPJzwL6sUJakVeaCCVt1EjUi0Pfn7s08Z72vAPl3BEm+TB/R6hwjCzAdHY66m8bbVha8qFfoZlg== X-Received: by 2002:adf:8168:: with SMTP id 95mr27049461wrm.104.1593607637328; Wed, 01 Jul 2020 05:47:17 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.144]) by smtp.gmail.com with ESMTPSA id o29sm7817862wra.5.2020.07.01.05.47.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 05:47:16 -0700 (PDT) From: Lee Jones To: ulf.hansson@linaro.org Subject: [PATCH 09/15] mmc: host: rtsx_pci_sdmmc: Remove set but unused variable 'err' Date: Wed, 1 Jul 2020 13:46:56 +0100 Message-Id: <20200701124702.908713-10-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200701124702.908713-1-lee.jones@linaro.org> References: <20200701124702.908713-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-20200701_084718_616194_1118910A X-CRM114-Status: GOOD ( 15.66 ) 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_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -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 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: Wei WANG , Lee Jones , linux-kernel@vger.kernel.org, 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 Seeing as sd_wait_data_idle() returns void and only a very specific read value is checked, there doesn't seem to be a good reason to check the return value of rtsx_pci_read_register(). So remove the assignment and definition of 'err'. Squashes the following W=1 kernel build warning: drivers/mmc/host/rtsx_pci_sdmmc.c: In function ‘sd_wait_data_idle’: drivers/mmc/host/rtsx_pci_sdmmc.c:678:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] 678 | int err, i; | ^~~ Cc: Wei WANG Signed-off-by: Lee Jones --- drivers/mmc/host/rtsx_pci_sdmmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/rtsx_pci_sdmmc.c b/drivers/mmc/host/rtsx_pci_sdmmc.c index 5a71f6678fd3a..dc0dbd64a2a78 100644 --- a/drivers/mmc/host/rtsx_pci_sdmmc.c +++ b/drivers/mmc/host/rtsx_pci_sdmmc.c @@ -675,11 +675,11 @@ static u8 sd_search_final_phase(struct realtek_pci_sdmmc *host, u32 phase_map) static void sd_wait_data_idle(struct realtek_pci_sdmmc *host) { - int err, i; + int i; u8 val = 0; for (i = 0; i < 100; i++) { - err = rtsx_pci_read_register(host->pcr, SD_DATA_STATE, &val); + rtsx_pci_read_register(host->pcr, SD_DATA_STATE, &val); if (val & SD_DATA_IDLE) return;