[PATCH v3] staging: ccree: fixed sparse pointer signedness warnings.

Gilad Ben-Yossef gilad at benyossef.com
Wed Jan 10 13:03:01 UTC 2018


Hi Jeremy,

On Wed, Jan 10, 2018 at 1:53 PM, Jeremy Sowden <jeremy at azazel.net> wrote:
> The driver uses a mixture of signed and unsigned integer variables for
> holding arrays lengths and indices, which gives rise to sparse warnings
> when the addresses of signed variables are passed to functions expecting

Just curious, I didn't see these warning when running sparse myself.
Can you share the command line/flags you've used?

> pointers to unsigned integers.  This patch fixes those warnings by
> converting those signed variables to unsigned as follows:
>
>   * removed some hard-coded array indices.

Removing the hard coded array indices is a separate and different issue
and so needs to be dealt it in a separate patch. Please split your patch
into a patchset: one for removing the hard coded values and one for
the signed/unsigned remedy.

>
>   * changed the types of a number of index and length variables from
>     signed to unsigned integer types.
>
>   * changed the return-types of a couple of functions that return length
>     values which are assigned to one of these variables from signed to
>     unsigned integer types.
>

Other that that it looks good to me.


Thanks!
Gilad


-- 
Gilad Ben-Yossef
Chief Coffee Drinker

"If you take a class in large-scale robotics, can you end up in a
situation where the homework eats your dog?"
 -- Jean-Baptiste Queru


More information about the devel mailing list