Skip to contentSkip to conversation

staging/vt6655: pointer to driver_data needs to be type long

PATCH In review Fernando Luis Vázquez Cao 2 participants 4 messages Jun 26, 2009 – Jul 4, 2009 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging/vt6655: pointer to driver_data needs to be type long

Fix the compilation error below while at it.

drivers/staging/vt6655/device_main.c:347: warning: cast from pointer to integer of different size drivers/staging/vt6655/device_main.c:347: error: initializer element is not constant drivers/staging/vt6655/device_main.c:347: error: (near initialization for ‘device_id_table[0].driver_data’)

---

drivers/staging/vt6655/device_main.c +1 -1
diff -urNp linux-2.6.31-rc1-orig/drivers/staging/vt6655/device_main.c linux-2.6.31-rc1/drivers/staging/vt6655/device_main.c
@@ -344,7 +344,7 @@ static CHIP_INFO chip_info_table[]= {
 };
 
 static struct pci_device_id device_id_table[] __devinitdata = {
-{ 0x1106, 0x3253, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (int)&chip_info_table[0]},
+{ 0x1106, 0x3253, PCI_ANY_ID, PCI_ANY_ID, 0, 0, (long)&chip_info_table[0]},
 { 0, }
 };
 #endif
#1 lore raw
Quoted 7 lines · Fernando Luis Vázquez Cao

Fix the compilation error below while at it.

drivers/staging/vt6655/device_main.c:347: warning: cast from pointer to integer of different size drivers/staging/vt6655/device_main.c:347: error: initializer element is not constant drivers/staging/vt6655/device_main.c:347: error: (near initialization for ‘device_id_table[0].driver_data’)

This patch doesn't apply :(

Care to resync off of tomorrow's linux-next tree?

thanks,

greg k-h

#2 lore raw
Quoted 7 lines · Greg KH
Quoted 6 lines · Fernando Luis Vázquez Cao

Fix the compilation error below while at it.

drivers/staging/vt6655/device_main.c:347: warning: cast from pointer to integer of different size drivers/staging/vt6655/device_main.c:347: error: initializer element is not constant drivers/staging/vt6655/device_main.c:347: error: (near initialization for ‘device_id_table[0].driver_data’)

Quoted 5 lines
Quoted 1 line

This patch doesn't apply :(

Care to resync off of tomorrow's linux-next tree?

It seems that a patch from Alan Cox (linux-next: 38d257422fb010e11180fc9c5794812f390aca74) which fixes this issue got merged first, so mine is not needed anymore if you are planning to send the fix to Linus before the next merge window. What are your plans?

Thanks,

Fernando

#3 lore raw
Quoted 10 lines · Fernando Luis Vázquez Cao
Quoted 9 lines · Greg KH
Quoted 7 lines · Fernando Luis Vázquez Cao

Fix the compilation error below while at it.

drivers/staging/vt6655/device_main.c:347: warning: cast from pointer to integer of different size drivers/staging/vt6655/device_main.c:347: error: initializer element is not constant drivers/staging/vt6655/device_main.c:347: error: (near initialization for ‘device_id_table[0].driver_data’)

Quoted 7 lines
Quoted 3 lines

This patch doesn't apply :(

Care to resync off of tomorrow's linux-next tree?

It seems that a patch from Alan Cox (linux-next: 38d257422fb010e11180fc9c5794812f390aca74) which fixes this issue got merged first, so mine is not needed anymore if you are planning to send the fix to Linus before the next merge window. What are your plans?

Ok, i'll stick with Alan's fix for now.

thanks,

greg k-h