[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c6c5a2d0-39e6-0792-a6d3-4f2861a7eb5a@users.sourceforge.net>
Date: Thu, 26 Oct 2017 18:50:14 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Jonathan Cameron <jic23@...nel.org>, linux-iio@...r.kernel.org
Cc: Akinobu Mita <akinobu.mita@...il.com>,
Crestez Dan Leonard <leonard.crestez@...el.com>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] iio/light/max44000: Use common error handling code in
max44000_probe()
>> @@ -596,6 +592,10 @@ static int max44000_probe(struct i2c_client *client,
>> }
>>
>> return iio_device_register(indio_dev);
>> +
>> +report_failure:
>> + dev_err(&client->dev, "failed to write init config: %d\n", ret);
> This reduces readability of the code for a very minor gain.
I got an other software development view on this aspect.
> Printing an error message is not a source of bugs
I find such a general information questionable.
It is also possible to discover various update candidates in this software area.
> or similar unlike unwinding some state, so a unified path makes little sense.
How does such a view fit to the section “7) Centralized exiting of functions”
in the document “coding-style.rst”?
Regards,
Markus
Powered by blists - more mailing lists