From patchwork Mon Dec 10 16:52:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 10721777 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C424918E8 for ; Mon, 10 Dec 2018 16:53:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B279E2A810 for ; Mon, 10 Dec 2018 16:53:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6A992A827; Mon, 10 Dec 2018 16:53:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C0902A810 for ; Mon, 10 Dec 2018 16:53:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727529AbeLJQxJ (ORCPT ); Mon, 10 Dec 2018 11:53:09 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:34664 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728007AbeLJQwv (ORCPT ); Mon, 10 Dec 2018 11:52:51 -0500 Received: by mail-lf1-f65.google.com with SMTP id p6so8539478lfc.1 for ; Mon, 10 Dec 2018 08:52:49 -0800 (PST) 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=V22VZ/qtHeHwmBH5FUkElluUpeyt8M78z5UvAjTJvFE=; b=RBb4KMtFb+BjZ087pBJhfBP+eKrGW8MtaVTB2g4K7VolVP27gIRTldv/d8WaHKXGYo riNnZnUomVL0Bvvr8+aFlLzGcmEJdJZZ9vJeAxEY+OZnOEYXMVV2a0bX86TkiGcbdICa LRy7Xe/KOjJsUNAShA0R9gsAtMtIW0YH1epc8= 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=V22VZ/qtHeHwmBH5FUkElluUpeyt8M78z5UvAjTJvFE=; b=CH4EXN+x5y1aNT1MHtfQVpgflpRGaUmj5eOFLi0+Qn85Vr/XKgzwXysJ6r9bmgFwcV OzlDbOIpIDW3dlnOMG2C8Slcssb8aARqYUQUAvv345hVLEtC7vDLUFHGTXlxFFafQ+jl 4XSISa/h6FyRSfLxiGZaguXvX8kN9gVIqnQtvX5AOwoYrWQli37NYb8c6D5BzKMML1Jr 9my/JIeQFo/jAOKNlEau2GixlH2S3nLh7sZS6j7uJhxYg0nNGfsDL/oK8UcC3oKEnopu m26U3fo9eOLpX4xMuGjkqFDXSt7DmDmZ+Pu/JgqkVeEM2PSreBnUVEZFxar0OhvkeJR3 JSng== X-Gm-Message-State: AA+aEWbaaLPMBHia5e2q16XxtfEfzGlaLmKQf2TvILLvICAxRxDL9t5J I4TqUEbfGw/4B/ttbEBTZDnKgEem8yyiRQ== X-Google-Smtp-Source: AFSGD/XpkTO6mT8rp73JR9KURAhdj+8cHfnIIlL3fXCebhUHtTTSquL1i3Z6f6VmMUTpGIjw/kctUw== X-Received: by 2002:a19:4d8d:: with SMTP id a135mr7796126lfb.80.1544460768706; Mon, 10 Dec 2018 08:52:48 -0800 (PST) Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id w9sm2194574lfc.66.2018.12.10.08.52.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Dec 2018 08:52:48 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Wolfram Sang , Adrian Hunter , Sjoerd Simons , Faiz Abbas , Jaehoon Chung , Shawn Lin Subject: [PATCH 4/5] mmc: core: Drop redundant check in mmc_send_hpi_cmd() Date: Mon, 10 Dec 2018 17:52:39 +0100 Message-Id: <20181210165240.23101-5-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181210165240.23101-1-ulf.hansson@linaro.org> References: <20181210165240.23101-1-ulf.hansson@linaro.org> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no point checking if HPI is supported in mmc_send_hpi_cmd() as mmc_interrupt_hpi(), which is the only caller, already checks if HPI has been enabled. Therefore, let's drop the check and the corresponding error path. Signed-off-by: Ulf Hansson --- drivers/mmc/core/mmc_ops.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/mmc/core/mmc_ops.c b/drivers/mmc/core/mmc_ops.c index 873b2aa0c155..ffc74d44ee67 100644 --- a/drivers/mmc/core/mmc_ops.c +++ b/drivers/mmc/core/mmc_ops.c @@ -802,12 +802,6 @@ static int mmc_send_hpi_cmd(struct mmc_card *card, u32 *status) unsigned int opcode; int err; - if (!card->ext_csd.hpi) { - pr_warn("%s: Card didn't support HPI command\n", - mmc_hostname(card->host)); - return -EINVAL; - } - opcode = card->ext_csd.hpi_cmd; if (opcode == MMC_STOP_TRANSMISSION) cmd.flags = MMC_RSP_R1B | MMC_CMD_AC;