Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1227405lqp; Sun, 14 Apr 2024 22:22:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXoOjJcGz074oxwTfmW/gcXRMuM7v5xbWyY+ZPx8QEsXUG0L/H1RxRDFpcbomcC+5Os1d1g8Y8LkzyIwEKLH7/68khMqIcXUSRQbJbjQA== X-Google-Smtp-Source: AGHT+IF7dV6M99WWGohbJ6QxEibHh425g25GG4KNRVx/s0tHKqa6AiuI63F4EaW+8gQltVUhh1qF X-Received: by 2002:aca:2108:0:b0:3c7:150a:f75b with SMTP id 8-20020aca2108000000b003c7150af75bmr1323602oiz.56.1713158545818; Sun, 14 Apr 2024 22:22:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713158545; cv=pass; d=google.com; s=arc-20160816; b=RhLq06m0aiEZhF3N1aa4oSMBhR709OO15kpBVvYjdmyDtlRKTODslfHhEV32CSCTqW wdVrnQtP88XyKilLyoYNe5BhMS6r7oWrF3tuhwKx/xb1Q7MhxPbRd4EoBywrnoRIrVs+ gpQpAuGgF3doeeK0Eh8pvL6mr8BovMPxtX/ctFazcMb8UicJ7VK6kBXey6xJkaxQ5HqR Jj9IOkTYeirUQAYW3V8/dhra1yFHi94YQDDEjL3/PwdoaBZYIwkvvl+zd9MFf38oEyDr WxARj1iSMDS7K6za3LxJ9RMMY2A/OB8XK0dTV2/g7OwSDGY7BkoRzBG3OHSRqm7H4nfM S3xQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=e+coi2XuyVt27S+sawO0+ct4WY40vRADSePAuZ4om2Q=; fh=2yWt0PI0DrDGi9O3Rutbao4dF6hA9YDYFcVi7/BQB2Q=; b=ecL70FcLKTeL1L6Tax6NA0pYvbZlqlSgo3OthygOiJx6K9Cb9tn5i0ADmmNuyPocJW HAciDX9Lw4uKWIlTqLBe3ASK3BNnuukJMsUjLMOjZLItcfLPrkxJ9j8jp3Wmn/jMNZ9b cEjvIj4oOJt9VRj6WQgcq5XVknpf6IktvvB6AxhfXwCDzy5PNQ22nWK5iG1feaxkNsfk jep2ReMOjA2jUp0RZslI40M7QwqpcdY0JmPlCGMLdOp6bLj9MRcJAVgMAHvoWkYLtsn8 4bTiWFQvHwxDp/l0k4pyfTg+8NEVX4ABgTpX4pG4sZgfAg1bQ7pN0L5OMnHgmjpjGGw2 hvKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=eBcGSnfF; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-144537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id m16-20020a6562d0000000b005e4e759dd6fsi7189243pgv.433.2024.04.14.22.22.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Apr 2024 22:22:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-144537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@wanadoo.fr header.s=t20230301 header.b=eBcGSnfF; arc=pass (i=1 spf=pass spfdomain=wanadoo.fr dkim=pass dkdomain=wanadoo.fr dmarc=pass fromdomain=wanadoo.fr); spf=pass (google.com: domain of linux-kernel+bounces-144537-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-144537-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=wanadoo.fr Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9B0AAB21E9D for ; Mon, 15 Apr 2024 05:22:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5E59FC11; Mon, 15 Apr 2024 05:22:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="eBcGSnfF" Received: from smtp.smtpout.orange.fr (smtp-16.smtpout.orange.fr [80.12.242.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C19AFDDA0; Mon, 15 Apr 2024 05:22:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713158527; cv=none; b=FHoa7X5V2Hp5K/O+IbhL9blFJJFl3bBBzJ77QsL+mS4dJ3zTQM7OZnVzy7nZpcN1c+vB6zo8AE87RBewtglXgS/NdBniw6gDyhWehYqAziNGXKdMLKTndJ0g4gBHNOyzo6gJulMdts+1KNEquO6C32yiw0oqxZULh8mzEjWwnBs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713158527; c=relaxed/simple; bh=af+vCRXyspSi9MJ0pzGRGuEN+y5mi6S+Gs2cHujIqH4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Uq5qY4iHQM69oOQig+oecpltCbgbKSgnk75wk5+LJNz7Bclz3hu8L7SrfIms1EyjGIlsLqxqhdiHKs9JrXHdImHQEvEygLI0bKiObz3o46rCgkkJN75p7rUtWLSd1Uh2LgDZcXNvuhsCl690IS2e57U1Z/3y1XOojzo4vWzcJdc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=eBcGSnfF; arc=none smtp.client-ip=80.12.242.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Received: from [192.168.1.18] ([86.243.17.157]) by smtp.orange.fr with ESMTPA id wEltrhWOB6xfSwEltr3EP3; Mon, 15 Apr 2024 07:20:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1713158451; bh=e+coi2XuyVt27S+sawO0+ct4WY40vRADSePAuZ4om2Q=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=eBcGSnfFRZpQCrq0tFRGpc9UskSnQVSvwdaDbTHmuLJHlDyal1yldoi0VkObbgki1 GfRoj8hxjcXuNnKYQDGw9t0aI/mRTzSdlNft8YE8QylB4pyGuEEtqgMcQ/i0dxs3XS CgQ1cdzkJ2+x0IpIq4WCmqsGSx195jgU5vkjRBFPaQKsFhKSwtgzA/uapMQN8XosBa eipJ7EVDkOhzsqQi7N8JxCssgUEjPV907amEfqah4BtAtPJdC6pd9Cjwdpmka7CxFZ hW+BlngWFO8c/9Ou12h7fTO+ldRbWg0gCIHEA53748cuoMEi97a4YiTImxlW/criqt EJ2pcsUINSuxg== X-ME-Helo: [192.168.1.18] X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Mon, 15 Apr 2024 07:20:51 +0200 X-ME-IP: 86.243.17.157 Message-ID: Date: Mon, 15 Apr 2024 07:20:49 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/2] mmc: sdhci-acpi: Use devm_platform_ioremap_resource() To: Andy Shevchenko , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Adrian Hunter , Ulf Hansson References: <20240412184706.366879-2-andriy.shevchenko@linux.intel.com> <20240412184706.366879-4-andriy.shevchenko@linux.intel.com> Content-Language: en-MW From: Christophe JAILLET In-Reply-To: <20240412184706.366879-4-andriy.shevchenko@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Le 12/04/2024 à 20:46, Andy Shevchenko a écrit : > The struct resource is not used for anything else, so we can simplify > the code a bit by using the helper function. > > Signed-off-by: Andy Shevchenko > --- > drivers/mmc/host/sdhci-acpi.c | 20 +++----------------- > 1 file changed, 3 insertions(+), 17 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c > index 32ae6f763c1d..b9c8eb87a01a 100644 > --- a/drivers/mmc/host/sdhci-acpi.c > +++ b/drivers/mmc/host/sdhci-acpi.c > @@ -779,8 +779,6 @@ static int sdhci_acpi_probe(struct platform_device *pdev) > struct acpi_device *device; > struct sdhci_acpi_host *c; > struct sdhci_host *host; > - struct resource *iomem; > - resource_size_t len; > size_t priv_size; > int quirks = 0; > int err; > @@ -801,17 +799,6 @@ static int sdhci_acpi_probe(struct platform_device *pdev) > if (sdhci_acpi_byt_defer(dev)) > return -EPROBE_DEFER; > > - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); > - if (!iomem) > - return -ENOMEM; > - > - len = resource_size(iomem); > - if (len < 0x100) > - dev_err(dev, "Invalid iomem size!\n"); HI, Was this test useful? Should it be mentioned in the commit message? CJ > - > - if (!devm_request_mem_region(dev, iomem->start, len, dev_name(dev))) > - return -ENOMEM; > - > priv_size = slot ? slot->priv_size : 0; > host = sdhci_alloc_host(dev, sizeof(struct sdhci_acpi_host) + priv_size); > if (IS_ERR(host)) > @@ -833,10 +820,9 @@ static int sdhci_acpi_probe(struct platform_device *pdev) > goto err_free; > } > > - host->ioaddr = devm_ioremap(dev, iomem->start, > - resource_size(iomem)); > - if (host->ioaddr == NULL) { > - err = -ENOMEM; > + host->ioaddr = devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(host->ioaddr)) { > + err = PTR_ERR(host->ioaddr); > goto err_free; > } >