[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190115135441.GF28946@infradead.org>
Date: Tue, 15 Jan 2019 05:54:41 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Atish Patra <atish.patra@....com>
Cc: linux-riscv@...ts.infradead.org,
Patrick Stählin <me@...ki.ch>,
Albert Ou <aou@...s.berkeley.edu>,
Jason Cooper <jason@...edaemon.net>,
Alan Kao <alankao@...estech.com>,
Dmitriy Cherkasov <dmitriy@...-tech.org>,
Anup Patel <anup@...infault.org>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
linux-kernel@...r.kernel.org,
Michael Clark <michaeljclark@....com>,
Palmer Dabbelt <palmer@...ive.com>,
Andreas Schwab <schwab@...e.de>,
Marc Zyngier <marc.zyngier@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Zong Li <zongbox@...il.com>
Subject: Re: [PATCH v2 6/8] RISC-V: Add required checks during clock source
init
> hartid = riscv_of_processor_hartid(n);
> + if (hartid < 0) {
> + pr_warn("Not valid hartid for node [%pOF] error = [%d]\n",
> + n, hartid);
> + return hartid;
> + }
> cpuid = riscv_hartid_to_cpuid(hartid);
>
> + if (cpuid < 0) {
> + pr_warn("Invalid cpuid for hartid [%d]\n", hartid);
> + return cpuid;
> + }
> +
No need for the empty line after the riscv_hartid_to_cpuid call.
> - clocksource_register_hz(cs, riscv_timebase);
> + error = clocksource_register_hz(cs, riscv_timebase);
>
> + if (error) {
Same here.
Powered by blists - more mailing lists