From c24ba0f37b88449b1b0210b25b5feacc04b36bc9 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sat, 27 Sep 2003 16:17:50 -0400 Subject: [PATCH] Misc warning fixes: * block/cciss: eliminate "comparison always false" warning * char/agp/amd64-agp: properly suffix 64-bit constants * ide/legacy/pdc4030: fix incomplete conversion to new IDE module API --- drivers/block/cciss.c | 2 ++ drivers/char/agp/amd64-agp.c | 6 +++--- drivers/ide/legacy/pdc4030.c | 12 +++--------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 3d7fc3bfa6c92..5066e6136ce3d 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c @@ -636,9 +636,11 @@ static int cciss_ioctl(struct inode *inode, struct file *filep, { return -EINVAL; } +#if 0 /* 'buf_size' member is 16-bits, and always smaller than kmalloc limit */ /* Check kmalloc limits */ if(iocommand.buf_size > 128000) return -EINVAL; +#endif if(iocommand.buf_size > 0) { buff = kmalloc(iocommand.buf_size, GFP_KERNEL); diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c index 204634ae69a29..1d4fca34e32f8 100644 --- a/drivers/char/agp/amd64-agp.c +++ b/drivers/char/agp/amd64-agp.c @@ -91,9 +91,9 @@ static int amd64_insert_memory(struct agp_memory *mem, off_t pg_start, int type) for (i = 0, j = pg_start; i < mem->page_count; i++, j++) { tmp = agp_bridge->driver->mask_memory(mem->memory[i], mem->type); - BUG_ON(tmp & 0xffffff0000000ffc); - pte = (tmp & 0x000000ff00000000) >> 28; - pte |=(tmp & 0x00000000fffff000); + BUG_ON(tmp & 0xffffff0000000ffcULL); + pte = (tmp & 0x000000ff00000000ULL) >> 28; + pte |=(tmp & 0x00000000fffff000ULL); pte |= GPTE_VALID | GPTE_COHERENT; agp_bridge->gatt_table[j] = pte; diff --git a/drivers/ide/legacy/pdc4030.c b/drivers/ide/legacy/pdc4030.c index 03faa6677d6a6..7f59acf524bea 100644 --- a/drivers/ide/legacy/pdc4030.c +++ b/drivers/ide/legacy/pdc4030.c @@ -304,22 +304,16 @@ int __init ide_probe_for_pdc4030(void) #ifndef MODULE if (enable_promise_support == 0) - return; + return 0; #endif for (index = 0; index < MAX_HWIFS; index++) { hwif = &ide_hwifs[index]; - if (hwif->chipset == ide_unknown && detect_pdc4030(hwif)) { -#ifndef MODULE - setup_pdc4030(hwif); -#else + if (hwif->chipset == ide_unknown && detect_pdc4030(hwif)) return setup_pdc4030(hwif); -#endif - } } -#ifdef MODULE + return 0; -#endif } static void __exit release_pdc4030(ide_hwif_t *hwif, ide_hwif_t *mate) -- 2.53.0