Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp1619573ybf; Thu, 27 Feb 2020 14:39:16 -0800 (PST) X-Google-Smtp-Source: APXvYqxHdbKDdBmtnT1vMUBbruVj36BjnyfF6FqF/P+V1ILLyzItrtepRHAOxBeknL2pZP3mgGJQ X-Received: by 2002:aca:d507:: with SMTP id m7mr982247oig.48.1582843155984; Thu, 27 Feb 2020 14:39:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582843155; cv=none; d=google.com; s=arc-20160816; b=pkvUlFhUtwwyyHssEwa6PUxPafjmBGGs7dlvcNWKdJyZXGfuznHi/kX85/sUN5Juv0 BZlxw2vngf3DvveenF+YLIOJFAKsWaqrafkhH4QdwCyhI1z1FZstv3O2mozVHR6Mg32J xgEEQle0lbwXRwZ1WDKrbL1mceUISjyOa6baCCCCftEYak23bc4qr8zmuiQMVScmGy54 drLfrWg4GfELmKEGEzIQJhEockUJPY3dshm3kDALW+LJE6dBGmw8MQ22JiVSkz6gdO78 sphm0lcM4g1X1whh8XWzCUpm1wNgHrRv82UqGQetGliwCWODYgy2WRjMagz8rUNbM2Nn dzMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:message-id :in-reply-to:subject:cc:to:from:date; bh=K2Je97BqpKFV94KF8nwR+z1gfUTV1eAst/mhzOvM39Y=; b=imeOchRCmb/lY19JM0ji3P4g9iK5xpDfBG3Mbo1tENsEW2WE4wxKlRP4XTHhQgQC0a 5CL+wzOAh5vs468IC+eImkn+9XDhyo5ZVA3tF7N4EyEiK3m0m3GfPWHXfVgHsnuvTKU8 yzTiFnANJ0NMf9+zq57V3OdRPAiKju+tLRu1zQZYFcncIl8Ag+OCnp/kQg5+dL/mwKjy Onyp+nZcEDL9ltiZqIW39h6lI+frNeMnRxew0LGWnJyf306R8lZzQhYUqeVX3Pq1pD3w WtB4JsUJO04uRp67z20cf5c/FMd872WHT6Zh4+ZUhUeitowLGPWjm/ziKucqKtAFKOih U+GQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c189si646198oig.74.2020.02.27.14.39.02; Thu, 27 Feb 2020 14:39:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730309AbgB0Wib (ORCPT + 99 others); Thu, 27 Feb 2020 17:38:31 -0500 Received: from kvm5.telegraphics.com.au ([98.124.60.144]:33546 "EHLO kvm5.telegraphics.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730086AbgB0Wib (ORCPT ); Thu, 27 Feb 2020 17:38:31 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by kvm5.telegraphics.com.au (Postfix) with ESMTP id 67C4E2A160; Thu, 27 Feb 2020 17:38:28 -0500 (EST) Date: Fri, 28 Feb 2020 09:38:20 +1100 (AEDT) From: Finn Thain To: afzal mohammed cc: Geert Uytterhoeven , Greg Ungerer , linux-m68k , Linux Kernel Mailing List , Thomas Gleixner Subject: Re: [PATCH v2 06/18] m68k: Replace setup_irq() by request_irq() In-Reply-To: <20200227120618.GA6312@afzalpc> Message-ID: References: <73c3ad08-963d-fea2-91d7-b06e4ef8d3ef@linux-m68k.org> <20200227081805.GA5746@afzalpc> <20200227120618.GA6312@afzalpc> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Feb 2020, afzal mohammed wrote: > On Thu, Feb 27, 2020 at 09:32:46AM +0100, Geert Uytterhoeven wrote: > > On Thu, Feb 27, 2020 at 9:18 AM afzal mohammed wrote: > > > Since most of the existing setup_irq() didn't even check & handle > > > error return, my first thought was just s/setup_irq/request_irq, it > > > was easier from scripting pointing of view. i felt uncomfortable > > > doing nothing in case of error. Also noted that request_irq() > > > definition has a "__much_check", so decided to add it. > > > > Most (all?) of the code calling setup_irq() is very old, and most of > > the calls happen very early, so any such failures are hard failures > > that prevent the system from booting at all. Hence printing a message > > may be futile, as it may happen before the console has been > > initialized (modulo early-printk). > > The main reason to at least acknowledge the return value was due to > __much_check in request_irq() definition, though w/ the compiler that i > used, there were no warnings, i feared that it might warn w/ some other > compilers & in some cases (may be W=[1-3] ?). > This isn't new code, so I'd assume it's been "checked" in the sense of "reviewed and tested". So the lack of an error message could be taken to mean that there's no need for an error message. If you want to stop the compiler complaining about an unchecked return value, assuming that it does so, please consider using if (request_irq(...)) pr_debug(...); That way there is no penalty paid for adding error messages that the original author apparently did not want.