linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Alberto Merciai <alb3rt0.m3rciai@gmail.com>
Cc: "Pavel Skripkin" <paskripkin@gmail.com>,
	"Forest Bond" <forest@alittletooquiet.net>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Tommaso Merciai" <tomm.merciai@gmail.com>,
	"Aldas Taraškevičius" <aldas60@gmail.com>,
	"Karolina Drobnik" <karolinadrobnik@gmail.com>,
	"Lucas Henneman" <lucas.henneman@linaro.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: vt6655: refactor byMinChannel to min_channel
Date: Mon, 6 Dec 2021 16:31:00 +0300	[thread overview]
Message-ID: <20211206133100.GA1956@kadam> (raw)
In-Reply-To: <20211204090941.GA3805206@bulldog>

On Sat, Dec 04, 2021 at 10:09:41AM +0100, Alberto Merciai wrote:
> On Sat, Dec 04, 2021 at 11:27:43AM +0300, Pavel Skripkin wrote:
> > Looks like this variable is set, but never used. Shouldn't it be just
> > removed?
> > 
> > Same for max_channel (or byMaxChannel).
> 
> To be honest, I would prefer leave them where they are. I'm only
> refactoring the code considering less the logic aspect.
> 

Pavel is right.

You should always be looking for that kind of stuff instead of just
doing a sed script.  And the thing is you're in the best place to think
about how each struct member is used right now because you're modifying
each use to make sure it compiles.  There is a possibility that no one
else will think about it ever again now that checkpatch doesn't
complain.

So in a way, it's better to leave the checkpatch warning as-is until
someone can fix it properly.

> I don't know if these variables will become usefull in a second
> moment.

No.  We do not write code for the future.  No one knows what the future
will hold.  Delete any code which is not currently useful.

regards,
dan carpenter


      parent reply	other threads:[~2021-12-06 13:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04  0:40 [PATCH] staging: vt6655: refactor byMinChannel to min_channel Alberto Merciai
2021-12-04  8:27 ` Pavel Skripkin
2021-12-04  9:09   ` Alberto Merciai
2021-12-04  9:22     ` Pavel Skripkin
2021-12-04 10:08       ` Alberto Merciai
2021-12-04  9:29     ` Greg Kroah-Hartman
2021-12-04 10:14       ` Alberto Merciai
2021-12-06 13:31     ` Dan Carpenter [this message]

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=20211206133100.GA1956@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=alb3rt0.m3rciai@gmail.com \
    --cc=aldas60@gmail.com \
    --cc=forest@alittletooquiet.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=karolinadrobnik@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=lucas.henneman@linaro.org \
    --cc=paskripkin@gmail.com \
    --cc=tomm.merciai@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).