Re: [patch 15/17] drivers/scsi: Use DIV_ROUND_UP

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

 



On Mon, Sep 22, 2008 at 02:56:51PM -0700, akpm@xxxxxxxxxxxxxxxxxxxx wrote:
>  
>  		one_clock = esp->ccycle / 1000;
>  		rounded_up = (period << 2);
> -		rounded_up = (rounded_up + one_clock - 1) / one_clock;
> +		rounded_up = DIV_ROUND_UP(rounded_up, one_clock);
>  		stp = rounded_up;
>  		if (stp && esp->rev >= FAS236) {
>  			if (stp >= 50)

Is this not exactly equivalent to:

		one_clock = esp->ccycle / 1000;
		stp = DIV_ROUND_UP(period << 2, one_clock);

(rounded_up is local to this if condition).

-- 
Matthew Wilcox				Intel Open Source Technology Centre
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."
--
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