From: Christoph Hellwig <hch@infradead.org>
To: Atish Patra <atish.patra@wdc.com>
Cc: Albert Ou <aou@eecs.berkeley.edu>,
Anup Patel <anup@brainfault.org>,
Palmer Dabbelt <palmer@sifive.com>,
linux-kernel@vger.kernel.org, Johan Hovold <johan@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
linux-riscv@lists.infradead.org
Subject: Re: [v5 PATCH] RISC-V: Fix unsupported isa string info.
Date: Mon, 12 Aug 2019 08:02:15 -0700 [thread overview]
Message-ID: <20190812150215.GF26897@infradead.org> (raw)
In-Reply-To: <20190807182316.28013-1-atish.patra@wdc.com>
> + for (e = mandatory_ext; *e != '\0'; ++e) {
> + if (isa[0] != e[0]) {
> +#if defined(CONFIG_FP)
> + if ((isa[0] == 'f') || (isa[0] == 'd'))
> + continue;
> +#endif
> + unsupported_isa[index] = e[0];
> + index++;
> + }
I'd just use if (IS_ENABLED()) here to get full compiler coverage.
Also no need for the inner braces.
> + if (isa[0] != '\0') {
> + /* Add remainging isa strings */
> + for (e = isa; *e != '\0'; ++e) {
> +#if !defined(CONFIG_VIRTUALIZATION)
> + if (e[0] != 'h')
> +#endif
> + seq_write(f, e, 1);
> + }
> + }
This one I don't get. Why do we want to check CONFIG_VIRTUALIZATION?
> seq_puts(f, "\n");
>
> /*
> * If we were given an unsupported ISA in the device tree then print
> * a bit of info describing what went wrong.
> */
> - if (isa[0] != '\0')
> - pr_info("unsupported ISA \"%s\" in device tree\n", orig_isa);
> + if (unsupported_isa[0])
> + pr_info("unsupported ISA extensions \"%s\" in device tree for cpu [%ld]\n",
> + unsupported_isa, cpuid);
And I'm not even sure why we care about unsupported extensions. Sooner
or late a few will op up and they should be harmless.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2019-08-12 15:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-07 18:23 [v5 PATCH] RISC-V: Fix unsupported isa string info Atish Patra
2019-08-12 15:02 ` Christoph Hellwig [this message]
2019-08-16 19:21 ` Atish Patra
2019-08-18 18:16 ` hch
2019-08-20 7:59 ` Atish Patra
2019-09-06 23:27 ` Atish Patra
2019-09-10 6:00 ` hch
2019-09-13 20:47 ` Palmer Dabbelt
2019-09-14 4:07 ` Atish Patra
2019-08-19 10:15 ` Jacob Lifshay
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=20190812150215.GF26897@infradead.org \
--to=hch@infradead.org \
--cc=anup@brainfault.org \
--cc=aou@eecs.berkeley.edu \
--cc=atish.patra@wdc.com \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@sifive.com \
--cc=paul.walmsley@sifive.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).