Re: + minmax-sanity-check-constant-bounds-when-clamping-checkpatch-fixes.patch added to mm-nonmm-unstable branch

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

 



On Tue, 18 Oct 2022 15:27:43 +0300 Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

> On Mon, Oct 17, 2022 at 06:17:59PM -0700, Andrew Morton wrote:
> 
> ...
> > +	__builtin_choose_expr(__typecheck(val, lo) && __typecheck(val, hi) &&\
> > +			      __typecheck(hi, lo) && __is_constexpr(val) &&\
> > +			      __is_constexpr(lo) && __is_constexpr(hi),	\
> > +		__clamp(val, lo, hi),					\
> > +		__clamp_once(val, lo, hi, __UNIQUE_ID(__val),		\
> >  			     __UNIQUE_ID(__lo), __UNIQUE_ID(__hi))); })
> 
> ...but this one becomes less readable. I think checkpatch is always a
> recommendation than requirement. I would leave at least the last as is, but
> formally I think the entire patch is a churn to satisfy controversial
> recommendation.

This wasn't really a checkpatch thing.  I looked at the code in an
80-col window and nearly died.  It wasn't *necessary* to make it look
so bad in 80 cols, so why do it?





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux