On 08/06, Dan Carpenter wrote: > 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. True, thanks for hint. Definitely something to look into in the future. > 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 */ > _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel