Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2811101imu; Sun, 23 Dec 2018 08:18:15 -0800 (PST) X-Google-Smtp-Source: ALg8bN4iBCdL1BAdyFNcrDOzst161wrOyZts6vz+bRRNmnjAzwiZ9JPGZVAtjFDU/61zCsCZAc33 X-Received: by 2002:a17:902:8484:: with SMTP id c4mr9848707plo.59.1545581895500; Sun, 23 Dec 2018 08:18:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545581895; cv=none; d=google.com; s=arc-20160816; b=YGkFDY0DUaryMuf6Qx0RBP/H6StC7b4zIFKynSSkBGAQex3H9xLUm92TLaHdSo5ko4 cHQJWArB2ufC4yrTwBcdkft4zgNgpzKjkkYsi07pww8uhJP+YbvoNz8DN7GP0K/aK106 t/83GfoaTSpckmtX1973mVk59G/ch8Bkb35kYXJiMgBL1XB68YYmHeQSUOmlQnbGwRHQ 3Hint94uG5jT5SY+KcGc2bnFdC6K463wSZ3YHyG5PmkVMeF2DqK75H1Dc1WzYu7RoGoI im/+Pf0meTdq9JS7QYlx6C52F6cn5KWZkJmZzfM98+lbTg/JAcCajs+SdUEDck4BOXW8 N9fQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0RAEx+rqk0245sfqBVPVCp8l7IXkwUfhdlXdcvWRYb0=; b=SolCiY3DIcanep4WtTe0Gog6yTWaXvN31MvzIrR+iNs8qsWGWRcbae7RRcnOY8IJ36 sKPQ0wHyNjtDxr8FGdTOm8yGAw1twNMmOcPdmVqYTmF3c3YX2dgUsaW+1eJVJ/vKUDaG /GKLas5U1ipyRd9z4AKzow0K2KDUQhmpuuDO3FnTam65SMIVNxnDGYR68mPlzozgPgG2 9hc3XmxC7HMB9t/Y5sNYt88mOX3mtiQjbRhQlW3rQFF9Ufqm+bkI5GKQRu/ca6rnwjpO mRaCYNG9SDHIg8A75HDV7u8y+L0KSTIOL+EKHWnWGOrRTotnLX2esR73EWVKCUtFBH3e 8mmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@armlinux.org.uk header.s=pandora-2014 header.b=gtAkhyCC; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si26715713pgr.345.2018.12.23.08.17.59; Sun, 23 Dec 2018 08:18: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; dkim=neutral (body hash did not verify) header.i=@armlinux.org.uk header.s=pandora-2014 header.b=gtAkhyCC; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404457AbeLVRZN (ORCPT + 99 others); Sat, 22 Dec 2018 12:25:13 -0500 Received: from pandora.armlinux.org.uk ([78.32.30.218]:52400 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731167AbeLVRZM (ORCPT ); Sat, 22 Dec 2018 12:25:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=apuqiLj+TpxWJk6SYegcyJnD0U8ddp+XTxXkAZSGQJI=; b=gtAkhyCCS8LMlAogxjgM00QaQ RpDi5sFKB7qWgJRmi2gSL1VA2kj0j4QKiqumdHVaoSVKvlexBLNOxhOD/09LGxpdES5Xq0Rmz9lzw Gy+HER2wdmGRYNqofZ5UocK/S9neUyr0baly7LZdN5WFHyIB7ioFjZ1YuU/UMDXkHomsQ=; Received: from n2100.armlinux.org.uk ([fd8f:7570:feb6:1:214:fdff:fe10:4f86]:46477) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1gaeaz-0003YD-7G; Sat, 22 Dec 2018 10:33:25 +0000 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.90_1) (envelope-from ) id 1gaeaw-0002g3-Af; Sat, 22 Dec 2018 10:33:22 +0000 Date: Sat, 22 Dec 2018 10:33:20 +0000 From: Russell King - ARM Linux To: Stephen Boyd Cc: robh@kernel.org, a.hajda@samsung.com, andy.shevchenko@gmail.com, b.zolnierkie@samsung.com, broonie@kernel.org, gregkh@linuxfoundation.org, javierm@redhat.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, m.szyprowski@samsung.com, rafael@kernel.org Subject: Re: [PATCH] driver core: platform: Add an error message to platform_get_irq*() Message-ID: <20181222103320.GW26090@n2100.armlinux.org.uk> References: <20181222072452.186726-1-swboyd@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181222072452.186726-1-swboyd@chromium.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 21, 2018 at 11:24:52PM -0800, Stephen Boyd wrote: > A grep of the kernel shows that many drivers print an error message if > they fail to get the irq they're looking for. Furthermore, those drivers > all decide to print the device name, or not, and the irq they were > requesting, or not, etc. Let's consolidate all these error messages into > the API itself, allowing us to get rid of the error messages in each > driver. ... > +error: > + if (warn) > + dev_err(&dev->dev, "IRQ%d not found\n", num); Please don't use the notation IRQn - this is normally used when referring to interrupt numbers (such as those seen in /proc/interrupts) rather than a per-device interrupt index. Grep for IRQ% in drivers/ for many examples. dev_err(&dev->dev, "IRQ index %u not found: %d\n", num, ret); would be better - note also the use of %u for unsigned integers. Using %d for them is IMHO sloppy coding. -- RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up According to speedtest.net: 11.9Mbps down 500kbps up