[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190812150215.GF26897@infradead.org>
Date: Mon, 12 Aug 2019 08:02:15 -0700
From: Christoph Hellwig <hch@...radead.org>
To: Atish Patra <atish.patra@....com>
Cc: linux-kernel@...r.kernel.org, Albert Ou <aou@...s.berkeley.edu>,
Anup Patel <anup@...infault.org>,
Palmer Dabbelt <palmer@...ive.com>,
Johan Hovold <johan@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
linux-riscv@...ts.infradead.org
Subject: Re: [v5 PATCH] RISC-V: Fix unsupported isa string info.
> + 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.
Powered by blists - more mailing lists