PATCH: Fix warning with b44.c on 64bit boxes

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

 



sizeof() return is not an int, so use max_t to get the types right.

Signed-off-by: Alan Cox <[email protected]>

diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.16-rc1/drivers/net/b44.c linux-2.6.16-rc1/drivers/net/b44.c
--- linux.vanilla-2.6.16-rc1/drivers/net/b44.c	2006-01-17 15:36:31.000000000 +0000
+++ linux-2.6.16-rc1/drivers/net/b44.c	2006-01-17 17:20:41.000000000 +0000
@@ -2136,7 +2136,7 @@
 
 	/* Setup paramaters for syncing RX/TX DMA descriptors */
 	dma_desc_align_mask = ~(dma_desc_align_size - 1);
-	dma_desc_sync_size = max(dma_desc_align_size, sizeof(struct dma_desc));
+	dma_desc_sync_size = max_t(unsigned int, dma_desc_align_size, sizeof(struct dma_desc));
 
 	return pci_module_init(&b44_driver);
 }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux