On Tue, 28 June 2005 14:01:59 +0200, Christoph Hellwig wrote:
>
> adjust to kernel style and remove some unneeded NULL checks
Cool!
> rc = __inode_direct_access(inode, sector, &data);
> - if (rc)
> - return rc;
> - clear_page((void*)data);
> - return 0;
> + if (!rc)
> + clear_page(data);
> + return rc;
I personally prefer the original code. As a general rule, error
handling code is indented further than regular good-case code. That
makes reading a *lot* faster and the compiler should be smart enough
to generate identical code.
What are your arguments for the change?
> - (mapping->host,tmp.b_blocknr*(PAGE_SIZE/512) ,&data);
> + (mapping->host,tmp.b_blocknr * (PAGE_SIZE/512), &data);
^
You missed one.
Jörn
--
Fancy algorithms are slow when n is small, and n is usually small.
Fancy algorithms have big constants. Until you know that n is
frequently going to be big, don't get fancy.
-- Rob Pike
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]