From patchwork Thu Dec 19 18:33:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 182180 Delivered-To: patch@linaro.org Received: by 2002:a92:d0a:0:0:0:0:0 with SMTP id 10csp874359iln; Thu, 19 Dec 2019 10:58:36 -0800 (PST) X-Google-Smtp-Source: APXvYqyCZfeasYQqTjolHkpG47HonrQXmlwIfZbiBruaTxZ0zIWC0mVc9nmOjONhtcPsRJ6+MEIS X-Received: by 2002:a9d:73ca:: with SMTP id m10mr10251953otk.289.1576781915968; Thu, 19 Dec 2019 10:58:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576781915; cv=none; d=google.com; s=arc-20160816; b=QQAEnO645PIt9YEdDyFefcwBGqOqiyjLl8WQLR6YiZHUFblb/8Sl5XwxRMP1wz64qd rdpmf8i3qEstkuJbqH/K9wSh2Dgqkx8lzXecS5mIZ1m8+Y3Re4eCo70JpVlJfv5wnMna XgbFSZddfV3Tfwiix6hyFavcBcQJT5qaNyqZdi1dTZl6uH1TVVdpvlt1/R506+Ii53v8 3mK+dMINJnDB+W+Rsd1Kk1Ef4YPEJSkHPtZ0uK2KHRMfXfhu5OEE5KbNLTohBvgIJdlp Ult7UR0yDtgy2iOvPAytC8WCwVvhCALtQ5kV9hYFgz1aloUsLH6VZ/dOgN96geHRBz/M kRZA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YBdpSbblwCs/ZDeCVtuCVZ8oRM+y/qhNj8MraIHMXCU=; b=ovIJ0kzcvvXawyvY02mokjX+HqjMQiBgF+sl0ZWcd4R+p3baihW1BSQynVpu+at0Hl 7KZqcDBwNB+/CRcvLQRuXdi79BLsjGwa2MLVd8ljsxZEQctEElrs65XbzZBnA+cpsNRJ AQgy/xVAUBxu7sGPSa7Dx/rpjEqu8KR/2defKZqED9wQNVHezdJf3IlpXR5I3piTYyLo 3Qp4upqHbsGde0IqV/VTh43HmyUyyGEvLYFSNVzmGiMkSxYDoFFiRHcu5fPekKL0k8ub 835Yhwlqa5aHgF+33vRNRZplEspGoKqZ7DPt9bLAdmhqwIyDrU6yPaiIykaI5SRzsZht a6UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=piQs8L6R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m20si3692204otq.35.2019.12.19.10.58.35; Thu, 19 Dec 2019 10:58:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=piQs8L6R; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730525AbfLSSyg (ORCPT + 27 others); Thu, 19 Dec 2019 13:54:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:50054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729431AbfLSSyd (ORCPT ); Thu, 19 Dec 2019 13:54:33 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 93843227BF; Thu, 19 Dec 2019 18:54:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781673; bh=1cRpwCqdems5pgPypXH00pHUKyYW+gGiZGNNdSfvfJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=piQs8L6R/oOwRHt4K1ZKtyyirKduH/wAiT0NBxHYqByKvZsYVhuXE/qo1I//XbY+q 6BPEq7M9iL2nZ/l9oB8mwLhB3EFqbttGIESenRjnxMuWEoiT9jLQLhv2MHaRWWJWJd F8EuMy40bt2O/gYIUpK4thJkkKw1QqYZGav0kq40= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Douglas Anderson , Ulf Hansson Subject: [PATCH 5.4 04/80] mmc: core: Drop check for mmc_card_is_removable() in mmc_rescan() Date: Thu, 19 Dec 2019 19:33:56 +0100 Message-Id: <20191219183034.205788544@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20191219183031.278083125@linuxfoundation.org> References: <20191219183031.278083125@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ulf Hansson commit 99b4ddd8b76a6f60a8c2b3775849d65d21a418fc upstream. 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 Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) --- 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;