lkml.org 
[lkml]   [2020]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] media: mantis: remove redundant assignment to variable err
On Sat, Apr 11, 2020 at 07:53:51PM -0300, Ezequiel Garcia wrote:
> There's a redundant err assignment right below here,
> which you can also get rid of:
>
> - err = mantis_frontend_power(mantis, POWER_ON);
> + mantis_frontend_power(mantis, POWER_ON);
>
> I can't test this, but calling mantis_frontend_power twice
> is possibly redundant.

To me that code really looks like a hack-around for flakey hardware and
I would be afraid to delete it. But the "err =" could be removed.

>
> Also, what's the gain from this cleanup? The driver is super
> old, and it seems any modern compiler would be oblivious
> of the redundant assignment.

Eventually we would like to enable that warning by default but there are
still thousands of pointless assignments so it will take years of
small fixes like this. Generally cleaning up warnings is good.

regards,
dan carpenter

\
 
 \ /
  Last update: 2020-04-14 11:00    [W:0.088 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site