All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicolas Pitre <nico@fluxnic.net>
To: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Cc: Rob Herring <robh+dt@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/2] ARM: move device tree mapping out of linear region
Date: Wed, 7 Oct 2020 18:05:42 -0400 (EDT)	[thread overview]
Message-ID: <nycvar.YSQ.7.78.906.2010071800450.2184@knanqh.ubzr> (raw)
In-Reply-To: <20201007213253.GJ1551@shell.armlinux.org.uk>

On Wed, 7 Oct 2020, Russell King - ARM Linux admin wrote:

> On Wed, Oct 07, 2020 at 11:28:03AM -0400, Nicolas Pitre wrote:
> > On Wed, 7 Oct 2020, Ard Biesheuvel wrote:
> > 
> > > @@ -1078,13 +1078,18 @@ void __init hyp_mode_check(void)
> > >  void __init setup_arch(char **cmdline_p)
> > >  {
> > >  	const struct machine_desc *mdesc = NULL;
> > > +	void *atags_vaddr;
> > >  
> > >  	if (__atags_pointer)
> > > -		atags_vaddr = phys_to_virt(__atags_pointer);
> > > +		atags_vaddr = FDT_VIRT_ADDR(__atags_pointer);
> > >  
> > >  	setup_processor();
> > > -	if (atags_vaddr)
> > > +	if (atags_vaddr) {
> > >  		mdesc = setup_machine_fdt(atags_vaddr);
> > 
> > If __atags_pointer is zero, you'll end up with atags_vaddr being 
> > undefined here. I'm surprised the compiler didn't warn about that.
> 
> The warning has been disabled. See commit
> 78a5255ffb6a1af189a83e493d916ba1c54d8c75.

Hmmm... that's nasty.  I guess we'll have to get into the habit of 
test-compiling our patches with W=2 then, at least for catching the 
obvious ones like this case. Someone should automate that into 
checkpatch or the like.


Nicolas

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-10-07 22:07 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07  8:39 [PATCH v2 0/2] ARM: move FDT mapping out of linear region Ard Biesheuvel
2020-10-07  8:39 ` [PATCH v2 1/2] ARM: centralize phys-to-virt conversion of DT/ATAGS address Ard Biesheuvel
2020-10-07 15:28   ` Nicolas Pitre
2020-10-07  8:39 ` [PATCH v2 2/2] ARM: move device tree mapping out of linear region Ard Biesheuvel
2020-10-07 15:28   ` Nicolas Pitre
2020-10-07 15:32     ` Ard Biesheuvel
2020-10-07 16:38       ` Nicolas Pitre
2020-10-07 16:40       ` Nicolas Pitre
2020-10-07 21:32     ` Russell King - ARM Linux admin
2020-10-07 22:05       ` Nicolas Pitre [this message]
     [not found]   ` <CGME20201028091912eucas1p13fb9cd947faa6bfd79199ea79648b6af@eucas1p1.samsung.com>
2020-10-28  9:19     ` Marek Szyprowski
2020-10-28  9:19       ` Marek Szyprowski
2020-10-28  9:22       ` Ard Biesheuvel
2020-10-28  9:22         ` Ard Biesheuvel
2020-10-28  9:24         ` Ard Biesheuvel
2020-10-28  9:24           ` Ard Biesheuvel
2020-10-28  9:43           ` Marek Szyprowski
2020-10-28  9:43             ` Marek Szyprowski
2020-10-28 12:05       ` Joel Stanley
2020-10-28 12:05         ` Joel Stanley
2020-10-28 12:52         ` Ard Biesheuvel
2020-10-28 12:52           ` Ard Biesheuvel
2020-10-28 12:59           ` Joel Stanley
2020-10-28 12:59             ` Joel Stanley
2020-10-28 13:00             ` Ard Biesheuvel
2020-10-28 13:00               ` Ard Biesheuvel
2020-10-28 13:06               ` Joel Stanley
2020-10-28 13:06                 ` Joel Stanley
2020-10-28 13:00           ` Russell King - ARM Linux admin
2020-10-28 13:00             ` Russell King - ARM Linux admin
2020-10-28 13:04             ` Ard Biesheuvel
2020-10-28 13:04               ` Ard Biesheuvel
2020-10-28 13:09               ` Russell King - ARM Linux admin
2020-10-28 13:09                 ` Russell King - ARM Linux admin
2020-10-28 13:16           ` Marek Szyprowski
2020-10-28 13:16             ` Marek Szyprowski
2020-10-11 16:39 ` [PATCH v2 0/2] ARM: move FDT " Ard Biesheuvel

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=nycvar.YSQ.7.78.906.2010071800450.2184@knanqh.ubzr \
    --to=nico@fluxnic.net \
    --cc=ardb@kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=robh+dt@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.