Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933000AbbLOAYx (ORCPT ); Mon, 14 Dec 2015 19:24:53 -0500 Received: from relmlor3.renesas.com ([210.160.252.173]:8980 "EHLO relmlie2.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932664AbbLOAYu (ORCPT ); Mon, 14 Dec 2015 19:24:50 -0500 X-IronPort-AV: E=Sophos;i="5.20,429,1444662000"; d="scan'";a="201805446" Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=kuninori.morimoto.gx@renesas.com; Message-ID: <87egeor26y.wl%kuninori.morimoto.gx@renesas.com> From: Kuninori Morimoto To: Eduardo Valentin CC: Simon , Zhang Rui , Geert Uytterhoeven , Magnus , , , , "devicetree@vger.kernel.org" Subject: Re: [PATCH 4/8 v4] thermal: rcar: retern error rcar_thermal_get_temp() if no ctemp update In-Reply-To: <20151214212021.GA10992@localhost.localdomain> References: <87vb895x9d.wl%kuninori.morimoto.gx@renesas.com> <87poyh5x69.wl%kuninori.morimoto.gx@renesas.com> <20151214212021.GA10992@localhost.localdomain> User-Agent: Wanderlust/2.15.9 Emacs/24.3 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="US-ASCII" Date: Tue, 15 Dec 2015 00:24:45 +0000 X-Originating-IP: [211.11.155.144] X-ClientProxiedBy: TY1PR01CA0022.jpnprd01.prod.outlook.com (25.161.131.160) To HK2PR06MB1012.apcprd06.prod.outlook.com (25.161.188.28) X-Microsoft-Exchange-Diagnostics: 1;HK2PR06MB1012;2:suaGNbi2AfVaPia6sel2K81N3xmBcsgaheWxrRmtzXm2Jy7oGZ8SxIg3rnP5xLz13e+hqh6v5ADDlxHd9O2DzwthnvaGoxJQDz1/yX51foIrLdzJeH7KxCg65x4MYJZIiXs8mri+EzIQ8J+ReVk2Qw==;3:22SH3dJIVcQDMYRIDDY1VIHWZcrX7Pf/wWWzkuewLnRx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uYxog3Da+fue+1rjoOgyvxSKKQa6yWkOKSZIbp0orz52GTw8JTSvAV7oe9rK5Zr3/OyLJX4DEzqHwvSTLog057T04uyUuv7umgx1cR6EsLaYslM8Fxp56VGnn7AXOAUHdf298YDWOxVEKv7PPOtKiZrdmZEUTHgg600f7U6LxUk+s03IXev7kgeBVuNccFBGRXA8v1+heUS7FWp2UYIGw+dqrRXL+SlWiSnUxkGvwmaxsrQP4m5hci9EpU2fGSVgwlPo4msJ87RWufAJtuX7qdHmL6HrNDCoLvm X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046);SRVR:HK2PR06MB1012;BCL:0;PCL:0;RULEID:;SRVR:HK2PR06MB1012; X-Forefront-PRVS: 07915F544A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(199003)(50466002)(101416001)(53416004)(86362001)(23726003)(586003)(36756003)(40100003)(5008740100001)(189998001)(110136002)(42186005)(54356999)(5001960100002)(122386002)(105586002)(76176999)(3846002)(50986999)(97736004)(4001350100001)(6116002)(106356001)(81156007)(1096002)(5004730100002)(1411001)(33646002)(83506001)(87976001)(46406003)(77096005)(66066001)(69596002)(47776003)(2950100001)(92566002);DIR:OUT;SFP:1102;SCL:1;SRVR:HK2PR06MB1012;H:morimoto-PC.renesas.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;HK2PR06MB1012;23:UyIF+89C64r38BbJ7yMs6iBIxxsamadN9s47sQHdx?= =?us-ascii?Q?O0LthMSyLnBga+YpZJIoA6gY/fLgwVRV3S3Bfc+G46RcDblxaNQBwhVQXno3?= =?us-ascii?Q?aUfdD/xxLbV03KYVuM3Gq7HBk2prT+2CS/0yXhQeHyXUHFshLDKSo6WUhYeX?= =?us-ascii?Q?Iju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zGUN7vR8Rm1Jdujei98jnUCiGPf?= =?us-ascii?Q?D2sd3Q=3D?= X-Microsoft-Exchange-Diagnostics: 1;HK2PR06MB1012;5:xUVBjXZNdAUoh0sc3QaoP1ynikDFytC9rDMhdoI/EykCLyppl9mK03kp1ujTNo+GrcevPpPWI5MG5LnTBtgKHNPlCDCu9e2PhnCFXEB4ZjM7vjtpkzYyRvTUzT8B92xbNh+y7+x9aQ3u0cgmbCBhlQ==;24:Bdb4TxBDuLTymANdwQcXaXMFwcdek5eOaPqC5B+iOf3JdgBfJBXeeyAwNu1SQbK66rAya4cj3I6b+zASFEuXcPDEPlGQSWFnpCNysSN+eYI=;20:FuZxmLBw63qBkLkG3Emkp9vjBJKGn/RMCYe7y7I7z03GsApxw4ALzxKNlqxc1kyy4OTP4BH0FKig04qiUn1E/mLuUQs5K3F9a5rrXFrby2gCCEBzf6FlMvdiegyxyKHxxkZzhuKszD6m5qlpCnm2zzU8EUu2x2ErBTV1IeqwCfY= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2015 00:24:45.2228 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HK2PR06MB1012 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 706 Lines: 18 Hi Eduardo, again > I believe the problem here is actually the lack of error > handling/propagation. Are you sure you want to write to parameter > in the fail path ? > > rcar_thermal_update_temp already returns error code when it fails > to read temperature. Don't you think it would make more sense to fix the > places that call rcar_thermal_update_temp to properly handle its return > value and propagate that error code when necessary? Will update in v5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/