From patchwork Sat Nov 9 10:30:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 179017 Delivered-To: patches@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp4014815ilf; Sat, 9 Nov 2019 02:30:59 -0800 (PST) X-Received: by 2002:a2e:8809:: with SMTP id x9mr9804737ljh.82.1573295459268; Sat, 09 Nov 2019 02:30:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573295459; cv=none; d=google.com; s=arc-20160816; b=s3um0U5H+2xbvTTCVLCNpt8iDEijcu2LKpyPR5K6avonAYI9dqr/7ICpUizT//GkLt UryzvYxjc7/WRlA9SQL+oiZsC716rgw9vqdVknbmClkVjLM2efM6EwSXKIWhimuH1nD8 Ndbp23OPf7LHeaZmZSf6RlGwFj9p3WZMYhMxFvGyVhBq4QhVBqAG2W24uhYiXx5fmjU5 rOXzkkH2RoelUVmN8SeCnY93X5VeVns9Ffl6x3diDKn5H7ZTNzms/2GJbkqqeV+Am/WU Q/3Y1hCjo8ZBqXo8wqy+ScDLGQeZyl3hkzIwJsc2VoFpU9+YJXXTVwGXe1WI3cEimtTd f7MA== 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=Irawu8SRoNtzmKfb3mCNZp3oXWFM6rn9ptozR56UkwA=; b=YBbkc3tkWmeSNjZ5dXPoOHaRXXG9KKi2673jnHy4F+VNhBGBT2dk7k8ujavCSf+1Sy W0uM0zHhqxb7+qFEH+abXAjjVMCJ2xwMZykXpfY5WxBnaaA+p0Hun6sZUQmTWMcSH3FA VdpunuBU7oIP0S4SEEUYIZlxqdowxatoLkmZXZlaKxszIplEoV9PzYsHosoU//x6Kvd6 0QdgS/YIBjzAvjQ3YD4GJFfFr1vk13U8vbJufC7cXbmjiWP9MLMszawG5xYxzz2tY4yZ +whowYOvz23eRkdekdH4XRTI/c4UYy0lGJsTL+tqTtapy2hIhv4MSfq4pupiJyQXwTgB 2V+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZFczlxVJ; 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 i26sor5398041ljj.20.2019.11.09.02.30.59 for (Google Transport Security); Sat, 09 Nov 2019 02:30:59 -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=ZFczlxVJ; 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=Irawu8SRoNtzmKfb3mCNZp3oXWFM6rn9ptozR56UkwA=; b=ZFczlxVJpHEkN6j+5EYvSNhGZMycMzimX6bbksHznbxmkE6ALM4OpnnZdIJ3gJlBYM 1rqArbEMRDznWCxXDoHRuoV5ui7IfChnVNy3fiuWgy4Wj6YYEZknpqJ9wqcZXcLRBDQp jWGaYpbwcgu7AQvC0Yv3OtvZ2/gCFvWRNdxqBLLFgpmzPGaGXGN6rJssKwAXyx27xLAw 7ysXH8byqmGHuIVhBJ8Altmvvbk5FMHSJw7OHwHsKUIRo9HyatT7nsYAHcFYGSPYc5Zp 8lwMBrZHWPuHJq+krl63Bmgouor7LRcz+W5cGNfsGCZzJZL8/BNIW7HUW/IygBeXjgxH ngow== 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=Irawu8SRoNtzmKfb3mCNZp3oXWFM6rn9ptozR56UkwA=; b=cS59vD0y8MweTS7WZSSSLK385jYEUKDjHbapvpYD+ItTY09h6zQI7ZgMCi+ynwstzx WYkc7XoIodxcjPpRi4owxxsSAuUkVjm7QKQJTdXlH3DZdGT7XLuuLYkagIg0kQDmoSdS r/thbzE7Ngd/TsEnHddKsR8gfwbyA8ExafZL4VfzoIJ/svk2R1XFVDRey6BANfUuoyAu RM96tuOskmDkE1SpqB0CUH3qZVbruIcDFm2v0QsgOfYeWL6dOXQcOGK19VWiehu8vmT/ 2oAPHABW6OT4T8lSVgN1ZpAJzpD7BfI0LSWLGwBzLt+PR95GlVU8wWcM+MEEIgXFbE8W uYhQ== X-Gm-Message-State: APjAAAWEwezKKo9hQYP8gX3lInSWnlBSOm1a0pUipwJEsiMubno3jjn/ ehNvsqepH42GSCtjqZsvJjmqSjup X-Google-Smtp-Source: APXvYqxIoztXOQ6EZI33BdfF0jjZWB8NBuswW97qLqIH/zyK5sFRmGHkxaqCaf1Q9H5zKjEZOviDaw== X-Received: by 2002:a2e:2a05:: with SMTP id q5mr9924181ljq.170.1573295458900; Sat, 09 Nov 2019 02:30:58 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id z3sm343927lji.36.2019.11.09.02.30.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Nov 2019 02:30:58 -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 v2 2/3] mmc: core: Drop check for mmc_card_is_removable() in mmc_rescan() Date: Sat, 9 Nov 2019 11:30:45 +0100 Message-Id: <20191109103046.26445-3-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191109103046.26445-1-ulf.hansson@linaro.org> References: <20191109103046.26445-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 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;