Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1651123

Re: Why does callback irq_startup in struct irq_chip return _unsigned_ int ?

From Thomas Gleixner <tglx@linutronix.de>
Newsgroups linux.kernel
Subject Re: Why does callback irq_startup in struct irq_chip return _unsigned_ int ?
Date 2017-05-26 09:20 +0200
Message-ID <tLhHr-2RG-13@gated-at.bofh.it> (permalink)
References <tL8ut-55g-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Heiner,

On Thu, 25 May 2017, Heiner Kallweit wrote:
> just by chance I noticed that callback irq_startup in struct irq_chip
> returns an unsigned int.
> This doesn't seem to make sense as the result is a normal retval which
> is casted to a signed int in function irq_startup() anyway.
> 
> Is there any specific reason for this or is it simply a bug?

/me scratches head.

IIRC then it was made unsigned int because that function cannot fail, but
can return that an interrupt was pending.

So if at all the thing should be 'bool'.

Thanks,

	tglx

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Why does callback irq_startup in struct irq_chip return _unsigned_  int ? Heiner Kallweit <hkallweit1@gmail.com> - 2017-05-25 23:30 +0200
  Re: Why does callback irq_startup in struct irq_chip return _unsigned_  int ? Thomas Gleixner <tglx@linutronix.de> - 2017-05-26 09:20 +0200

csiph-web