Commit 18388625 authored by Jeff Garzik's avatar Jeff Garzik

[block sx8] fix warning

As 'i' and 'host->id' are of different types (signed vs. unsigned),
we need a cast.

Eventually host->id should probably be made unsigned, but this
requires further analysis.
parent 72aa1a62
...@@ -1503,7 +1503,8 @@ static int carm_init_disks(struct carm_host *host) ...@@ -1503,7 +1503,8 @@ static int carm_init_disks(struct carm_host *host)
} }
port->disk = disk; port->disk = disk;
sprintf(disk->disk_name, DRV_NAME "/%u", (host->id * CARM_MAX_PORTS) + i); sprintf(disk->disk_name, DRV_NAME "/%u",
(unsigned int) (host->id * CARM_MAX_PORTS) + i);
sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i); sprintf(disk->devfs_name, DRV_NAME "/%u_%u", host->id, i);
disk->major = host->major; disk->major = host->major;
disk->first_minor = i * CARM_MINORS_PER_MAJOR; disk->first_minor = i * CARM_MINORS_PER_MAJOR;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment