mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Baolin Wang <baolin.wang@linaro.org>,
	"Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Orson Zhai <orsonzhai@gmail.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v2] drivers: gpio: sprd: use devm_platform_ioremap_resource()
Date: Tue, 12 Mar 2019 10:30:24 +0100	[thread overview]
Message-ID: <6c7f2f6c-abda-e552-79e7-fa36951bb670@metux.net> (raw)
In-Reply-To: <CAMz4kuJaFtsmk1sWw_cSc+b0tdNabt_1jZB8hjrJrOgdQkqzmA@mail.gmail.com>

On 12.03.19 09:49, Baolin Wang wrote:

> I still do not think the new API is suitable for this case. Since we
> can have optional multiple IO resources, so the original code will not
> return errors if we did not get the IO resources, but we must cast
> errors if we failed to do ioremap. But you ignore the errors of
> ioremap, which is not good.

hmm, maybe we can differenciate on the error code ?

patch up devm_platform_ioremap_resource() so it returns -ENOENT if
there's no such resource defined. I suppose, ioremap() doesn't have
a valid case for -ENOENT (but haven't checked yet).


--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287

      reply	other threads:[~2019-03-12  9:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AMz4kuKC5haGbhyVJ4gQ6nMRzdaxJnd3SmeCSM-096p7TAp8cA@mail.gmail.com>
2019-03-12  8:08 ` Enrico Weigelt, metux IT consult
2019-03-12  8:49   ` Baolin Wang
2019-03-12  9:30     ` Enrico Weigelt, metux IT consult [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=6c7f2f6c-abda-e552-79e7-fa36951bb670@metux.net \
    --to=lkml@metux.net \
    --cc=baolin.wang@linaro.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=info@metux.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=zhang.lyra@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®