From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Perches Subject: Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller Date: Tue, 18 Apr 2017 19:23:11 -0700 Message-ID: <1492568591.8661.53.camel@perches.com> References: <1492101794-13444-1-git-send-email-peda@axentia.se> <1492101794-13444-4-git-send-email-peda@axentia.se> <20170418085156.GA4773@kroah.com> <20170418114430.GA1496@kroah.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Peter Rosin , Greg Kroah-Hartman Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Wolfram Sang , Rob Herring , Mark Rutland , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Jonathan Corbet , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Andrew Morton , Colin Ian King , Paul Gortmaker , Philipp Zabel , kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org List-Id: linux-i2c@vger.kernel.org On Tue, 2017-04-18 at 23:53 +0200, Peter Rosin wrote: > On 2017-04-18 13:44, Greg Kroah-Hartman wrote: > > On Tue, Apr 18, 2017 at 12:59:50PM +0200, Peter Rosin wrote: [] > > > > > + ret = device_add(&mux_chip->dev); > > > > > + if (ret < 0) > > > > > + dev_err(&mux_chip->dev, > > > > > + "device_add failed in mux_chip_register: %d\n", ret); > > > > > > > > Did you run checkpatch.pl in strict mode on this new file? Please do so :) > > > > > > I did, and did it again just to be sure, and I do not get any complaints. > > > So, what's wrong? > > > > You list the function name in the printk string, it should complain > > that __func__ should be used. Oh well, it's just a perl script, it > > doesn't always catch everything. > > isn't always correct :) > > Ah, ok. Also, please use the checkpatch in -next as it has a slightly better mechanism to identify functions and uses in strings. $ ./scripts/checkpatch.pl ~/1.patch WARNING: Prefer using '"%s...", __func__' to using 'mux_chip_register', this function's name, in a string #302: FILE: drivers/mux/mux-core.c:134: + "device_add failed in mux_chip_register: %d\n", ret); From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtprelay0239.hostedemail.com ([216.40.44.239]:48788 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932779AbdDSCXR (ORCPT ); Tue, 18 Apr 2017 22:23:17 -0400 Message-ID: <1492568591.8661.53.camel@perches.com> Subject: Re: [PATCH v13 03/10] mux: minimal mux subsystem and gpio-based mux controller From: Joe Perches To: Peter Rosin , Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Wolfram Sang , Rob Herring , Mark Rutland , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Jonathan Corbet , linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-iio@vger.kernel.org, linux-doc@vger.kernel.org, Andrew Morton , Colin Ian King , Paul Gortmaker , Philipp Zabel , kernel@pengutronix.de Date: Tue, 18 Apr 2017 19:23:11 -0700 In-Reply-To: References: <1492101794-13444-1-git-send-email-peda@axentia.se> <1492101794-13444-4-git-send-email-peda@axentia.se> <20170418085156.GA4773@kroah.com> <20170418114430.GA1496@kroah.com> Content-Type: text/plain; charset="ISO-8859-1" Mime-Version: 1.0 Sender: linux-iio-owner@vger.kernel.org List-Id: linux-iio@vger.kernel.org On Tue, 2017-04-18 at 23:53 +0200, Peter Rosin wrote: > On 2017-04-18 13:44, Greg Kroah-Hartman wrote: > > On Tue, Apr 18, 2017 at 12:59:50PM +0200, Peter Rosin wrote: [] > > > > > + ret = device_add(&mux_chip->dev); > > > > > + if (ret < 0) > > > > > + dev_err(&mux_chip->dev, > > > > > + "device_add failed in mux_chip_register: %d\n", ret); > > > > > > > > Did you run checkpatch.pl in strict mode on this new file? Please do so :) > > > > > > I did, and did it again just to be sure, and I do not get any complaints. > > > So, what's wrong? > > > > You list the function name in the printk string, it should complain > > that __func__ should be used. Oh well, it's just a perl script, it > > doesn't always catch everything. > > isn't always correct :) > > Ah, ok. Also, please use the checkpatch in -next as it has a slightly better mechanism to identify functions and uses in strings. $ ./scripts/checkpatch.pl ~/1.patch WARNING: Prefer using '"%s...", __func__' to using 'mux_chip_register', this function's name, in a string #302: FILE: drivers/mux/mux-core.c:134: + "device_add failed in mux_chip_register: %d\n", ret);