Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9806554ybi; Wed, 10 Jul 2019 17:34:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYQwJgxsdR/4Rx0Fxq5clT+r2bs7bsBBWc1BdmYnPRwzFnvfPX9sIpIsp7ik31SkjGAEaV X-Received: by 2002:a17:90a:32c7:: with SMTP id l65mr1357320pjb.1.1562805297532; Wed, 10 Jul 2019 17:34:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562805297; cv=none; d=google.com; s=arc-20160816; b=VpFXm3kXViiICm2cUdzB0E/6FgnCeEltByEocIUjjs7cCnuJDz7lFgUEvdE9m21d9+ C6hNAktpLWCE1dzNgoJhqlV0pp8fH/zousQ919L4hkiBqy8s2tNg8H6CdOINN2Y14gjW rHJdYAYP9bdSRPe3PVOoMy1Sx1UYdGWBUq9TdrXrx8Q1NftMvZWFZnYNMnYf1+h1dVWb FUm+8Mj1PaIVPa6eOvsXFvyce/XG14ye2030Np+VLADiff+PLeClG0aP9FkxPl044d+p zh5uvizAIwuu0OckLgNqYw8UsJ5ssjVWg3vT5hfTzKvhAGjt9+YGUzKa8Yut+GQLniQf VHsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=ZWd0nWBVZsgwFWMqLBdRyw0iZDHt+3WfqWZzoPDFZfQ=; b=wgp3kTe5JHCrLgfwd29/G8ZK8ZNNgAzlbFgtW00nTkTh32PtNLs2SjMM1X8RYCS0aU 3RO2dI3X8/QQ5W4TfHcr2bapuYuj63z48R7LcnwyECaOV0coglyVQtRgRfK6AK9XOibq YevW/Rxba4bAQgRTQQTxA4xfz4rzfMchg6S/JMii27r9064db4pRynsGZzJDR7EJE5lF Q0/ZnbLPU8hWZ77bWhwL7k50nUU42qS9kD7vobm3aRDyMGnsUpGbEiBkWrE4fQhUXk1Y lKXtW0QXn47ssFSAs1KVXcIqnCWziDk2m+33Vr2UN3q6rahzm9zByY4I9WCTztkPZCIq 2jFg== 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 s138si2845199pgs.254.2019.07.10.17.34.40; Wed, 10 Jul 2019 17:34:57 -0700 (PDT) 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 S1727718AbfGKAOn (ORCPT + 99 others); Wed, 10 Jul 2019 20:14:43 -0400 Received: from smtprelay0045.hostedemail.com ([216.40.44.45]:53235 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727325AbfGKAOn (ORCPT ); Wed, 10 Jul 2019 20:14:43 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id BC0308774; Thu, 11 Jul 2019 00:14:41 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::,RULES_HIT:41:355:379:599:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:2899:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3872:4321:5007:10004:10400:10848:11026:11232:11658:11914:12043:12048:12296:12297:12438:12740:12760:12895:13069:13311:13357:13439:13972:14659:14721:21080:21212:21433:21451:21627:30029:30054:30091,0,RBL:23.242.196.136:@perches.com:.lbl8.mailshell.net-62.8.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:25,LUA_SUMMARY:none X-HE-Tag: pail12_bbc0872fcd3a X-Filterd-Recvd-Size: 1927 Received: from XPS-9350.home (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf19.hostedemail.com (Postfix) with ESMTPA; Thu, 11 Jul 2019 00:14:40 +0000 (UTC) Message-ID: Subject: Re: [PATCH] thermal: Add some error messages From: Joe Perches To: Amit Kucheria , linux-kernel@vger.kernel.org, Zhang Rui , Eduardo Valentin , Daniel Lezcano Cc: linux-pm@vger.kernel.org Date: Wed, 10 Jul 2019 17:14:38 -0700 In-Reply-To: <0d3d6111f8a8bd199f1a5a5cd8c4e83e4f0690be.1562757659.git.amit.kucheria@linaro.org> References: <0d3d6111f8a8bd199f1a5a5cd8c4e83e4f0690be.1562757659.git.amit.kucheria@linaro.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.5-0ubuntu0.18.10.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-07-10 at 17:16 +0530, Amit Kucheria wrote: > When registering a thermal zone device, we currently return -EINVAL in > four cases. This makes it a little hard to debug the real cause of the > failure. > > Print some error messages to make it easier for developer to figure out > what happened. [] > diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c [] > @@ -1238,17 +1238,26 @@ thermal_zone_device_register(const char *type, int trips, int mask, > int count; > struct thermal_governor *governor; > > - if (!type || strlen(type) == 0) > + if (!type || strlen(type) == 0) { > + pr_err("Error: No thermal zone type defined"); Please use terminating newlines like: pr_err("Error: No thermal zone type defined\n"); [] > + pr_err("Error: Thermal zone name (%s) too long, should be under %d chars", etc...