public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Geordan Neukum <gneukum1@gmail.com>
Cc: devel@driverdev.osuosl.org, YueHaibing <yuehaibing@huawei.com>,
	Mao Wenan <maowenan@huawei.com>,
	linux-kernel@vger.kernel.org,
	Nathan Chancellor <natechancellor@gmail.com>,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH 5/5] staging: kpc2000: kpc_spi: use devm_* API to manage mapped I/O space
Date: Mon, 3 Jun 2019 14:16:43 +0200	[thread overview]
Message-ID: <20190603121643.GA25274@kroah.com> (raw)
In-Reply-To: <ea222a6da192a4eb0ba9c8c840843f240f414092.1559488571.git.gneukum1@gmail.com>

On Sun, Jun 02, 2019 at 03:58:37PM +0000, Geordan Neukum wrote:
> The kpc_spi driver does not unmap its I/O space upon error cases in the
> probe() function or upon remove(). Make the driver clean up after itself
> more maintainably by migrating to using the managed resource API.
> 
> Signed-off-by: Geordan Neukum <gneukum1@gmail.com>
> ---
>  drivers/staging/kpc2000/kpc2000_spi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
> index b513432a26ed..32d3ec532e26 100644
> --- a/drivers/staging/kpc2000/kpc2000_spi.c
> +++ b/drivers/staging/kpc2000/kpc2000_spi.c
> @@ -471,7 +471,8 @@ kp_spi_probe(struct platform_device *pldev)
>  		goto free_master;
>  	}
>  
> -	kpspi->phys = (unsigned long)ioremap_nocache(r->start, resource_size(r));
> +	kpspi->phys = (unsigned long)devm_ioremap_nocache(&pldev->dev, r->start,
> +							  resource_size(r));

Why is this being cast?  This should just be an __iomem *, right?

>  	kpspi->base = (u64 __iomem *)kpspi->phys;

Then that cast will go away :)

Anyway, something for a future patch, this one is fine, thanks.

greg k-h

      reply	other threads:[~2019-06-03 12:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-02 15:58 [PATCH 0/5] staging: kpc2000: kpc_spi: Assorted small fixes Geordan Neukum
2019-06-02 15:58 ` [PATCH 1/5] staging: kpc2000: kpc_spi: Remove unnecessary consecutive newlines Geordan Neukum
2019-06-02 15:58 ` [PATCH 2/5] staging: kpc2000: kpc_spi: column-align switch and subordinate cases Geordan Neukum
2019-06-02 15:58 ` [PATCH 3/5] staging: kpc2000: kpc_spi: remove fifo_depth from kp_spi struct Geordan Neukum
2019-06-02 15:58 ` [PATCH 4/5] staging: kpc2000: kpc_spi: remove function kp_spi_bytes_per_word() Geordan Neukum
2019-06-02 15:58 ` [PATCH 5/5] staging: kpc2000: kpc_spi: use devm_* API to manage mapped I/O space Geordan Neukum
2019-06-03 12:16   ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190603121643.GA25274@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gneukum1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maowenan@huawei.com \
    --cc=natechancellor@gmail.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox