public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: linux-kernel@vger.kernel.org
Subject: Re: request_irq() return value
Date: Thu, 27 Jul 2006 11:13:17 -0700	[thread overview]
Message-ID: <20060727111317.109bfc4d@localhost.localdomain> (raw)
In-Reply-To: 200607271950.03370.m.kozlowski@tuxland.pl

On Thu, 27 Jul 2006 19:50:03 +0200
Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:

> Hello,
> 
> 	I'm looking at the source code of different drivers and wondering about 
> request_irq() return value. It is used mostly in 'open' routine of struct 
> net_device. If request_irq() fails some drivers return -EAGAIN, some -EBUSY 
> and some the return value of request_irq(). Is this intentional? Sample 
> drivers code:

Correct practice is to propagate the error code of request_irq out to be
the return value of the open routine. This allows the request_irq to return
different values for overlapping irqs, or out of memory, etc.

> Besides request_irq() is arch dependent so depending on arch it has different 
> set of possible return values. So ... does the return value matter or I 
> misunderstood something here?

Each architecture should return something sane. If it doesn't then it a problem
that should be addressed there.

  reply	other threads:[~2006-07-27 18:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-27 17:50 request_irq() return value Mariusz Kozlowski
2006-07-27 18:13 ` Stephen Hemminger [this message]
2006-07-27 18:16 ` Lukas Jelinek

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=20060727111317.109bfc4d@localhost.localdomain \
    --to=shemminger@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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