[U-Boot] [PATCH] mmc and fat bug fixes
Tom Rini
trini at ti.com
Thu May 16 01:07:06 CEST 2013
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/15/2013 11:37 AM, Benoît Thébaudeau wrote:
> Hi Ruud,
>
> On Wednesday, May 15, 2013 4:23:51 PM, Ruud Commandeur wrote:
>> This patch fixes a number of mmc and fat-related bugs:
[snip]
>> @@ -901,7 +902,8 @@ }
>>
>> curclust = get_fatent_value(mydata, dir_curclust); - if
>> ((curclust >= 0xffffff8) || (curclust >= 0xfff8)) { + if
>> (((curclust >= 0xffffff8) && (mydata->fatsize == 32)) || +
>> ((curclust >= 0xfff8) && (mydata->fatsize == 16))) {
>> empty_dentptr = dentptr; return NULL; }
>>
>
> These 2 hunks are correct, but please remove the parentheses
> around the "==" expressions: They make the code less readable. And
> add another tab to indent the 2nd line of the if-s so that it is
> more indented than the if block contents.
With regards to style, checkpatch.pl wins (so please use it on your
patch, git format-patch -n1 ; ./tools/checkpatch.pl
./0001-what-git-said-it-called-it) and it should be:
if ((one big test) ||
(second test)) {
<tab>... code ...
}
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJRlBUZAAoJENk4IS6UOR1WGLUQAK1zwb+enZWBQ0j1HXeQUiMx
mnErR6WKBqg7Tt5ya72abdE5tGmulS6QThrT1uXP98u/qUfiEBEDHb5MRy8cRdL8
LKvplOFVkl9iZXbHqD9/u5FUT9A2t/L0nMEYBG8akCIaxqOPLSgB5U7NbkJohrGE
2jhFN1cLXKFkRujstEjefDw720sIBesWXeLLKIzHG8YujxdRkYGr5bi3iHMNSG90
nOIkf7+umd72QqFVs7Sq2xCmNLzntsx1m76DkX0fJ0ReAlkoBfWEvkTKjmr+ANPz
ksualH7u2PWz53h021iVA+b2SZtWhHj5GgqhShFKoqKyyjUyktn/4J9qan0rDp88
6+p3H5bpYfBhOWGzb9lkX+krc1F7ViJO4CABWNZO/ux4Sg+cdpKsFwyVJfSzh1wd
jViZg0oq+qMT5u+XEFY1QAivP0rcL3wiVQ+YUXOfAqjx1zik3EMl0f6FO/71AGnm
SlYGm39dhTyU5kEruCJBVWk97eEh8ETVLIZ/giaEi6HVsw/uv8yElLq4KtdxC7P0
pnNmR+wGnzifJiCYFDgIRKvpFaUCgqfxb6ac717PL7XDb5d3TMfWdfgR4FKMDK7b
GWTiEnA3hLUWUGCdwYflH1JqzJxzXRQBP3Gc7QOqKtHSEcQ1Hc3tlm4kAKvAfF0k
ys0ayHOizfdTTjE2JlPS
=QJxA
-----END PGP SIGNATURE-----
More information about the U-Boot
mailing list