lkml.org 
[lkml]   [2019]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 4/8] RISC-V: Allow hartid-to-cpuid function to fail.
On Tue, Jan 08, 2019 at 01:38:34AM -0800, Atish Patra wrote:
> It is perfectly okay to call riscv_hartid_to_cpuid for a
> hartid that is not mapped with an CPU id. It can happen
> if the calling functions retrieves the hartid from DT.
> However, that hartid was never brought online by the firmware
> or kernel for any reasons.
>
> No need to BUG() in the above case. A negative error return
> is sufficient and the calling function should check for the
> return value always.
>
> Signed-off-by: Atish Patra <atish.patra@wdc.com>

Looks fine (modulo the line length issues):

Reviewed-by: Christoph Hellwig <hch@lst.de>

\
 
 \ /
  Last update: 2019-01-15 14:53    [W:0.145 / U:36.080 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site