From patchwork Tue Nov 12 12:40:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 179182 Delivered-To: patches@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp8058590ilf; Tue, 12 Nov 2019 04:40:33 -0800 (PST) X-Received: by 2002:a2e:558:: with SMTP id 85mr20280114ljf.67.1573562433098; Tue, 12 Nov 2019 04:40:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573562433; cv=none; d=google.com; s=arc-20160816; b=UiCN9/iZllkVWXmSm1X9c/4CwAbOBL2oCjXSPiv6UDYhMGqFL7bZJhLSpB/NVP9Igw GDCRnYh1w1nR0BaoVk1q8sqkdwKRF0Ueo6yAy7jxjUHtYV0dftasT07ANGfHKWTSRKnQ i+sMEeJjUgPU0/02DgQpAV4dJB4nlUIVVs9S0lCdJUcK1a5bNFeHBgCfW7vvq+y3TIw3 dsiKyCkwQq4eX0k9FbPCFh+KjhQsny12q/D6JIIYNpjBKdd7TwyihFK3qQIk4Zc63cwV hYTuogdP8JZiWWeVbk2/UCvhje/DABORUWjF4oNYWRprxDKdouzLbIQBh5GCys15U4In CS2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9Sqm3/Atz5RClYiYSLOTyjJ1qxSb0WxsX/5dNJbrB0s=; b=0BVsZdneJlPb8K1+l5cZBiYGMtCnnToI/ZcYuvGf1iQld9znSk09lVZpM+6+Dt1LOH grjC0LJsEpeuA6MgzKL01c4UphjtDuiwcCAYEHlE+5zenXOnk06Px1+jeTs4numPPBUz ejTuWMbl1T0PDK7q3hBGrcmrIVB+mgEGI5mJ+Etq0o4fIfKc5IofSx2hJWxIU1vNUWP0 HV+46sINVyOqjeq4JxRlrR4SOkWGytbRzBObNf87snVuwi8eEZCC7F+TK0GlQb4fBGPc PqO+E7DJP95ghdD21s4GlsjEfhmnBoClvSIiCJsWrC/ix4WvkpaTjukNiawjIhGxx0+i bwRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eWHEtNYc; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id o72sor5188744lff.22.2019.11.12.04.40.31 for (Google Transport Security); Tue, 12 Nov 2019 04:40:33 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eWHEtNYc; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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; bh=9Sqm3/Atz5RClYiYSLOTyjJ1qxSb0WxsX/5dNJbrB0s=; b=eWHEtNYcLlj0zJowG+spGVziZcmbcfArOdLM+CPHG/CH2DqS6YaVumSZebVJZ7ytUa iVqdfbWo7Sgb3sfI3WJWTU1wg0XTt4AouNa7rXCZRahL37uFggD4mrUNZDhew0QxsYR/ aZBR64htskemNVKTRtRK7udYfPqboxeAfjcRzkTCHDB9LSWG02Xxg3FyTnbKAUfo9Ag6 qmVjEiegZ0CisuAXB5xkZtk6OEA/mUeVaeNoBdXw2W38wj0wLhN50O9vxOkw0chMe0QR GMtemx2bJabrMtr3Cj/05q5CiwH1+/WsEBhWhcIELaPiWMg41Dx/LAlteO4SWzzMz7Q1 qPmg== 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; bh=9Sqm3/Atz5RClYiYSLOTyjJ1qxSb0WxsX/5dNJbrB0s=; b=Wx5RxsWP9gEoOPbQt+blgYobhDqN7ZtNinsO3wfrJDgLfLUhJyUX0Yf5gHoTRPzq2T VqIyi8fZheQqv5MO31ziNBLLWPPCG3sVkRrPLnFdmf8Is40sfmTnOtbhtlVgqo0kwmVo EQ4cLoz/OTMDtyEHDd04lxc1Z+7zThx1glj3Dde9zeajqIcgYCYyAC9no9JsHG0ZWtpm LzvEZ7BT9pKmMuDXtd9C0seAN7/XcqlYA3Y/1oEvaCNawESp87wPBx6OzUHvyMJTt705 PsZImZUiUb/Fplzn5ZtcZ39wguyV/TjMZKui+oORUy/jio/rzcOeZen7MhKpa0Wj7Atp bFtA== X-Gm-Message-State: APjAAAWUna0df5r4kBUOZ3mbDSnqrUG/sS61G4WZgomuUPDIn51OyCYG DhIgCs+EJiT6BabDMQukQukAdwz7 X-Google-Smtp-Source: APXvYqwzEDPfwldBJhdBgC0pcUdsBDZ5Sg3IMXMrmP1OC5WRnUap6oE9INtgqyGc/0FBimeDtVZJ9w== X-Received: by 2002:ac2:5395:: with SMTP id g21mr561053lfh.50.1573562431424; Tue, 12 Nov 2019 04:40:31 -0800 (PST) Return-Path: Received: from uffe-XPS-13-9360.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id z19sm8375096ljk.66.2019.11.12.04.40.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Nov 2019 04:40:30 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson , Matthias Kaehlcke Cc: Kalle Valo , Tony Lindgren , Wen Gong , Erik Stromdahl , Eyal Reizer , linux-wireless@vger.kernel.org Subject: [PATCH v3 2/3] mmc: core: Drop check for mmc_card_is_removable() in mmc_rescan() Date: Tue, 12 Nov 2019 13:40:20 +0100 Message-Id: <20191112124021.8718-3-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191112124021.8718-1-ulf.hansson@linaro.org> References: <20191112124021.8718-1-ulf.hansson@linaro.org> Upfront in mmc_rescan() we use the host->rescan_entered flag, to allow scanning only once for non-removable cards. Therefore, it's also not possible that we can have a corresponding card bus attached (host->bus_ops is NULL), when we are scanning non-removable cards. For this reason, let' drop the check for mmc_card_is_removable() as it's redundant. Reviewed-by: Douglas Anderson Tested-by: Douglas Anderson Signed-off-by: Ulf Hansson --- drivers/mmc/core/core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 2.17.1 diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 221127324709..6f8342702c73 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2297,11 +2297,8 @@ void mmc_rescan(struct work_struct *work) mmc_bus_get(host); - /* - * if there is a _removable_ card registered, check whether it is - * still present - */ - if (host->bus_ops && !host->bus_dead && mmc_card_is_removable(host)) + /* Verify a registered card to be functional, else remove it. */ + if (host->bus_ops && !host->bus_dead) host->bus_ops->detect(host); host->detect_change = 0;