RE: [PATCH v2] mmc: tmio-mmc: fix bad pointer math

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

 



Hi Geert,

On Wednesday, July 12, 2017 1, Geert Uytterhoeven wrote:
> > Reported-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> > Fixes: 8185e51f358a: ("mmc: tmio-mmc: add support for 32bit data port")
> > Signed-off-by: Chris Brandt <chris.brandt@xxxxxxxxxxx>
> 
> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>


As always, thank you for your review.


> >                 if (is_read) {
> >                         sd_ctrl_read32_rep(host, CTL_SD_DATA_PORT,
> > -                                          (u32 *)data, 1);
> > +                                          &data, 1);
> 
> I would use the opportunity to merge the two above lines, now they fit
> on a single line.
> 
> > +                       memcpy(buf32, &data, count);
> >                 } else {
> > -                       memcpy(data, buf8, count);
> > +                       memcpy(&data, buf32, count);
> >                         sd_ctrl_write32_rep(host, CTL_SD_DATA_PORT,
> > -                                           (u32 *)data, 1);
> > +                                           &data, 1);
> 
> Likewise.

Easy enough.

Done!


Thanks,
Chris
��.n��������+%������w��{.n�����{��i��)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux