Re: [PATCH 1/2] [media] saa7134: Remove some casting warnings

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

 



Em Tue, 23 Sep 2014 13:08:55 +0200
Hans Verkuil <hverkuil@xxxxxxxxx> escreveu:

> On 09/23/14 12:59, Mauro Carvalho Chehab wrote:
> > drivers/media/pci/saa7134/saa7134-go7007.c:247:17: warning: incorrect type in argument 1 (different base types)
> > drivers/media/pci/saa7134/saa7134-go7007.c:247:17:    expected unsigned int [unsigned] val
> > drivers/media/pci/saa7134/saa7134-go7007.c:247:17:    got restricted __le32 [usertype] <noident>
> > drivers/media/pci/saa7134/saa7134-go7007.c:252:17: warning: incorrect type in argument 1 (different base types)
> > drivers/media/pci/saa7134/saa7134-go7007.c:252:17:    expected unsigned int [unsigned] val
> > drivers/media/pci/saa7134/saa7134-go7007.c:252:17:    got restricted __le32 [usertype] <noident>
> > drivers/media/pci/saa7134/saa7134-go7007.c:299:9: warning: incorrect type in argument 1 (different base types)
> > drivers/media/pci/saa7134/saa7134-go7007.c:299:9:    expected unsigned int [unsigned] val
> > drivers/media/pci/saa7134/saa7134-go7007.c:299:9:    got restricted __le32 [usertype] <noident>
> > drivers/media/pci/saa7134/saa7134-go7007.c:300:9: warning: incorrect type in argument 1 (different base types)
> > drivers/media/pci/saa7134/saa7134-go7007.c:300:9:    expected unsigned int [unsigned] val
> > drivers/media/pci/saa7134/saa7134-go7007.c:300:9:    got restricted __le32 [usertype] <noident>
> > 
> > Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx>
> 
> Nacked-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> 
> > 
> > diff --git a/drivers/media/pci/saa7134/saa7134-go7007.c b/drivers/media/pci/saa7134/saa7134-go7007.c
> > index 3e9ca4821b8c..d9af6f3dc8af 100644
> > --- a/drivers/media/pci/saa7134/saa7134-go7007.c
> > +++ b/drivers/media/pci/saa7134/saa7134-go7007.c
> > @@ -244,12 +244,12 @@ static void saa7134_go7007_irq_ts_done(struct saa7134_dev *dev,
> >  		dma_sync_single_for_cpu(&dev->pci->dev,
> >  					saa->bottom_dma, PAGE_SIZE, DMA_FROM_DEVICE);
> >  		go7007_parse_video_stream(go, saa->bottom, PAGE_SIZE);
> > -		saa_writel(SAA7134_RS_BA2(5), cpu_to_le32(saa->bottom_dma));
> > +		saa_writel(SAA7134_RS_BA2(5), (__force u32)cpu_to_le32(saa->bottom_dma));
> 
> saa_writel is a define for writel, which already does cpu_to_le32. So the correct
> solution is to drop the cpu_to_le32 entirely.
> 
> I should have seen that.
> 
> Will you update your patch or shall I repost my patch with this fix included?

I'll update it.

Thanks,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux