From mboxrd@z Thu Jan 1 00:00:00 1970 From: SF Markus Elfring Subject: Re: GPU-DRM-TILCDC: Less function calls in tilcdc_convert_slave_node() after error detection Date: Fri, 23 Sep 2016 13:19:47 +0200 Message-ID: <3b791118-2977-f607-b816-dd5e833cfc75@users.sourceforge.net> References: <566ABCD9.1060404@users.sourceforge.net> <2f3f7ad7-16a0-1dfb-d073-0d993cd767ee@users.sourceforge.net> <0be7fee0-64f7-fa02-0337-51376677343e@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Rob Clark Cc: Jyri Sarha , kernel-janitors@vger.kernel.org, LKML , "dri-devel@lists.freedesktop.org" , Julia Lawall , Tomi Valkeinen List-Id: dri-devel@lists.freedesktop.org > iirc, there are Coccinelle rules that find code with unnecessary null > checks and removes them. This kind of software change is not needed here. I find that a corresponding return value check happens one function call too late. > Although you probably made this complex enough that cocinelle would > not find it. That is not a complement. I imagine that scripts for the semantic patch language can find more source code places where questionable disjunctions are used so far. Would you dare to split any more condition checks? > One should not make error handling/cleanup more complex than needed. I see a need to improve not only correctness there but also a bit of software efficiency. Regards, Markus