[PATCH 3/5] staging: dgnc: Fix that open brace { should be on the previous line
Dan Carpenter
dan.carpenter at oracle.com
Wed Aug 6 20:28:27 UTC 2014
On Wed, Aug 06, 2014 at 09:01:24PM +0200, Konrad Zapalowicz wrote:
> @@ -1935,8 +1935,8 @@ static void neo_vpd(struct dgnc_board *brd)
>
> if (((brd->vpd[0x08] != 0x82) /* long resource name tag */
> && (brd->vpd[0x10] != 0x82)) /* long resource name tag (PCI-66 files)*/
> - || (brd->vpd[0x7F] != 0x78)) /* small resource end tag */
> - {
> + || (brd->vpd[0x7F] != 0x78)) { /* small resource end tag */
> +
This condition should really be written like this:
if ((brd->vpd[0x08] != 0x82 && /* long resource name tag */
brd->vpd[0x10] != 0x82) || /* (PCI-66 files) */
brd->vpd[0x7F] != 0x78) { /* small resource end tag */
Except that the magical numbers should be defines and then we could
remove the comments.
This stuff could be changed in a later patch, no worries.
TODO-list: 2014-08-06: dgnc: Too many magic numbers
regards,
dan carpenter
> memset(brd->vpd, '\0', NEO_VPD_IMAGESIZE);
> } else {
> /* Search for the serial number */
More information about the devel
mailing list