All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-iio@vger.kernel.org, Akinobu Mita <akinobu.mita@gmail.com>,
	Crestez Dan Leonard <leonard.crestez@intel.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio/light/max44000: Use common error handling code in max44000_probe()
Date: Thu, 26 Oct 2017 17:39:01 +0000	[thread overview]
Message-ID: <20171026183901.42f44acc@archlinux> (raw)
In-Reply-To: <c6c5a2d0-39e6-0792-a6d3-4f2861a7eb5a@users.sourceforge.net>

On Thu, 26 Oct 2017 18:50:14 +0200
SF Markus Elfring <elfring@users.sourceforge.net> wrote:

> >> @@ -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.
> 

Sadly I am going to put my foot down here before more time
is wasted. I am not going to discuss it further after this email.
(for others please see the amount of time already wasted on
what are mostly poor code changes from Markus).

> 
> > 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.
Judge each one carefully.  You need to be convincingly improving the code
not just obeying rules blindly.

> 
> 
> > 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”?
All rules in there need to be applied with care. If they make the code
worse do not blindly apply them.

> 
> Regards,
> Markus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


WARNING: multiple messages have this Message-ID (diff)
From: Jonathan Cameron <jic23@kernel.org>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: linux-iio@vger.kernel.org, Akinobu Mita <akinobu.mita@gmail.com>,
	Crestez Dan Leonard <leonard.crestez@intel.com>,
	Hartmut Knaack <knaack.h@gmx.de>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
	LKML <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] iio/light/max44000: Use common error handling code in max44000_probe()
Date: Thu, 26 Oct 2017 18:39:01 +0100	[thread overview]
Message-ID: <20171026183901.42f44acc@archlinux> (raw)
In-Reply-To: <c6c5a2d0-39e6-0792-a6d3-4f2861a7eb5a@users.sourceforge.net>

On Thu, 26 Oct 2017 18:50:14 +0200
SF Markus Elfring <elfring@users.sourceforge.net> wrote:

> >> @@ -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.
> 

Sadly I am going to put my foot down here before more time
is wasted. I am not going to discuss it further after this email.
(for others please see the amount of time already wasted on
what are mostly poor code changes from Markus).

> 
> > 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.
Judge each one carefully.  You need to be convincingly improving the code
not just obeying rules blindly.

> 
> 
> > 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”?
All rules in there need to be applied with care. If they make the code
worse do not blindly apply them.

> 
> Regards,
> Markus
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


  reply	other threads:[~2017-10-26 17:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26  8:40 [PATCH] iio/light/max44000: Use common error handling code in max44000_probe() SF Markus Elfring
2017-10-26  8:40 ` SF Markus Elfring
2017-10-26 16:29 ` Jonathan Cameron
2017-10-26 16:29   ` Jonathan Cameron
2017-10-26 16:50   ` SF Markus Elfring
2017-10-26 16:50     ` SF Markus Elfring
2017-10-26 17:39     ` Jonathan Cameron [this message]
2017-10-26 17:39       ` Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171026183901.42f44acc@archlinux \
    --to=jic23@kernel.org \
    --cc=akinobu.mita@gmail.com \
    --cc=elfring@users.sourceforge.net \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=knaack.h@gmx.de \
    --cc=lars@metafoo.de \
    --cc=leonard.crestez@intel.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.