From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932992AbcKHK3c (ORCPT ); Tue, 8 Nov 2016 05:29:32 -0500 Received: from smtprelay0033.hostedemail.com ([216.40.44.33]:43544 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752910AbcKHK30 (ORCPT ); Tue, 8 Nov 2016 05:29:26 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3868:3870:3871:3874:4321:5007:7809:7904:10004:10400:10848:11026:11232:11473:11657:11658:11914:12043:12296:12438:12740:12760:13069:13095:13311:13357:13439:13972:14659:14721:21080:21433:21451:30012:30029:30034:30054:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: geese59_8c1fbb5439360 X-Filterd-Recvd-Size: 2416 Message-ID: <1478600960.22008.10.camel@perches.com> Subject: Re: [PATCH v2 09/23] staging: iio: tsl2583: cleaned up logging From: Joe Perches To: Brian Masney , jic23@kernel.org, linux-iio@vger.kernel.org Cc: devel@driverdev.osuosl.org, gregkh@linuxfoundation.org, lars@metafoo.de, pmeerw@pmeerw.net, knaack.h@gmx.de, linux-kernel@vger.kernel.org, Jon.Brenner@ams.com Date: Tue, 08 Nov 2016 02:29:20 -0800 In-Reply-To: <1478600208-21153-10-git-send-email-masneyb@onstation.org> References: <1478600208-21153-1-git-send-email-masneyb@onstation.org> <1478600208-21153-10-git-send-email-masneyb@onstation.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.1-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2016-11-08 at 05:16 -0500, Brian Masney wrote: > There are several places in the code where the function name is > hardcoded in the log message. Use the __func__ constant string to build > the log message. This also clarifies some of the error messages to match > the code and ensures that the correct priority is used since the message > is already being changed. [] > diff --git a/drivers/staging/iio/light/tsl2583.c b/drivers/staging/iio/light/tsl2583.c [] > @@ -170,13 +170,15 @@ static int taos_get_lux(struct iio_dev *indio_dev) > > ret = i2c_smbus_read_byte_data(chip->client, TSL258X_CMD_REG); > if (ret < 0) { > - dev_err(&chip->client->dev, "taos_get_lux failed to read CMD_REG\n"); > + dev_err(&chip->client->dev, "%s failed to read CMD_REG register\n", > + __func__); Please use "%s: ", __func__ consistently > @@ -545,12 +549,15 @@ static ssize_t in_illuminance_lux_table_store(struct device *dev, > * and the last table entry is all 0. > */ > n = value[0]; > - if ((n % 3) || n < 6 || n > ((ARRAY_SIZE(taos_device_lux) - 1) * 3)) { > - dev_info(dev, "LUX TABLE INPUT ERROR 1 Value[0]=%d\n", n); > + if ((n % 3) || n < 6 || n > TSL2583_MAX_LUX_INTS) { > + dev_err(dev, > + "%s: The number of entries in the lux table must be a multiple of 3 and within the range [6, %zu]", > + __func__, TSL2583_MAX_LUX_INTS); Missing terminating '\n"