lkml.org 
[lkml]   [2019]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 07/11] mtd: rawnand: atmel: add sam9x60 nand controller support
Date


On 02/13/2019 12:39 PM, Alexandre Belloni wrote:
> Hi,
>
> On 13/02/2019 09:00:05+0000, Tudor.Ambarus@microchip.com wrote:
>> - nc->ebi_csa_offs = (uintptr_t)match->data;
>> + nc->ebi_csa = (struct atmel_smc_nand_ebi_csa_cfg *)match->data;
>>
>
> This cast is probably not necessary anymore as this cast a pointer to a
> pointer.
>

it's done to discard the const qualifier from pointer target type. data is of
type const void *. nc->ebi_csa was not declared as const because below in the
same function we are modifying one of its members:

nc->ebi_csa->offs += 4;

I'll add a comment, thanks!

Cheers,
ta
\
 
 \ /
  Last update: 2019-02-13 11:54    [W:0.073 / U:1.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site