lkml.org 
[lkml]   [2019]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] riscv: Correct the initialized flow of FP register
On Thu, 8 Aug 2019, Anup Patel wrote:

> On Thu, Aug 8, 2019 at 1:30 PM Vincent Chen <vincent.chen@sifive.com> wrote:
> >
> > +static inline void fstate_off(struct task_struct *task,
> > + struct pt_regs *regs)
> > +{
> > + regs->sstatus = (regs->sstatus & ~(SR_FS)) | SR_FS_OFF;
>
> The SR_FS_OFF is 0x0 so no need for ORing it.

That one looks OK to me, since it makes it more obvious to humans what's
happening here - reviewers won't need to know that "off" is 0x0. The
compiler should drop it internally, so it won't affect the generated
code.

> Apart from above minor comment, looks good to me.
>
> Reviewed-by: Anup Patel <anup@brainfault.org>

Will add your Reviewed-by: tag - let us know if you want me to drop it or
caveat it.


- Paul

\
 
 \ /
  Last update: 2019-08-08 17:50    [W:0.073 / U:0.608 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site