Re: [PATCH 2/2] drivers: Simplify the return code

2015-05-20 Thread Mauro Carvalho Chehab
konrad.w...@oracle.com Sent: Tuesday, May 19, 2015 1:00:57 PM Subject: [PATCH 2/2] drivers: Simplify the return code If the last thing we do in a function is to call another function and then return its value, we don't need to store the returned code into some ancillary var. Signed-off

Re: [PATCH 2/2] drivers: Simplify the return code

2015-05-20 Thread Mauro Carvalho Chehab
Em Tue, 19 May 2015 19:00:50 +0300 Antti Palosaari cr...@iki.fi escreveu: On 05/19/2015 03:17 PM, Michael Büsch wrote: On Tue, 19 May 2015 08:05:56 -0400 (EDT) Federico Simoncelli fsimo...@redhat.com wrote: diff --git a/drivers/media/dvb-frontends/lgs8gxx.c

[PATCH 2/2] drivers: Simplify the return code

2015-05-19 Thread Mauro Carvalho Chehab
If the last thing we do in a function is to call another function and then return its value, we don't need to store the returned code into some ancillary var. Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com diff --git a/drivers/media/dvb-frontends/lgs8gxx.c

Re: [PATCH 2/2] drivers: Simplify the return code

2015-05-19 Thread Federico Simoncelli
Thrall amber.rose.thr...@gmail.com, Federico Simoncelli fsimo...@redhat.com, James Harper james.har...@ejbdigital.com.au, Dan Carpenter dan.carpen...@oracle.com, Konrad Rzeszutek Wilk konrad.w...@oracle.com Sent: Tuesday, May 19, 2015 1:00:57 PM Subject: [PATCH 2/2] drivers: Simplify the return

Re: [PATCH 2/2] drivers: Simplify the return code

2015-05-19 Thread Michael Büsch
On Tue, 19 May 2015 08:05:56 -0400 (EDT) Federico Simoncelli fsimo...@redhat.com wrote: diff --git a/drivers/media/dvb-frontends/lgs8gxx.c b/drivers/media/dvb-frontends/lgs8gxx.c index 3c92f36ea5c7..9b0166cdc7c2 100644 --- a/drivers/media/dvb-frontends/lgs8gxx.c +++

Re: [PATCH 2/2] drivers: Simplify the return code

2015-05-19 Thread Antti Palosaari
On 05/19/2015 03:17 PM, Michael Büsch wrote: On Tue, 19 May 2015 08:05:56 -0400 (EDT) Federico Simoncelli fsimo...@redhat.com wrote: diff --git a/drivers/media/dvb-frontends/lgs8gxx.c b/drivers/media/dvb-frontends/lgs8gxx.c index 3c92f36ea5c7..9b0166cdc7c2 100644 ---

Re: [PATCH 2/2] drivers: Simplify the return code

2015-05-19 Thread Dan Carpenter
On Tue, May 19, 2015 at 07:00:50PM +0300, Antti Palosaari wrote: I am also against that kind of simplifications. Even it reduces line or two, it makes code more inconsistent, which means you have to make extra thinking when reading that code. I prefer similar repeating patterns as much as