From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Date: Fri, 23 Sep 2016 07:36:17 +0000 Subject: Re: GPU-DRM-TILCDC: Less function calls in tilcdc_convert_slave_node() after error detection Message-Id: List-Id: References: <566ABCD9.1060404@users.sourceforge.net> <2f3f7ad7-16a0-1dfb-d073-0d993cd767ee@users.sourceforge.net> <0be7fee0-64f7-fa02-0337-51376677343e@users.sourceforge.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Jyri Sarha Cc: kernel-janitors@vger.kernel.org, LKML , dri-devel@lists.freedesktop.org, Julia Lawall , Tomi Valkeinen > 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