lkml.org 
[lkml]   [2021]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] wireguard: queueing: Fix implicit type conversion
On Fri, Oct 29, 2021 at 3:08 AM Jiasheng Jiang <jiasheng@iscas.ac.cn> wrote:
> It is universally accepted that the implicit type conversion is
> terrible.

I'm not so sure about this, but either way, I think this needs a bit
more justification and analysis to merge. cpumask_weight returns an
unsigned, for example, and is used as a modulo operand later in the
function. It looks like nr_cpumask_bits is also unsigned. And so on.
So you're really trading one implicit type conversion package for
another. If you're swapping these around, why? It can't be because,
"it is universally accepted that the implicit type conversion is
terrible," since you're adding more of it in a different form. Is your
set of implicit type conversions semantically more proper? If so,
please describe that. Alternatively, is there a way to harmonize
everything into one type? Is there a minimal set of casts that enables
that?

Jason

\
 
 \ /
  Last update: 2021-10-29 16:28    [W:0.524 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site