Re: s390/pkey: Use memdup_user() rather than duplicating its implementation

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

 



On Wed, 2019-11-06 at 14:00 +0100, Markus Elfring wrote:
> > > Reuse existing functionality from memdup_user() instead of keeping
> > > duplicate source code.
> > > 
> > > Generated by: scripts/coccinelle/api/memdup_user.cocci
> …
> > > Fixes: f2bbc96e7cfad3891b7bf9bd3e566b9b7ab4553d ("s390/pkey: add CCA AES cipher key support")
> > 
> > This doesn't fix anything
> 
> How would you categorise the proposed source code reduction and software reuse?

As inappropriate for a fixes tag.

The fixes tag is "used to make it easy to determine where a bug
originated, which can help review a bug fix"

There is no bug here.

> Will the development opinions vary between contributors?

Ever had a bikeshed?

> > > +	return !ukey || keylen < MINKEYBLOBSIZE || keylen > KEYBLOBBUFSIZE
> > > +	       ? ERR_PTR(-EINVAL)
> > > +	       : memdup_user(ukey, keylen);
> > 
> > This is a very poor use of ternary ?: code.
> 
> The conditional operator is applied once more in the intended way,
> isn't it?

Please take your development efforts to obfuscated c contests.





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux