tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH v2 2/2] Implement PT_GETXSTATE and PT_SETXSTATE



On Thu, 2019-06-06 at 11:10 -0400, Christos Zoulas wrote:
> On Jun 6,  4:43pm, mgorny%gentoo.org@localhost (=?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=) wrote:
> -- Subject: Re: [PATCH v2 2/2] Implement PT_GETXSTATE and PT_SETXSTATE
> 
> > I presume you mean the one in ptrace_machdep_dorequest()?  I suppose it
> > was there (the code is based on xmmregs in i386) to clearly scope
> > variables.
> > 
> > I think having something like:
> > 
> >   if (foo)
> >     return x;
> >   {
> >     ...
> >   }
> > 
> > would be confusing (it would look like a misplaced '{').  Do you prefer
> > if I put the scope outside 'if', i.e. directly for 'case'?
> 
> Or move the variable declarations up on top "ol school way". Well, if the
> language does not do it right...
> 
> > I suppose this avoids duplicating 'uio->uio_offset =3D 0'.  However, it's
> > also code copied from elsewhere so I'm not sure what the original
> > motivation was.
> 
> It is better style to do avoid the extra checks and duplication so I would
> also fix the original :-).
> 

I think I've done what you requested in v3 (now submitted in reply to
the top mail of the thread).  When it reaches the archive, I'm going to
try to find someone to help me test AVX-512 before I commit it.

-- 
Best regards,
Michał Górny

Attachment: signature.asc
Description: This is a digitally signed message part



Home | Main Index | Thread Index | Old Index