From 5c7895c05fabbeda85cd205ae73d0523b96b098d Mon Sep 17 00:00:00 2001 From: Himangi Saraogi Date: Mon, 10 Mar 2014 23:23:18 +0530 Subject: [PATCH] staging:comedi: Fix sparse warnings This patch fixes the following sparse warnings: drivers/staging/comedi/drivers/gsc_hpdi.c:367:53: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/gsc_hpdi.c:367:53: expected unsigned int volatile [unsigned] [usertype] pci_start_addr drivers/staging/comedi/drivers/gsc_hpdi.c:367:53: got restricted __le32 [usertype] drivers/staging/comedi/drivers/gsc_hpdi.c:370:55: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/gsc_hpdi.c:370:55: expected unsigned int volatile [unsigned] [usertype] local_start_addr drivers/staging/comedi/drivers/gsc_hpdi.c:370:55: got restricted __le32 [usertype] drivers/staging/comedi/drivers/gsc_hpdi.c:371:52: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/gsc_hpdi.c:371:52: expected unsigned int volatile [unsigned] [usertype] transfer_size drivers/staging/comedi/drivers/gsc_hpdi.c:371:52: got restricted __le32 [usertype] drivers/staging/comedi/drivers/gsc_hpdi.c:373:43: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/gsc_hpdi.c:373:43: expected unsigned int volatile [unsigned] [usertype] next drivers/staging/comedi/drivers/gsc_hpdi.c:373:43: got restricted __le32 [usertype] drivers/staging/comedi/drivers/gsc_hpdi.c:390:39: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/gsc_hpdi.c:390:39: expected unsigned int volatile [unsigned] [usertype] next drivers/staging/comedi/drivers/gsc_hpdi.c:390:39: got restricted __le32 [usertype] drivers/staging/comedi/drivers/gsc_hpdi.c:704:15: warning: cast to restricted __le32 drivers/staging/comedi/drivers/gsc_hpdi.c:707:15: warning: cast to restricted __le32 drivers/staging/comedi/drivers/cb_pcidas64.c:1495:56: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:1495:56: expected unsigned int volatile [unsigned] [usertype] pci_start_addr drivers/staging/comedi/drivers/cb_pcidas64.c:1495:56: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:1498:66: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:1498:66: expected unsigned int volatile [unsigned] [usertype] local_start_addr drivers/staging/comedi/drivers/cb_pcidas64.c:1498:66: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:1502:66: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:1502:66: expected unsigned int volatile [unsigned] [usertype] local_start_addr drivers/staging/comedi/drivers/cb_pcidas64.c:1502:66: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:1505:55: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:1505:55: expected unsigned int volatile [unsigned] [usertype] transfer_size drivers/staging/comedi/drivers/cb_pcidas64.c:1505:55: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:1506:46: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:1506:46: expected unsigned int volatile [unsigned] [usertype] next drivers/staging/comedi/drivers/cb_pcidas64.c:1506:46: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:1515:64: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:1515:64: expected unsigned int volatile [unsigned] [usertype] pci_start_addr drivers/staging/comedi/drivers/cb_pcidas64.c:1515:64: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:1517:66: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:1517:66: expected unsigned int volatile [unsigned] [usertype] local_start_addr drivers/staging/comedi/drivers/cb_pcidas64.c:1517:66: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:1520:63: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:1520:63: expected unsigned int volatile [unsigned] [usertype] transfer_size drivers/staging/comedi/drivers/cb_pcidas64.c:1520:63: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:1521:54: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:1521:54: expected unsigned int volatile [unsigned] [usertype] next drivers/staging/comedi/drivers/cb_pcidas64.c:1521:54: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:2540:63: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:2540:63: expected unsigned int volatile [unsigned] [usertype] transfer_size drivers/staging/comedi/drivers/cb_pcidas64.c:2540:63: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:2890:58: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:2890:58: expected unsigned int volatile [unsigned] [usertype] transfer_size drivers/staging/comedi/drivers/cb_pcidas64.c:2890:58: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:2893:21: warning: cast to restricted __le32 drivers/staging/comedi/drivers/cb_pcidas64.c:2895:49: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:2895:49: expected unsigned int volatile [unsigned] [usertype] next drivers/staging/comedi/drivers/cb_pcidas64.c:2895:49: got restricted __le32 [usertype] drivers/staging/comedi/drivers/cb_pcidas64.c:2898:21: warning: cast to restricted __le32 drivers/staging/comedi/drivers/cb_pcidas64.c:2900:54: warning: incorrect type in assignment (different base types) drivers/staging/comedi/drivers/cb_pcidas64.c:2900:54: expected unsigned int volatile [unsigned] [usertype] next drivers/staging/comedi/drivers/cb_pcidas64.c:2900:54: got restricted __le32 [usertype] Signed-off-by: Himangi Saraogi Signed-off-by: Peter P Waskiewicz Jr --- drivers/staging/comedi/drivers/plx9080.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/comedi/drivers/plx9080.h b/drivers/staging/comedi/drivers/plx9080.h index 55e3c2e2bc52..25706531b885 100644 --- a/drivers/staging/comedi/drivers/plx9080.h +++ b/drivers/staging/comedi/drivers/plx9080.h @@ -29,13 +29,13 @@ /* descriptor block used for chained dma transfers */ struct plx_dma_desc { - volatile uint32_t pci_start_addr; - volatile uint32_t local_start_addr; + __le32 pci_start_addr; + __le32 local_start_addr; /* transfer_size is in bytes, only first 23 bits of register are used */ - volatile uint32_t transfer_size; + __le32 transfer_size; /* address of next descriptor (quad word aligned), plus some * additional bits (see PLX_DMA0_DESCRIPTOR_REG) */ - volatile uint32_t next; + __le32 next; }; /********************************************************************** -- 2.20.1