linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: Michal Simek <michal.simek@xilinx.com>,
	linux-kernel@vger.kernel.org,
	Kedareswara rao Appana <appana.durga.rao@xilinx.com>,
	Kedareswara rao Appana <appanad@xilinx.com>,
	Jean Delvare <khali@linux-fr.org>,
	Peter Korsgaard <jacmet@sunsite.dk>,
	linux-i2c@vger.kernel.org
Subject: Re: [PATCH v2 3/3] i2c: xilinx: Use devm_* functions
Date: Fri, 04 Oct 2013 11:16:20 +0200	[thread overview]
Message-ID: <524E8764.4030704@monstr.eu> (raw)
In-Reply-To: <20131004053323.GB3194@katana>

[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]

On 10/04/2013 07:33 AM, Wolfram Sang wrote:
> 
>> +	i2c->base = devm_ioremap_resource(&pdev->dev, res);
>> +	if (IS_ERR(i2c->base)) {
>> +		dev_err(&pdev->dev, "Could not allocate iomem\n");
> 
> devm_ioremap_resource already prints error messages.

you are right.

> 
>> +	ret = devm_request_irq(&pdev->dev, irq, xiic_isr, 0, pdev->name, i2c);
> 
> This is too early. Can you find out why?

Why do you think that it is too early?
I am looking at origin code again and I think that the code
is also problematic because in xiic_reinit() interrupts are enabled
but they are requested later.
Shouldn't be there a logic that interrupts should be enabled when
interrupts are registered by the kernel?

>> +	pdata = (struct xiic_i2c_platform_data *)dev_get_platdata(&pdev->dev);
> 
> Casting a void pointer?

No problem with that.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/
Maintainer of Linux kernel - Xilinx Zynq ARM architecture
Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

  reply	other threads:[~2013-10-04  9:16 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-30 14:15 [PATCH v2 1/3] i2c: xilinx: Fix i2c checkpatch warnings Michal Simek
2013-09-30 14:15 ` [PATCH v2 2/3] i2c: xilinx: Set tx direction in write operation Michal Simek
2013-10-04  5:46   ` Wolfram Sang
2013-10-04  9:53     ` Michal Simek
2013-10-04 11:55       ` Wolfram Sang
2013-10-04 12:12         ` Lars-Peter Clausen
2013-10-04 13:09           ` Michal Simek
2013-10-04 13:38             ` Lars-Peter Clausen
2013-10-04 13:38               ` Michal Simek
2013-10-07  9:19                 ` Appana Durga Kedareswara Rao
2013-09-30 14:15 ` [PATCH v2 3/3] i2c: xilinx: Use devm_* functions Michal Simek
2013-10-04  5:33   ` Wolfram Sang
2013-10-04  9:16     ` Michal Simek [this message]
2013-10-04 11:58       ` Wolfram Sang
2013-10-04 12:04         ` Michal Simek
2013-10-05  5:59           ` Wolfram Sang

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=524E8764.4030704@monstr.eu \
    --to=monstr@monstr.eu \
    --cc=appana.durga.rao@xilinx.com \
    --cc=appanad@xilinx.com \
    --cc=jacmet@sunsite.dk \
    --cc=khali@linux-fr.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=wsa@the-dreams.de \
    /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;
as well as URLs for NNTP newsgroup(s).