From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752015AbcACMOX (ORCPT ); Sun, 3 Jan 2016 07:14:23 -0500 Received: from mout.web.de ([212.227.15.3]:56578 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751760AbcACMOU (ORCPT ); Sun, 3 Jan 2016 07:14:20 -0500 Subject: Re: net-libertas: Better exception handling in if_spi_host_to_card_worker() To: Arend van Spriel References: <566ABCD9.1060404@users.sourceforge.net> <5686F0B2.5000000@users.sourceforge.net> <56870866.7020000@cogentembedded.com> <568785B3.5000905@users.sourceforge.net> <5687939E.7010701@users.sourceforge.net> <5687A2C7.3000704@gmail.com> <5687B2BC.8090901@users.sourceforge.net> <5688EBAC.5000701@gmail.com> Cc: Julia Lawall , Sergei Shtylyov , libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo , LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring X-Enigmail-Draft-Status: N1110 Message-ID: <5689105B.50005@users.sourceforge.net> Date: Sun, 3 Jan 2016 13:13:15 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5688EBAC.5000701@gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:dvOn4OVKbdunDtnX7mDnipKmIgt1akNCxAbr3OAVWHJKKG/KY5z Kry5+3cT5d4dpVhNujpMZPcIidrOBAeZC7kMhOdV1uF4hii3/4kAl7tfPgAYe9vFZgVpa69 ZDZl7s0s+Xb44CT+FYBbsSvqcymHug86PuHLWxJa4S1IbTTy67bNYDmDyRVlsvWVF18w0Nl IPUIHuPQk/0m0ChLgI3eQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:Sh8yOvd/lEg=:jrPXR3aPZyIQccTgvnUYcg foqnz3komrC4V3aEbw+GFrN1cfteZImvWc/TAPdLrYzONW++bYWXqaXvTPX5z93xSUJHBgAHm Grgn6dpzEvxyDpVLrr8voEaMSwbUsKiom3W81d/mYSEEaoQYy43I3pIpY4dm/9aDAHRzCX93g tLeLqIS1Zv0VqNoADWBR5W5gAdJqCAkpEuinh73rtcqhig8U0DM3/kuJOYlR/lJ2ydajFTika jBtzSw+Nic7KpE/SS6i0Cwapm46Mkb83Mr6WM2o3sbawokWTIAFEda9EkJ6473GZf6I7fEIQR GYMxR7BmA7Qqk+0OOPR0TdYHMV69m0KRi0Tn8Eun6d6QQitLEEWGZFtQhblr68boUcm0i8oZy 6KxU989U3DqA1/hMMR344X4m5yqmDaPZaz/GVtYsLfgIhKOBD2r7G9hR4X1WrQ1giu8qidQzV ULqHObHWnpihR/qlyhX7ruJAdp3hk8g5CYBw+jrPpocVUOyCY8ss4Y+ZqtGo/8i0lg4VgF++I 0eWn0ce9vrSgVUwegu8ngw4zQBhLOB1yZ9msEJV0CqDRlwlY03z05OYmeqkckFVUDUWMu9btg zQbGpKsR6RYhedgHN2V2eKjV8QS3/GjIy5td9mSSeLXqCXguxSPC4nNJdnF51iQu8otlndb/L RMsK3oMshdpOhQhZA7cicGFwxkZW0b2VQBnk++qG71paB2LgQwxola//33ACgTAdlUMZtuRbH wD0fFuT6uGtLNQvxAhmKg27gLrG9oq5T0fwta6iK7x5X4GibA3Evp0zInNhtREvCJNKckO2RP 3EGSI3w Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>> What the patch tries to do is avoid the extra 'if (err)'. >> >> Yes. - I propose to look at related consequences together with the usage >> of a popular short jump label once more. > > When I read a subject saying "Better exception handling" it sounds like > a functional improvement. Your change does not change anything > functionally and may or may not save a bit of execution time depending > on how smart the compiler is. Can it eventually matter to skip another condition check in three cases? > What you change does is confuse people reading the code. A few software developers might find this proposal unusual. > So please explain why your update improves exception handling here. > I don't see it. How does this feedback fit to the mentioned check avoidance? > The code is not making the driver more robust against failures That's true for this update suggestion. > in this function, which is what I think of reading "better exception handling". Other implementation details are affected by the shown fine-tuning. Regards, Markus