Re: [PATCH 21/21] advansys: Changes to work on parisc

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

 



On Tue,  2 Oct 2007 21:55:42 -0400
Matthew Wilcox <matthew@xxxxxx> wrote:

> @@ -13428,9 +13428,9 @@ static int __devinit advansys_board_found(struct Scsi_Host *shost,
>  		boardp->ioremap_addr = ioremap(pci_resource_start(pdev, 1),
>  					       boardp->asc_n_io_port);
>  		if (!boardp->ioremap_addr) {
> -			shost_printk(KERN_ERR, shost, "ioremap(%x, %d) "
> +			shost_printk(KERN_ERR, shost, "ioremap(%lx, %d) "
>  					"returned NULL\n",
> -					pci_resource_start(pdev, 1),
> +					(long)pci_resource_start(pdev, 1),
>  					boardp->asc_n_io_port);

This isn't right.  resource_size_t can be 64-bit so should be cast to
unsigned long long and printed with %llx.

If it is known that this driver will never encounter a 64-bit address here
then this optimisation should be accompanied by a comment at every place
where it is employed so that people do not copy the wrong code into other
drivers.

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux