From: Harvey Harrison Date: Tue, 15 Jul 2008 19:21:41 +0000 (+0200) Subject: ide-tape: use clamp_t() rather than nested min_t()/max_t() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a792bd5a407872714942f50bf24083874ce03745;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git ide-tape: use clamp_t() rather than nested min_t()/max_t() Signed-off-by: Harvey Harrison Signed-off-by: Andrew Morton Signed-off-by: Bartlomiej Zolnierkiewicz --- 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) * Ensure that the number we got makes sense; limit it within * IDETAPE_DSC_RW_MIN and IDETAPE_DSC_RW_MAX. */ - tape->best_dsc_rw_freq = max_t(unsigned long, - min_t(unsigned long, t, IDETAPE_DSC_RW_MAX), - IDETAPE_DSC_RW_MIN); + tape->best_dsc_rw_freq = clamp_t(unsigned long, t, IDETAPE_DSC_RW_MIN, + IDETAPE_DSC_RW_MAX); printk(KERN_INFO "ide-tape: %s <-> %s: %dKBps, %d*%dkB buffer, " "%lums tDSC%s\n", drive->name, tape->name, *(u16 *)&tape->caps[14],