linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabio Aiuto <fabioaiuto83@gmail.com>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	outreachy-kernel@googlegroups.com, linux-staging@lists.linux.dev,
	linux-kernel@vger.kernel.org
Subject: Re: [Outreachy kernel] [PATCH 1/2] staging: rtl8723bs: hal: Remove set but unused variables
Date: Thu, 29 Apr 2021 14:07:30 +0200	[thread overview]
Message-ID: <20210429120729.GA1393@agape.jhs> (raw)
In-Reply-To: <1870536.WTzYeaBcXf@linux.local>

> > > Yes, but many types of hardware _REQUIRE_ reads to do something.  So
> > > "read that does nothing" is a requirement for some operations.
> > > 
> > > As an example, a write is only guaranteed to have been finished if you
> > > do a read of the same location back from it on some hardware busses.
> > > The bus can reorder things, but a write/read of the same location can
> > > not be reordered.
> > > 
> > > Sometimes you have to do reads multiple times to get things to "stick".
> > > 
> > > Other times reading from a location changes a state in the hardware
> > > (horrid but HW designers aren't the brightest at times...)
> > > 
> > > So you can NOT just remove reads without knowing that the hardware does
> > > not require this.  This is an issue where GCC "warnings" mean nothing as
> > > gcc does not actually know what hardware does, or does not, do for many
> > > things.
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > 
> > thank you for explanation, my hardware knowledge is poor:(
> > Sorry for noise.
> > 
> > fabio
> >
> I suspected that removing those variables could have been a source of troubles 
> (but I was thinking of possible side effects on internal kernel's data, not of 
> hardware related idiosyncrasies), however I think that you did well to point 
> it out because:
> 
> 1) We learned something new from Greg;

yes that's been very good for me

> 2) I learned that, for the purpose of finding definitions, vim's ctrl-] is not 
> the right way to work out the problem.

3) I learned that with ctrl-] in vim one could (in some misterious conditions)
   see a function definition :-D

It seems that you know more than me about vim, I make intensive use of grep
for finding function defs and usages in code.

> 
> If you have time, I'd appreciate some comments on the topic of line (2).
> 
> Thanks,
> 
> Fabio
> 
> 
> 

thank you,

fabio

  reply	other threads:[~2021-04-29 12:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-28 11:33 [Outreachy kernel] [PATCH 0/2] Removed set but unused variables Fabio M. De Francesco
2021-04-28 11:33 ` [Outreachy kernel] [PATCH 1/2] staging: rtl8723bs: hal: Remove " Fabio M. De Francesco
2021-04-29  7:26   ` Fabio Aiuto
2021-04-29  7:44     ` Fabio M. De Francesco
2021-04-29  8:25       ` Fabio Aiuto
2021-04-29  9:16         ` Fabio M. De Francesco
2021-04-29  9:32           ` Fabio Aiuto
2021-04-29  9:53             ` Fabio M. De Francesco
2021-04-29 10:01         ` Greg Kroah-Hartman
2021-04-29 10:15           ` Fabio M. De Francesco
2021-04-29 11:21             ` Greg Kroah-Hartman
2021-04-29 10:22           ` Fabio Aiuto
2021-04-29 10:38             ` Fabio M. De Francesco
2021-04-29 12:07               ` Fabio Aiuto [this message]
2021-04-28 11:33 ` [Outreachy kernel] [PATCH 2/2] staging: rtl8723bs: core: Removed set but unused variable Fabio M. De Francesco
2021-04-29 14:35   ` Dan Carpenter

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=20210429120729.GA1393@agape.jhs \
    --to=fabioaiuto83@gmail.com \
    --cc=fmdefrancesco@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy-kernel@googlegroups.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).