From patchwork Tue Apr 14 16:14:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 185413 Delivered-To: patches@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp1601744ilf; Tue, 14 Apr 2020 09:14:37 -0700 (PDT) X-Received: by 2002:ac2:58f6:: with SMTP id v22mr346822lfo.146.1586880876884; Tue, 14 Apr 2020 09:14:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586880876; cv=none; d=google.com; s=arc-20160816; b=ooQLyH0VrQ/oqv5uoalEgT2tADTb//vMz0kw+vgKg7fuYJFyx2LeVR54gpWfJNxydL aR4GFWlDkUE7Vnr3zdgJvSZJeHZFWr4HCS3961DfpUYIWORv8Y9AnaG15txg+/0iiKd6 zjKUpZh3TZ41MzijK+p31h/YCfi2PPFDdjrX+DGsahoD5q3NvZx/N1nUmH/gw8Ii2Ano B2VAWkL/ry73piML9ecAn8ffSX+J91HQQ6zmU7YRDxHO5tsCDM60na50xSOIqwLh0pmx AuOZiBdwvlwwSIWqoH6UmgjMw8Gi1+x4gya7RMAA1AABGMCYeZ3hPNlnEReR3Jxghsly ihnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=dn6VxHUGEp0h+lDNMYkyjs+eaTbjGnRrBr6whuUgNLQ=; b=SPBLtIFu1E+UonOx4GT/+KehSFK8tDIeRRczt/1sbaZ7cW283Nkrs5AJb71K4kH7fB ORyFkG+RfjedmnOqzPejpAZ/h5p6R0rbtajeiCDT6s9wyn1dJqfvnjYLEHiJmIduDVa0 lyVbYG62exOIkDfCLmkUpPVtM4F+cD1qsu/eGFlIxr1nEBoP2RZYe7rHA1sUIxmINkUE 5BfPMuWXtvtBbq0S4opXMq6ALNEV6hF5I+GKhcvs5gNB7A0K3leSjRXgUffF/YUz2Kdm cj8AFkj3D6IXwJSdllk0Bf1iz6avExBVPoton7zfqBSy7eVOqYkAGAhaqVVELVH+oGcc l/Fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=buxlIUSI; 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 y23sor4156235lff.23.2020.04.14.09.14.36 for (Google Transport Security); Tue, 14 Apr 2020 09:14:36 -0700 (PDT) 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=buxlIUSI; 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 :mime-version:content-transfer-encoding; bh=dn6VxHUGEp0h+lDNMYkyjs+eaTbjGnRrBr6whuUgNLQ=; b=buxlIUSIrT5D15k/542DUXpz3fkzEN7p3nMlmm4+M9/tfJXHRqSt4i808UTYsF4ecC b1iA3PBYRCEHvf8U9R5IJeFK+t77fe1e2XXP9XHyi41wic7CobmwoG2BKB2lCjL1eQmF x4dhYhNI7Xg4mouw8mLpSdPYMz5nEAsWQfH3zTU6rsufrLnAQzey4+Lc92abqlBFlaoL jDuNvlwK2tP9ecPGtAZBgzsL6dmm+/v59kxJw2+/I+USS4Kg/gg1kF7pe50/w3hTfeug qF91C+pBuw1yRFAcOBrVctk22aqzDLKH8i/BP0476eHlxNmqMUDn9yLQQIsGNnVGIVRW jIBg== 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=dn6VxHUGEp0h+lDNMYkyjs+eaTbjGnRrBr6whuUgNLQ=; b=SCQimpvcupQtnImVdD9B3hZYs01SSa9D8qIc0P+CDgDj1GDupsWwnvXLlw4u4zG2Sb BfW98o1l12p6Bd+YigOaV+OdvOBzRhLqpfdGp93XlqgQDGl6Q3MgUdX0dF3N6S2kW0id 2l7OB+AtfM2iaR8vySKVLiMd5+hjIhnUh8nsjjat/pNE65D8DqKc1Otpq9eykzo3K8nK yl3Ut0l5oUkTPZMOq5HX42O/MRqwGp6VWKZSat2I2i8WLKQpGbNaf/LQCeMrCvQYFX6y yUONvO1sT6M/lB508YYBDq2ouCE9F/wr8emfw4hJAooFD5zVNlQQ0lHzAkZKtmfvPwep wong== X-Gm-Message-State: AGi0PuYjPXo1jiPdulyRhrQMFV68tU2X0Czn6awDY/uzMeIHR9uWQs3c qgXCqOFhzcbrnjtpVOFkGlMs3Kox X-Google-Smtp-Source: APiQypKJTgim6xv0zsXWcwFDb65pajvh4mKxX6sFBD2V6xhmJiRhFw0cmT67s7GB4L7mKrTfgH0m5w== X-Received: by 2002:a19:dcc:: with SMTP id 195mr325522lfn.193.1586880876481; Tue, 14 Apr 2020 09:14:36 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-98-128-181-131.NA.cust.bahnhof.se. [98.128.181.131]) by smtp.gmail.com with ESMTPSA id a26sm9330669ljn.22.2020.04.14.09.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Apr 2020 09:14:35 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Adrian Hunter , Linus Walleij , Rui Miguel Silva , Johan Hovold , Alex Elder , Greg Kroah-Hartman , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Bruce Chang , Harald Welte , Alex Dubov , Sascha Sommer , Manivannan Sadhasivam , mirq-linux@rere.qmqm.pl, Jesper Nilsson , Lars Persson , Paul Cercueil , Ludovic Desroches , Nicolas Ferre Subject: [PATCH 11/19] mmc: sdricoh_cs: Drop redundant in-parameter to sdricoh_query_status() Date: Tue, 14 Apr 2020 18:14:05 +0200 Message-Id: <20200414161413.3036-12-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200414161413.3036-1-ulf.hansson@linaro.org> References: <20200414161413.3036-1-ulf.hansson@linaro.org> MIME-Version: 1.0 The in-parameter timeout is always set to TRANSFER_TIMEOUT by the callers of sdricoh_query_status(), hence let's drop it. Cc: Sascha Sommer Signed-off-by: Ulf Hansson --- drivers/mmc/host/sdricoh_cs.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) -- 2.20.1 diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c index e7d74db95b57..97ef7d71375a 100644 --- a/drivers/mmc/host/sdricoh_cs.c +++ b/drivers/mmc/host/sdricoh_cs.c @@ -123,11 +123,13 @@ static inline unsigned int sdricoh_readb(struct sdricoh_host *host, return value; } -static int sdricoh_query_status(struct sdricoh_host *host, unsigned int wanted, - unsigned int timeout){ +static int sdricoh_query_status(struct sdricoh_host *host, unsigned int wanted) +{ unsigned int loop; unsigned int status = 0; + unsigned int timeout = TRANSFER_TIMEOUT; struct device *dev = host->dev; + for (loop = 0; loop < timeout; loop++) { status = sdricoh_readl(host, R21C_STATUS); sdricoh_writel(host, R2E4_STATUS_RESP, status); @@ -215,8 +217,7 @@ static int sdricoh_blockio(struct sdricoh_host *host, int read, u32 data = 0; /* wait until the data is available */ if (read) { - if (sdricoh_query_status(host, STATUS_READY_TO_READ, - TRANSFER_TIMEOUT)) + if (sdricoh_query_status(host, STATUS_READY_TO_READ)) return -ETIMEDOUT; sdricoh_writel(host, R21C_STATUS, 0x18); /* read data */ @@ -232,8 +233,7 @@ static int sdricoh_blockio(struct sdricoh_host *host, int read, } } } else { - if (sdricoh_query_status(host, STATUS_READY_TO_WRITE, - TRANSFER_TIMEOUT)) + if (sdricoh_query_status(host, STATUS_READY_TO_WRITE)) return -ETIMEDOUT; sdricoh_writel(host, R21C_STATUS, 0x18); /* write data */ @@ -323,8 +323,7 @@ static void sdricoh_request(struct mmc_host *mmc, struct mmc_request *mrq) sdricoh_writel(host, R208_DATAIO, 1); - if (sdricoh_query_status(host, STATUS_TRANSFER_FINISHED, - TRANSFER_TIMEOUT)) { + if (sdricoh_query_status(host, STATUS_TRANSFER_FINISHED)) { dev_err(dev, "sdricoh_request: transfer end error\n"); cmd->error = -EINVAL; }