From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [PATCH v3 5/6] mmc: actions: add MMC driver for Actions OWL S700/S900
Date: Mon, 1 Mar 2021 23:04:26 +0000 [thread overview]
Message-ID: <20210301230426.71c7ee55@slackpad.fritz.box> (raw)
In-Reply-To: <c01f6069-43e2-d26d-35c9-b99b71352a10@samsung.com>
On Tue, 2 Mar 2021 07:11:54 +0900
Jaehoon Chung <jh80.chung@samsung.com> wrote:
> On 3/1/21 11:25 PM, Andre Przywara wrote:
> > On Mon, 1 Mar 2021 18:47:26 +0530
> > Amit Tomar <atomar25opensource@gmail.com> wrote:
> >
> > Hi,
> >
> >>> So this whole mode handling here looks dodgy. Below you mix "assignments
> >>> to mode" with "ORing in values", without actually ever initialising mode
> >>> explicitly. I wonder why the compiler doesn't warn about this, I can see
> >>> paths were you OR into an uninitialised value.
> >>>
> >>> But the compiler already has initialized mode to 0,
> >
> > Why? Where? I just see a local, non-static definition of mode,
> > meaning it won't be initialised.
>
> It seems that it doesn't initialize in this function.
> I think that resp_type may be always matched one of condition.
Possibly, but the problem is that the MMC_RSP_R1 clause also uses
"|=", so it's the same issue here.
One a first glance into the assembly it looks like the compiler
optimises this whole clause away? Undefined behaviour?
Anyway, I am not really sure we need to argue here, when the fix is
dead easy ...
Cheers,
Andre
> I think that's why the compiler doesn't warn.
>
> Best Regards,
> Jaehoon Chung
>
> >
> >> that is why there is no warning.
> >> In order to test , printed out mode value which suggests this variable is
> >> initialized.
> >
> > To what? Just because you printed 0(?) in your test doesn't mean that
> > this will always be the case.
> >
> > Cheers,
> > Andre
> >
>
next prev parent reply other threads:[~2021-03-01 23:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-16 18:32 [PATCH v3 0/6] Add MMC/SD support for S700/S900 Amit Singh Tomar
2021-01-16 18:32 ` [PATCH v3 1/6] clk: actions: Introduce dummy get/set_rate callbacks Amit Singh Tomar
2021-01-16 18:32 ` [PATCH v3 2/6] clk: actions: Add SD/MMC clocks Amit Singh Tomar
2021-01-16 18:32 ` [PATCH v3 3/6] ARM: dts: sync Actions Semi S700 DT from Linux 5.10-rc7 Amit Singh Tomar
2021-01-16 18:32 ` [PATCH v3 4/6] ARM: dts: s700: add MMC/SD controller node Amit Singh Tomar
2021-01-16 18:32 ` [PATCH v3 5/6] mmc: actions: add MMC driver for Actions OWL S700/S900 Amit Singh Tomar
2021-01-18 11:15 ` André Przywara
2021-03-01 13:17 ` Amit Tomar
2021-03-01 14:25 ` Andre Przywara
2021-03-01 22:11 ` Jaehoon Chung
2021-03-01 23:04 ` Andre Przywara [this message]
2021-03-01 23:38 ` Jaehoon Chung
2021-01-16 18:32 ` [PATCH v3 6/6] configs: Enable mmc support Amit Singh Tomar
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=20210301230426.71c7ee55@slackpad.fritz.box \
--to=andre.przywara@arm.com \
--cc=u-boot@lists.denx.de \
/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