Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2284075ybl; Thu, 19 Dec 2019 11:00:27 -0800 (PST) X-Google-Smtp-Source: APXvYqxy1rFrC4D0tDAqTvSH3eGhyhu1n6Z7t9kQuqAFJ0sK1uL0u53g7Hnxx1hJWbS6mE49nNNM X-Received: by 2002:a9d:282:: with SMTP id 2mr9849323otl.237.1576782027460; Thu, 19 Dec 2019 11:00:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576782027; cv=none; d=google.com; s=arc-20160816; b=vMNocmcQv7asdzV5+n6HjzIHv4CpHUIZfC81el5rFgT6/KhEtavCSEKqCVj94nVS5V whloybP4e5HqBfMVhDr3BTSS6Z3CSJm4CGPwMZni5s4eZgb83hFpSHxbJ0+AUZp1dQmW EqSEP3tgdwrC4zolIKVM2NBYhcO2+vWhExmniK5jkLXpu9X+zkmc3qajVLsGFjhg7E56 zJQKvEf8Wm2Y7C8BS6aCeIiyv2amlU72jt/JXAFTzRVp3yAdCshU4qbX3RgZ5xLPKGxh qDYrh727BKrhnrqh0vd5E/IyzSuXhmNpH1ib+6zs6oVHvhiRmBbSprHYSAuUf3JfYWri +Lhw== 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=O60bYN5TzsPjlelL1HYdBCxCTzlRIH3z+1Cu5VJuMSg=; b=lpdw2eDxDFqevpx/L3K2YdmaeFhZRqq+Mq2FF5XKI9v+GYFL8wVElFLzTtp45omRJl YReX+NKVnUuiCBWijfpCXvfrWzk7nZtrjIDnsn19KVufMNaPydaVzF9AaKha+V8Llkg3 8/+h/Cy6PR0APaT8VXhLFioieMwbgvbTtvlaAOMtYTcnD5qthnGSAhY7Gxg7aVdHeMWN lm0r00lXh2PZKKqO8NcEdzmDTppYVd9Hz8mqlWjxWDcNWbeGR6noDlGPdXS5LWjPClp+ FgHJ9tn1U47DiPYudIArg+vbdbdqm++GbP8hop/vrKgwO9CEDYdFxtZvfgHnoN4arvn+ 6LdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=QdpoMMRY; 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 i205si3557918oih.257.2019.12.19.11.00.15; Thu, 19 Dec 2019 11:00:27 -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=QdpoMMRY; 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 S1730437AbfLSSyC (ORCPT + 99 others); Thu, 19 Dec 2019 13:54:02 -0500 Received: from mail.kernel.org ([198.145.29.99]:49328 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730434AbfLSSyA (ORCPT ); Thu, 19 Dec 2019 13:54:00 -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 E49DE222C2; Thu, 19 Dec 2019 18:53:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576781639; bh=RQyUUDlMhra9YJ2uHOjLojmvdH6zxmXIcsWihEGODXk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QdpoMMRYjombr9Xq14htD1PuSPm+LlRLoB0ccVwi3XpUQWP1wfu2ZmlLVYsLTmgdt hJhBMibb+FgT8HQREmPgywOxn0u4QYXjxwgQWfhWDrCJ4eXkWjixtsScBvZD+qnPSH fdFTC5Z7Jsjpx4GKPXRoSchoqvkF6+YqoBKdrv3M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chaotian Jing , Avri Altman , Ulf Hansson Subject: [PATCH 5.4 02/80] mmc: block: Make card_busy_detect() a bit more generic Date: Thu, 19 Dec 2019 19:33:54 +0100 Message-Id: <20191219183032.988998208@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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chaotian Jing commit 3869468e0c4800af52bfe1e0b72b338dcdae2cfc upstream. To prepare for more users of card_busy_detect(), let's drop the struct request * as an in-parameter and convert to log the error message via dev_err() instead of pr_err(). Signed-off-by: Chaotian Jing Reviewed-by: Avri Altman Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/block.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -981,7 +981,7 @@ static inline bool mmc_blk_in_tran_state } static int card_busy_detect(struct mmc_card *card, unsigned int timeout_ms, - struct request *req, u32 *resp_errs) + u32 *resp_errs) { unsigned long timeout = jiffies + msecs_to_jiffies(timeout_ms); int err = 0; @@ -992,8 +992,8 @@ static int card_busy_detect(struct mmc_c err = __mmc_send_status(card, &status, 5); if (err) { - pr_err("%s: error %d requesting status\n", - req->rq_disk->disk_name, err); + dev_err(mmc_dev(card->host), + "error %d requesting status\n", err); return err; } @@ -1006,9 +1006,9 @@ static int card_busy_detect(struct mmc_c * leaves the program state. */ if (done) { - pr_err("%s: Card stuck in wrong state! %s %s status: %#x\n", - mmc_hostname(card->host), - req->rq_disk->disk_name, __func__, status); + dev_err(mmc_dev(card->host), + "Card stuck in wrong state! %s status: %#x\n", + __func__, status); return -ETIMEDOUT; } @@ -1671,7 +1671,7 @@ static int mmc_blk_fix_state(struct mmc_ mmc_blk_send_stop(card, timeout); - err = card_busy_detect(card, timeout, req, NULL); + err = card_busy_detect(card, timeout, NULL); mmc_retune_release(card->host); @@ -1895,7 +1895,7 @@ static int mmc_blk_card_busy(struct mmc_ if (mmc_host_is_spi(card->host) || rq_data_dir(req) == READ) return 0; - err = card_busy_detect(card, MMC_BLK_TIMEOUT_MS, req, &status); + err = card_busy_detect(card, MMC_BLK_TIMEOUT_MS, &status); /* * Do not assume data transferred correctly if there are any error bits