From patchwork Sun Sep 8 10:12:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 173341 Delivered-To: patches@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp3003070ilq; Sun, 8 Sep 2019 03:12:50 -0700 (PDT) X-Received: by 2002:a19:9104:: with SMTP id t4mr12006727lfd.179.1567937570082; Sun, 08 Sep 2019 03:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567937570; cv=none; d=google.com; s=arc-20160816; b=ylimVbQtNEiTNnGau12HGBK6YO5MpHwWtWIMlPEs168WNVPUTHlCDgH2+ehOns2Gza 7zNS2qj9ZlBo9pEnjL6wfvxUh5BFxG5oBh3VwZ24t6Bvsqpm+Xr4AA3kPvw1JNG2Md69 pP8hbjuqKdc3dcOCgiu+PAe4cI34Czxj8wmyp7PgVMUsadr8hxbF1S4mFsXWbuPoW2xl vw+U/ZrnjA9NPm4D7mNBcWRR91R8i0QOHe/1cU/GlczzBehuKw4kBmq9tTApxDYPuaeh m19If8rvVtnncPDLT0GTZ6AId+I3Yn/jdhvg56s9ci1AjxEIRESTU9G6erePRn6y8xPr b7ow== 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=0sPoOSzMWXk49KLRI+pedfbA4qsHre5+gtEz1gpf9mk=; b=0anFMtCRMolswpJMW4tB48y4wTfX7VEhw5RHVjNlDZ3moSJtXf45+q9jUX7BAqmVas RIyqaYzr29OIoS5bxSQDj7toBn68WwSZLHUrF4RA1apo/v5HwCkPZY7ZK1y5eYLYIuBk nDDfoAu7rnBCq8JtrkEmScfhZHWLuWHlHosx0Gni8pKgybLE7ylRj81wkMUPuVXRuijp BF4Cj5/BaldYmPNH6sT2QicxQ6oUTADv6ayTt2A37HPUU0OeSkH54j+8UAB8a83ZcuBo dXKOJIryXPqd4HerOKbRYxV0KRQoceqUyG84qwTWUfo2Dy8WaVP8stw9E6YZPenyHhZY F7aQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="sV/VcYZ2"; 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 b13sor5647460lji.28.2019.09.08.03.12.49 for (Google Transport Security); Sun, 08 Sep 2019 03:12:50 -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="sV/VcYZ2"; 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=0sPoOSzMWXk49KLRI+pedfbA4qsHre5+gtEz1gpf9mk=; b=sV/VcYZ2BooaL1Ed4/JLXyL+FFPx5r/Fg0Pt5aluWRCqss/4oGxxSjBGWqBioYI5RU v4SxQ+SPBdlAysfX9R6Yy8SxWWzozZ5+wno5kdF3I4MiVMlRlGDB+R9wkXB9MB4D73Fo QvbA14N96UHo/B3KRfTNMSLbH2q4XbwA8aJMyG+FCAnJ1t+3xd8D3cKKursF++iAAyP5 Dg2CIP52xIMApN5VBqLNAmTEL3rx8ZvpvLizycZnrIBFpcWnhCOd9MBJl9v/72ZLiAu+ GAOKWgrHwEeV9PfQ2dFG/yN7qLDoEQ8qtD19py0d52XwpqCzGz6z8vjZ5hShIlC9/swQ oMmQ== 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=0sPoOSzMWXk49KLRI+pedfbA4qsHre5+gtEz1gpf9mk=; b=kWUtMiGGbOzV3ipuAp3ZjLfPtd67gk64BdAbw3WqDozeDRKvlOgjsGZNc6awoUUn+T v7J56/6/l8mnC/l7GESFgvVlc7UPRRiCSFrG5lFxlwbff3Eqcy6X3LImbjndKlL7WHM1 rAyZUbVe4JhnQaWkVLLB6Fq5U/qlp5QX1jSqx0VJ3vEYmWymadgr5EE4j5G0wRm3iMZf DPfuCiItmDANrDr2rD7xUuxRTXwzaZuPkQ55aK5n0ohXEFVtpOBAm7ojosHPWN4R9UC4 JWHAh0o0I1zsYFTSzvKgd/eVopQxF7O4bQC4kwmDmZbqIsChVF2yuEGJ5JMTqcJKlUbh Rukw== X-Gm-Message-State: APjAAAX62CAf5XzCfJSi/V49LPuxQC3CTfbqipxBe2RTKGFd475JYId0 cO38lv7AWH1yTaAeFnu9gmcbPB2D X-Google-Smtp-Source: APXvYqxsu+ihTaK46jp2BGSVrQH8cszNNO0DDP2bedFXjb8aIitfZqu6ZSJZy99q998j7SGRNa6VEA== X-Received: by 2002:a2e:b4e3:: with SMTP id s3mr12408526ljm.143.1567937569769; Sun, 08 Sep 2019 03:12:49 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([185.122.190.73]) by smtp.gmail.com with ESMTPSA id h25sm2444849lfj.81.2019.09.08.03.12.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Sep 2019 03:12:49 -0700 (PDT) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson , Adrian Hunter , Douglas Anderson , Matthias Kaehlcke Cc: Shawn Lin , Jaehoon Chung , Yong Mao , Chaotian Jing , linux-kernel@vger.kernel.org Subject: [PATCH v2 06/11] mmc: core: Clarify that the ->ack_sdio_irq() callback is mandatory Date: Sun, 8 Sep 2019 12:12:31 +0200 Message-Id: <20190908101236.2802-7-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190908101236.2802-1-ulf.hansson@linaro.org> References: <20190908101236.2802-1-ulf.hansson@linaro.org> For the MMC_CAP2_SDIO_IRQ_NOTHREAD case and when using sdio_signal_irq(), the ->ack_sdio_irq() is already mandatory, which was not the case for those host drivers that called sdio_run_irqs() directly. As there are no longer any drivers calling sdio_run_irqs(), let's clarify the code by dropping the unnecessary check and explicitly state that the callback is mandatory in the header file. Tested-by: Matthias Kaehlcke Reviewed-by: Matthias Kaehlcke Signed-off-by: Ulf Hansson --- drivers/mmc/core/sdio_irq.c | 3 +-- include/linux/mmc/host.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.17.1 Reviewed-by: Douglas Anderson diff --git a/drivers/mmc/core/sdio_irq.c b/drivers/mmc/core/sdio_irq.c index 0962a4357d54..d7965b53a6d2 100644 --- a/drivers/mmc/core/sdio_irq.c +++ b/drivers/mmc/core/sdio_irq.c @@ -115,8 +115,7 @@ static void sdio_run_irqs(struct mmc_host *host) mmc_claim_host(host); if (host->sdio_irqs) { process_sdio_pending_irqs(host); - if (host->ops->ack_sdio_irq) - host->ops->ack_sdio_irq(host); + host->ops->ack_sdio_irq(host); } mmc_release_host(host); } diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index a9d52a4d5041..0e6afe66cf68 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -128,6 +128,7 @@ struct mmc_host_ops { int (*get_cd)(struct mmc_host *host); void (*enable_sdio_irq)(struct mmc_host *host, int enable); + /* Mandatory callback when using MMC_CAP2_SDIO_IRQ_NOTHREAD. */ void (*ack_sdio_irq)(struct mmc_host *host); /* optional callback for HC quirks */