From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757495AbcIWHge (ORCPT ); Fri, 23 Sep 2016 03:36:34 -0400 Received: from mout.web.de ([212.227.17.11]:50813 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751976AbcIWHgb (ORCPT ); Fri, 23 Sep 2016 03:36:31 -0400 Subject: Re: GPU-DRM-TILCDC: Less function calls in tilcdc_convert_slave_node() after error detection To: Jyri Sarha References: <566ABCD9.1060404@users.sourceforge.net> <2f3f7ad7-16a0-1dfb-d073-0d993cd767ee@users.sourceforge.net> <0be7fee0-64f7-fa02-0337-51376677343e@users.sourceforge.net> Cc: dri-devel@lists.freedesktop.org, David Airlie , Tomi Valkeinen , LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: Date: Fri, 23 Sep 2016 09:36:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:mqpMofcXobCaCMOJr3wqvoWd6boIpq4U9+t3XGuROtC8rYwXSsn DJgXisUgJspRTNzLJUVNRNzCfn73CDiVy1VllT5ANDck8rf0CJezutheGLNECoKKvL2vqDk cIPZ87bkd3yaM/VRmtSmR974h1ct543D4pdDDGgoLOFauX0U5gmtm95h//OnvMGFWytZNEk C8tHOSMFGHu3jo754U32Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:tZeMFbX4TuI=:sfX0lEbOVHuon2tRsswmtN Ol7Nn8f1zdsGllq+QwdXZcnSIxIvEwGjCZ+5N8XsrbmVjVclkh1L3x7i4NdZ9SmtwdlgoLKST mCO09lWsWFj1Ks7KVpogfU5SYk3og2KaqrbGSbxKXiT9Lzo+jFW8tv+9LxzdDXiKvsprqMh3G 6rB4cZ7IWMqME6PtrStN6ft5sa/JlUGWhimVtOhfBZk4ToP3UNq+e4WrAVAT07B6FeT2GHkMk aSpNRlEkmDvU7APeF9h6I/is8Wlj1iUeErgo/gaF2SLcXqT9jEx+WlUVwOXCBEBAoS+3bANgN rNtzZo7pY9Lbl/ii9Z3d+MgLwYk4PfoUG6YnaGS933S08T1AjJM14pCc0fHzYKi/46LREezHm W6/WhNRKav3C1gmPIecxSO6nM/+X/S96O1DRvIwafkvj9w5Sv042NsNuxjlkAik1iH1VQMHcR TXwkADphA2HZ0caGmAwtBkU1bN+rosbW9OmFnQ8yAjiinSd6g1Vt4TxJEsJZPRxxLtqnk0+mn 2G1PyB04LIXY4JTUCRTyBgdKFP2NVYIkOqJqbKnWupIP3CPlqp5desSkjhOlHel4qHBZB8Ud3 jcGe6AN165O1TKb7Opw7OpjgwNvWR/13WBuyrvObtZYmW1hK0cFZI+AEyACtZY8j1IrJBFA4L TbmkceTC4bzl0Iu3DmHCb7DWYZIPC4uB3/zoIc75RyHkeM/S5W9/ZUJjxVap/YTaj7TnJCp1f sYeYiZFqz3hDe9EQXPxs0FG8MUiMFjy84TlwX+Gczn73tdK4YXZ693f4nyczavdwPD8oP50qs XI6HaDl Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I think the "if (node)" in the of_node_put() is there on purpose, Yes, of course. Does such an implementation detail correspond to a general software design pattern? > because it potentially saves the caller one extra if()-statement This can occasionally happen. > and keeps the caller code simpler. A special view on software simplicity can also lead to questionable intermediate function implementation, can't it? > Keeping the goto labels in right order needs precision I can agree to this view. > and can lead to subtle errors. The management of jump labels is just another software development challenge as usual, isn't it? > Sometimes there is no way to avoid that, How do you think about to clarify the constraints which you imagine a bit more? > but here there is. I disagree to this conclusion. Would you like to care a bit more for efficiency and software correctness around the discussed exception handling? Regards, Markus