From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1947088AbdEZHNJ (ORCPT ); Fri, 26 May 2017 03:13:09 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:39794 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764374AbdEZHNI (ORCPT ); Fri, 26 May 2017 03:13:08 -0400 Date: Fri, 26 May 2017 09:13:06 +0200 (CEST) From: Thomas Gleixner To: Heiner Kallweit cc: Linux Kernel Mailing List Subject: Re: Why does callback irq_startup in struct irq_chip return _unsigned_ int ? In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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