Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 110547
b: refs/heads/master
c: 061837b
h: refs/heads/master
i:
  110545: e883b3f
  110543: dc00f98
v: v3
  • Loading branch information
Julia Lawall authored and Jens Axboe committed Oct 9, 2008
1 parent 4e5851f commit c393a11
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 905bd78f2188da69e74966918e3d71df3dff382b
refs/heads/master: 061837bc8687edc2739ef02f721b7ae0b8076390
8 changes: 4 additions & 4 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -3460,8 +3460,8 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
hba[i]->intr[SIMPLE_MODE_INT], dac ? "" : " not");

hba[i]->cmd_pool_bits =
kmalloc(((hba[i]->nr_cmds + BITS_PER_LONG -
1) / BITS_PER_LONG) * sizeof(unsigned long), GFP_KERNEL);
kmalloc(DIV_ROUND_UP(hba[i]->nr_cmds, BITS_PER_LONG)
* sizeof(unsigned long), GFP_KERNEL);
hba[i]->cmd_pool = (CommandList_struct *)
pci_alloc_consistent(hba[i]->pdev,
hba[i]->nr_cmds * sizeof(CommandList_struct),
Expand Down Expand Up @@ -3493,8 +3493,8 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
/* command and error info recs zeroed out before
they are used */
memset(hba[i]->cmd_pool_bits, 0,
((hba[i]->nr_cmds + BITS_PER_LONG -
1) / BITS_PER_LONG) * sizeof(unsigned long));
DIV_ROUND_UP(hba[i]->nr_cmds, BITS_PER_LONG)
* sizeof(unsigned long));

hba[i]->num_luns = 0;
hba[i]->highest_lun = -1;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/block/cpqarray.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ static int __init cpqarray_register_ctlr( int i, struct pci_dev *pdev)
hba[i]->pci_dev, NR_CMDS * sizeof(cmdlist_t),
&(hba[i]->cmd_pool_dhandle));
hba[i]->cmd_pool_bits = kcalloc(
(NR_CMDS+BITS_PER_LONG-1)/BITS_PER_LONG, sizeof(unsigned long),
DIV_ROUND_UP(NR_CMDS, BITS_PER_LONG), sizeof(unsigned long),
GFP_KERNEL);

if (!hba[i]->cmd_pool_bits || !hba[i]->cmd_pool)
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/block/floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1355,20 +1355,20 @@ static void fdc_specify(void)
}

/* Convert step rate from microseconds to milliseconds and 4 bits */
srt = 16 - (DP->srt * scale_dtr / 1000 + NOMINAL_DTR - 1) / NOMINAL_DTR;
srt = 16 - DIV_ROUND_UP(DP->srt * scale_dtr / 1000, NOMINAL_DTR);
if (slow_floppy) {
srt = srt / 4;
}
SUPBOUND(srt, 0xf);
INFBOUND(srt, 0);

hlt = (DP->hlt * scale_dtr / 2 + NOMINAL_DTR - 1) / NOMINAL_DTR;
hlt = DIV_ROUND_UP(DP->hlt * scale_dtr / 2, NOMINAL_DTR);
if (hlt < 0x01)
hlt = 0x01;
else if (hlt > 0x7f)
hlt = hlt_max_code;

hut = (DP->hut * scale_dtr / 16 + NOMINAL_DTR - 1) / NOMINAL_DTR;
hut = DIV_ROUND_UP(DP->hut * scale_dtr / 16, NOMINAL_DTR);
if (hut < 0x1)
hut = 0x1;
else if (hut > 0xf)
Expand Down Expand Up @@ -2385,7 +2385,7 @@ static void rw_interrupt(void)

#ifdef FLOPPY_SANITY_CHECK
if (nr_sectors / ssize >
(in_sector_offset + current_count_sectors + ssize - 1) / ssize) {
DIV_ROUND_UP(in_sector_offset + current_count_sectors, ssize)) {
DPRINT("long rw: %x instead of %lx\n",
nr_sectors, current_count_sectors);
printk("rs=%d s=%d\n", R_SECTOR, SECTOR);
Expand Down

0 comments on commit c393a11

Please sign in to comment.