mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jingoo Han <jg1.han@samsung.com>
To: "'Lars-Peter Clausen'" <lars@metafoo.de>
Cc: "'Andrew Morton'" <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org,
	"'Alessandro Zummo'" <a.zummo@towertech.it>,
	rtc-linux@googlegroups.com, "'Jingoo Han'" <jg1.han@samsung.com>,
	"'Thierry Reding'" <thierry.reding@gmail.com>
Subject: Re: [PATCH 3/4] rtc: rtc-jz4740: Use devm_ioremap_resource()
Date: Fri, 07 Feb 2014 17:31:06 +0900	[thread overview]
Message-ID: <001801cf23de$f1b708d0$d5251a70$%han@samsung.com> (raw)
In-Reply-To: <52F495A4.70400@metafoo.de>

On Friday, February 07, 2014 5:13 PM, Lars-Peter Clausen wrote:
> On 02/07/2014 08:58 AM, Jingoo Han wrote:
> [...]
> > -	rtc->base = devm_ioremap_nocache(&pdev->dev, rtc->mem->start,
> > -					resource_size(rtc->mem));
> > -	if (!rtc->base) {
> > -		dev_err(&pdev->dev, "Failed to ioremap mmio memory\n");
> > -		return -EBUSY;
> > -	}
> > +	mem->flags &= ~IORESOURCE_CACHEABLE;
> 
> You shouldn't be modifying the resource, strictly speaking it is not owned
> by the device. And IORESOURCE_CACHEABLE is never set for this device anyway.

(+cc Thierry Reding)

Hi Lars-Peter Clausen,

Do you mean that resource's flags should NOT be modified by the
device driver, right?
Then, without 'mem->flags &= ~IORESOURCE_CACHEABLE', is it possible 
that devm_ioremap_nocache() can be called at devm_ioremap_resource()?

Thierry,
Do you have any comments on this?

Thank you.

Best regards,
Jingoo Han

> 
> > +	rtc->base = devm_ioremap_resource(&pdev->dev, mem);
> > +	if (IS_ERR(rtc->base))
> > +		return PTR_ERR(rtc->base);
> >
> >   	spin_lock_init(&rtc->lock);
> >
> >


  reply	other threads:[~2014-02-07  8:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-07  7:54 [PATCH 0/4] rtc: " Jingoo Han
2014-02-07  7:55 ` [PATCH 1/4] rtc: rtc-coh901331: " Jingoo Han
2014-02-10  9:26   ` [rtc-linux] " Linus Walleij
2014-02-07  7:57 ` [PATCH 2/4] rtc: rtc-davinci: " Jingoo Han
2014-02-07  7:58 ` [PATCH 3/4] rtc: rtc-jz4740: " Jingoo Han
2014-02-07  8:13   ` Lars-Peter Clausen
2014-02-07  8:31     ` Jingoo Han [this message]
2014-02-07  8:49       ` Lars-Peter Clausen
2014-02-07  7:59 ` [PATCH 4/4] rtc: rtc-vt8500: " Jingoo Han

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='001801cf23de$f1b708d0$d5251a70$%han@samsung.com' \
    --to=jg1.han@samsung.com \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=thierry.reding@gmail.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

all inboxes | Powered by JetHome®