From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752438AbeBALfj (ORCPT ); Thu, 1 Feb 2018 06:35:39 -0500 Received: from mail-oi0-f68.google.com ([209.85.218.68]:45428 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752413AbeBALfe (ORCPT ); Thu, 1 Feb 2018 06:35:34 -0500 X-Google-Smtp-Source: AH8x227Tt+xrRZ6BBYq4PYLOnoI+fpn5oiLB0zIIbjwy5nVb6sK7jpX8WqeliJS45h0ifVp18WSWOR7CJ/iP0bKvBGs= MIME-Version: 1.0 In-Reply-To: References: From: Arnd Bergmann Date: Thu, 1 Feb 2018 12:35:33 +0100 X-Google-Sender-Auth: zeHVM7HyNn4OJe6C8ZhRpXuDZQA Message-ID: Subject: Re: [tip:irq/urgent] genirq: Make legacy autoprobing work again To: Geert Uytterhoeven Cc: Linux Kernel Mailing List , "H. Peter Anvin" , Thomas Gleixner , Meelis Roos , Ingo Molnar , linux-tip-commits@vger.kernel.org, kbuild test robot Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 1, 2018 at 9:15 AM, Geert Uytterhoeven wrote: >> +++ b/kernel/irq/chip.c >> @@ -294,11 +294,11 @@ int irq_activate(struct irq_desc *desc) >> return 0; >> } >> >> -void irq_activate_and_startup(struct irq_desc *desc, bool resend) >> +int irq_activate_and_startup(struct irq_desc *desc, bool resend) >> { >> if (WARN_ON(irq_activate(desc))) >> return; > > As reported by 0day, this should return something. > > if CONFIG_IRQ_DOMAIN=n or CONFIG_IRQ_DOMAIN_HIERARCHY=n, > irq_activate() will never return 1, and the code path can be eliminated. > > BTW, is gcc becoming too smart, and already eliminating code before it > generates warnings for it? Recently I've seen some other cases where buggy > code was not warned about, as it was considered not having any impact. > I've tried my collection of compiler versions, and they produce a warning here on my box. Arnd