From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932378AbdJ0SEo (ORCPT ); Fri, 27 Oct 2017 14:04:44 -0400 Received: from mout.web.de ([212.227.17.11]:52407 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751167AbdJ0SEm (ORCPT ); Fri, 27 Oct 2017 14:04:42 -0400 Subject: Re: misc: bh1770glc: Use common error handling code in bh1770_power_state_store() To: Daniele Nicolodi , Andrew Morton , Arnd Bergmann , Dan Carpenter , Greg Kroah-Hartman , kernel-janitors@vger.kernel.org Cc: LKML , Jonathan Cameron , Samu Onkalo References: <568ee0ee-8ff1-9739-fa6b-f2eeae53e11a@users.sourceforge.net> <9c0b957a-93b5-39c9-f9bd-cb754d009d62@grinta.net> From: SF Markus Elfring Message-ID: <8e931bdb-5327-000e-3167-6634ce349f73@users.sourceforge.net> Date: Fri, 27 Oct 2017 20:04:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <9c0b957a-93b5-39c9-f9bd-cb754d009d62@grinta.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:2vNtV9tn28NsmNwt/4vwstQNcbnhaOdIsOD/EEQHOC6IsMW2cf5 ya1bI0/BUvL84sYF2eIwVPbge5jYSxbkfbzF0AkfeeSGWdoUYm8Vu0wP9/wUIbSBzquShno EQCgxwtOwnSWDoAOwAdzeP2xiq5yqdns8lMqTcqwIqtYHOzMLWQ4Nj5uw1dJHHoZFFQeue1 Q2ORYVS0CJfucpTel8bvA== X-UI-Out-Filterresults: notjunk:1;V01:K0:2p8vGRnFooQ=:wADwktsmu4mrvYRJmTvNRE xoGD0VSojggx+PmZ9SXxIFt6tFt2OD1wio6qt/mv6vt2RztGWFkSrRYBybh7F0ncjZdELFM2y TEpBUSd7v6ssJjdn16VU+fhVLPqApp7agQPN2EJAi1PifjBpIBp7Dxnv9Z52tHh0C7RZR2KaE yKiNb1SPnHa6WFWgemJO6u+sz9eN/b8rrweWl3zM35yHGwb5izbaBeef4/T29X0biRTn+045G bpVp7qZSS5vFNGNubdJlgAHP2Xfs1/0XMhjOC0xKdVIeypV17rnel0DGxfRrcterB2/EUc9ei FdlOThhMG6H2gqC9uzIxumlTRNW2fKdhLI0f1SmZgk/8XlzCLP1zqrhIPPn6UCDFZDBunmV25 YQgDXSfhkFt3XS2bF6/d97IBZARgVAqGEL73QSbI4i64CESkz1T1hnuh2+TS/jzIXOeZHl4hS D4Jp8ywhO8GvxvTAAe1wYpOif26eF1uHCWUBrbwMSD0uz62LsyHKW0iUHb4sX5slKoZXRps57 aHbtVmiQMaiHtz9e9TU0FJ6tI/r9UkSWAJioN1zZCcA0YP2qXQqgANK4SwQLQevfwN7EBxvbS r6AxuS4r3yZghapqJgiv/5cFLmhFhMiQDti9mBJvJ/vHiMd4gJerMJFcgpBw5vauMrWzcUK27 3DhoVz+O8z6EjlsezFt5jdzcpAv07H0ptnmLh3CMP/w1scPFSJE5vkvWSIHHRYKi0bCVt7Lie 3uisZ0vsM110yHPOJB6BHONe4jBpkHYwcqtarF/hi8ekinbcF/Dnczu6A7BH7V36mqZ+LfPpW 9olI84kw14P68uInUcbHG87Tn73sjhOzRd1yYh+ls3gs3dHuDg= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> Adjust jump targets so that a bit of exception handling can be better >> reused in an if branch of this function. > > What is the benefit brought by this change? Will you notice that the object code size can be a bit smaller because the call of the function “pm_runtime_put” is specified at two places in the implementation in comparison to three places before? > Anyhow, are you seriously suggesting adding a goto to a label define > within a if block? Yes. - For this update suggestion. > Is this somehow an Halloween related joke? I hope not. Another software design approach would be to move two statements from the affected if branch to the end of this function. Such an adjustment would have the consequence that the statement “goto unlock” will be transformed into a jump to a backward target. Would you prefer such an implementation variant instead? Regards, Markus