On Monday, July 15, 2013 9:10 PM, Joe Perches wrote:
> On Mon, 2013-07-15 at 15:11 +0900, Jingoo Han wrote:
> []
> > diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c
> []
> > @@ -338,8 +338,10 @@ static int acquire_dma(struct s3c64xx_spi_driver_data 
> > *sdd)
> []
> > -   sdd->rx_dma.ch = (void *)sdd->ops->request(sdd->rx_dma.dmach, &req, 
> > dev, "rx");
> > -   sdd->tx_dma.ch = (void *)sdd->ops->request(sdd->tx_dma.dmach, &req, 
> > dev, "tx");
> > +   sdd->rx_dma.ch = (void *)sdd->ops->request(sdd->rx_dma.dmach,
> > +                                           &req, dev, "rx");
> > +   sdd->tx_dma.ch = (void *)sdd->ops->request(sdd->tx_dma.dmach,
> > +                                           &req, dev, "tx");
> 
> There should be sparse errors here.
> sdd->ops->request is unsigned int, not unsigned long.
> Care to fix the cast of unsigned to pointer too?

OK, I will fix it as below:

sdd->rx_dma.ch = (unsigned long *)sdd->ops->request(sdd->rx_dma.dmach,
                                                        &req, dev, "rx");
sdd->tx_dma.ch = (unsigned long *)sdd->ops->request(sdd->tx_dma.dmach,
                                                        &req, dev, "tx");

> 
> > @@ -439,7 +441,7 @@ static int s3c64xx_spi_prepare_transfer(struct 
> > spi_master *spi)
> >
> >     /* Acquire DMA channels */
> >     sdd->rx_dma.ch = dma_request_slave_channel_compat(mask, filter,
> > -                           (void*)sdd->rx_dma.dmach, dev, "rx");
> > +                           (void *)sdd->rx_dma.dmach, dev, "rx");
> 
> It seems unsigned to pointer conversions are pretty
> rampant in this code.

It seems so.
I will look into it, later.

Thank you for your feedback.

Best regards,
Jingoo Han


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to