diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-07-15 15:21:41 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-15 15:21:41 -0400 |
commit | a792bd5a407872714942f50bf24083874ce03745 (patch) | |
tree | 5e0c2562995de351d652bfa2784a2f20e4af2d39 | |
parent | d6cddd3cac6650f273a2595c9f403aacee01ab05 (diff) |
ide-tape: use clamp_t() rather than nested min_t()/max_t()
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/ide-tape.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/ide-tape.c b/drivers/ide/ide-tape.c index 1e1f26331a24..2d822df08658 100644 --- a/drivers/ide/ide-tape.c +++ b/drivers/ide/ide-tape.c | |||
@@ -2746,9 +2746,8 @@ static void idetape_setup(ide_drive_t *drive, idetape_tape_t *tape, int minor) | |||
2746 | * Ensure that the number we got makes sense; limit it within | 2746 | * Ensure that the number we got makes sense; limit it within |
2747 | * IDETAPE_DSC_RW_MIN and IDETAPE_DSC_RW_MAX. | 2747 | * IDETAPE_DSC_RW_MIN and IDETAPE_DSC_RW_MAX. |
2748 | */ | 2748 | */ |
2749 | tape->best_dsc_rw_freq = max_t(unsigned long, | 2749 | tape->best_dsc_rw_freq = clamp_t(unsigned long, t, IDETAPE_DSC_RW_MIN, |
2750 | min_t(unsigned long, t, IDETAPE_DSC_RW_MAX), | 2750 | IDETAPE_DSC_RW_MAX); |
2751 | IDETAPE_DSC_RW_MIN); | ||
2752 | printk(KERN_INFO "ide-tape: %s <-> %s: %dKBps, %d*%dkB buffer, " | 2751 | printk(KERN_INFO "ide-tape: %s <-> %s: %dKBps, %d*%dkB buffer, " |
2753 | "%lums tDSC%s\n", | 2752 | "%lums tDSC%s\n", |
2754 | drive->name, tape->name, *(u16 *)&tape->caps[14], | 2753 | drive->name, tape->name, *(u16 *)&tape->caps[14], |