ide: ht6560b: Fix cast to pointer from integer of different size
PATCH 1/2 ide: ht6560b: Fix cast to pointer from integer of different size
Integer passed as pointer to drvdata should be cast to unsigned long to avoid warning (compile testing on alpha architecture):
drivers/ide/ht6560b.c: In function ‘ht6560b_init_dev’:
drivers/ide/ht6560b.c:318:27: warning:
cast to pointer from integer of different size [-Wint-to-pointer-cast]---
Only compile tested
--- drivers/ide/ht6560b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ide/ht6560b.c +1 -1
@@ -310,7 +310,7 @@ static void __init ht6560b_init_dev(ide_drive_t *drive) {ide_hwif_t *hwif = drive->hwif;/* Setting default configurations for drives. */ -int t = (HT_CONFIG_DEFAULT <<8 ) |HT_TIMING_DEFAULT ; +unsigned long t = (HT_CONFIG_DEFAULT <<8 ) |HT_TIMING_DEFAULT ;if (hwif->channel) t |= (HT_SECONDARY_IF <<8 );
Signature · 1 line
2.17.1
PATCH 2/2 ide: qd65xx: Fix cast to pointer from integer of different size
Integer passed as pointer to drvdata should be cast to unsigned long to avoid warning (compile testing on alpha architecture):
drivers/ide/qd65xx.c: In function ‘qd6580_init_dev’:
drivers/ide/qd65xx.c:312:27: warning:
cast to pointer from integer of different size [-Wint-to-pointer-cast]
---
Only compile tested
--- drivers/ide/qd65xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ide/qd65xx.c +1 -1
@@ -299,7 +299,7 @@ static void __init qd6500_init_dev(ide_drive_t *drive)static void __init qd6580_init_dev (ide_drive_t *drive) {ide_hwif_t *hwif = drive->hwif; -u16 t1, t2; +unsigned long t1, t2;u8 base = (hwif->config_data &0xff00 ) >>8 ;u8 config =QD_CONFIG (hwif);
Signature · 1 line
2.17.1
David Miller
AppliedRe: [PATCH 2/2] ide: qd65xx: Fix cast to pointer from integer of different size
From: Krzysztof Kozlowski <[email protected]>
Date: Sat, 4 Jan 2020 15:33:48 +0100
Quoted 8 lines
Integer passed as pointer to drvdata should be cast to unsigned long to avoid warning (compile testing on alpha architecture):
drivers/ide/qd65xx.c: In function ‘qd6580_init_dev’:
drivers/ide/qd65xx.c:312:27: warning:
cast to pointer from integer of different size [-Wint-to-pointer-cast]Signed-off-by Krzysztof Kozlowski <[email protected]>
Applied.
David Miller
AppliedFrom: Krzysztof Kozlowski <[email protected]>
Date: Sat, 4 Jan 2020 15:33:47 +0100
Quoted 8 lines
Integer passed as pointer to drvdata should be cast to unsigned long to avoid warning (compile testing on alpha architecture):
drivers/ide/ht6560b.c: In function ‘ht6560b_init_dev’: drivers/ide/ht6560b.c:318:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]Signed-off-by Krzysztof Kozlowski <[email protected]>
Applied.