* [dpdk-test-report] |WARNING| pw35257 [PATCH 79/80] net/sfc/base: add signed image layout support
[not found] <1519112078-20113-80-git-send-email-arybchenko@solarflare.com>
@ 2018-02-20 7:43 ` checkpatch
0 siblings, 0 replies; only message in thread
From: checkpatch @ 2018-02-20 7:43 UTC (permalink / raw)
To: test-report; +Cc: Andrew Rybchenko
Test-Label: checkpatch
Test-Status: WARNING
http://dpdk.org/patch/35257
_coding style issues_
CHECK:CAMELCASE: Avoid CamelCase: <__checkReturn>
#61: FILE: drivers/net/sfc/base/ef10_image.c:43:
+static __checkReturn efx_rc_t
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#105: FILE: drivers/net/sfc/base/ef10_image.c:87:
+ if (nbytes > sizeof (uint32_t)) {
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#141: FILE: drivers/net/sfc/base/ef10_image.c:123:
+ return (rc);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#172: FILE: drivers/net/sfc/base/ef10_image.c:154:
+ return (0);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#181: FILE: drivers/net/sfc/base/ef10_image.c:163:
+ return (rc);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#219: FILE: drivers/net/sfc/base/ef10_image.c:201:
+ return (0);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#230: FILE: drivers/net/sfc/base/ef10_image.c:212:
+ return (rc);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#254: FILE: drivers/net/sfc/base/ef10_image.c:236:
+ return (0);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#261: FILE: drivers/net/sfc/base/ef10_image.c:243:
+ return (rc);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#287: FILE: drivers/net/sfc/base/ef10_image.c:269:
+ return (0);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#294: FILE: drivers/net/sfc/base/ef10_image.c:276:
+ return (rc);
CHECK:CAMELCASE: Avoid CamelCase: <PKCS7_SignedData>
#303: FILE: drivers/net/sfc/base/ef10_image.c:285:
+static const uint8_t PKCS7_SignedData[] =
ERROR:OPEN_BRACE: that open brace { should be on the previous line
#304: FILE: drivers/net/sfc/base/ef10_image.c:286:
+static const uint8_t PKCS7_SignedData[] =
+{ 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x02 };
CHECK:CAMELCASE: Avoid CamelCase: <PKCS7_Data>
#307: FILE: drivers/net/sfc/base/ef10_image.c:289:
+static const uint8_t PKCS7_Data[] =
ERROR:OPEN_BRACE: that open brace { should be on the previous line
#308: FILE: drivers/net/sfc/base/ef10_image.c:290:
+static const uint8_t PKCS7_Data[] =
+{ 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x07, 0x01 };
CHECK:CAMELCASE: Avoid CamelCase: <SignedData_Version>
#311: FILE: drivers/net/sfc/base/ef10_image.c:293:
+static const uint8_t SignedData_Version[] =
ERROR:OPEN_BRACE: that open brace { should be on the previous line
#312: FILE: drivers/net/sfc/base/ef10_image.c:294:
+static const uint8_t SignedData_Version[] =
+{ 0x03 };
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#346: FILE: drivers/net/sfc/base/ef10_image.c:328:
+ PKCS7_SignedData, sizeof (PKCS7_SignedData));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#362: FILE: drivers/net/sfc/base/ef10_image.c:344:
+ SignedData_Version, sizeof (SignedData_Version));
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#378: FILE: drivers/net/sfc/base/ef10_image.c:360:
+ PKCS7_Data, sizeof (PKCS7_Data));
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'valp == NULL'
#398: FILE: drivers/net/sfc/base/ef10_image.c:380:
+ if ((valp == NULL) || (val_size == 0)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'val_size == 0'
#398: FILE: drivers/net/sfc/base/ef10_image.c:380:
+ if ((valp == NULL) || (val_size == 0)) {
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#414: FILE: drivers/net/sfc/base/ef10_image.c:396:
+ return (0);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#445: FILE: drivers/net/sfc/base/ef10_image.c:427:
+ return (rc);
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#458: FILE: drivers/net/sfc/base/ef10_image.c:440:
+ EFX_STATIC_ASSERT(sizeof (*header) == EFX_IMAGE_HEADER_SIZE);
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#459: FILE: drivers/net/sfc/base/ef10_image.c:441:
+ EFX_STATIC_ASSERT(sizeof (*trailer) == EFX_IMAGE_TRAILER_SIZE);
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'header->eih_size'
#462: FILE: drivers/net/sfc/base/ef10_image.c:444:
+ if (buffer_size < (EFX_FIELD_OFFSET(efx_image_header_t, eih_size) +
+ sizeof (header->eih_size))) {
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#463: FILE: drivers/net/sfc/base/ef10_image.c:445:
+ sizeof (header->eih_size))) {
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#515: FILE: drivers/net/sfc/base/ef10_image.c:497:
+ return (rc);
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#536: FILE: drivers/net/sfc/base/ef10_image.c:518:
+ memset(infop, 0, sizeof (*infop));
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#578: FILE: drivers/net/sfc/base/ef10_image.c:560:
+ return (0);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#593: FILE: drivers/net/sfc/base/ef10_image.c:575:
+ return (rc);
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'bufferp == NULL'
#613: FILE: drivers/net/sfc/base/ef10_image.c:595:
+ if ((bufferp == NULL) || (buffer_size == 0) ||
+ (infop == NULL) || (headerpp == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'buffer_size == 0'
#613: FILE: drivers/net/sfc/base/ef10_image.c:595:
+ if ((bufferp == NULL) || (buffer_size == 0) ||
+ (infop == NULL) || (headerpp == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'infop == NULL'
#613: FILE: drivers/net/sfc/base/ef10_image.c:595:
+ if ((bufferp == NULL) || (buffer_size == 0) ||
+ (infop == NULL) || (headerpp == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'headerpp == NULL'
#613: FILE: drivers/net/sfc/base/ef10_image.c:595:
+ if ((bufferp == NULL) || (buffer_size == 0) ||
+ (infop == NULL) || (headerpp == NULL)) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'infop->eii_format != EFX_IMAGE_FORMAT_SIGNED'
#619: FILE: drivers/net/sfc/base/ef10_image.c:601:
+ if ((infop->eii_format != EFX_IMAGE_FORMAT_SIGNED) ||
+ (infop->eii_imagep == NULL) ||
+ (infop->eii_headerp == NULL) ||
+ ((uint8_t *)infop->eii_headerp < (uint8_t *)infop->eii_imagep) ||
+ (infop->eii_image_size < EFX_IMAGE_HEADER_SIZE) ||
+ ((size_t)((uint8_t *)infop->eii_headerp - infop->eii_imagep) >
+ (infop->eii_image_size - EFX_IMAGE_HEADER_SIZE))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'infop->eii_imagep == NULL'
#619: FILE: drivers/net/sfc/base/ef10_image.c:601:
+ if ((infop->eii_format != EFX_IMAGE_FORMAT_SIGNED) ||
+ (infop->eii_imagep == NULL) ||
+ (infop->eii_headerp == NULL) ||
+ ((uint8_t *)infop->eii_headerp < (uint8_t *)infop->eii_imagep) ||
+ (infop->eii_image_size < EFX_IMAGE_HEADER_SIZE) ||
+ ((size_t)((uint8_t *)infop->eii_headerp - infop->eii_imagep) >
+ (infop->eii_image_size - EFX_IMAGE_HEADER_SIZE))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'infop->eii_headerp == NULL'
#619: FILE: drivers/net/sfc/base/ef10_image.c:601:
+ if ((infop->eii_format != EFX_IMAGE_FORMAT_SIGNED) ||
+ (infop->eii_imagep == NULL) ||
+ (infop->eii_headerp == NULL) ||
+ ((uint8_t *)infop->eii_headerp < (uint8_t *)infop->eii_imagep) ||
+ (infop->eii_image_size < EFX_IMAGE_HEADER_SIZE) ||
+ ((size_t)((uint8_t *)infop->eii_headerp - infop->eii_imagep) >
+ (infop->eii_image_size - EFX_IMAGE_HEADER_SIZE))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'infop->eii_image_size < EFX_IMAGE_HEADER_SIZE'
#619: FILE: drivers/net/sfc/base/ef10_image.c:601:
+ if ((infop->eii_format != EFX_IMAGE_FORMAT_SIGNED) ||
+ (infop->eii_imagep == NULL) ||
+ (infop->eii_headerp == NULL) ||
+ ((uint8_t *)infop->eii_headerp < (uint8_t *)infop->eii_imagep) ||
+ (infop->eii_image_size < EFX_IMAGE_HEADER_SIZE) ||
+ ((size_t)((uint8_t *)infop->eii_headerp - infop->eii_imagep) >
+ (infop->eii_image_size - EFX_IMAGE_HEADER_SIZE))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'cms_header.size > buffer_size'
#635: FILE: drivers/net/sfc/base/ef10_image.c:617:
+ if ((cms_header.size > buffer_size) ||
+ (cms_header.offset > (buffer_size - cms_header.size))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'image_header.size > buffer_size'
#643: FILE: drivers/net/sfc/base/ef10_image.c:625:
+ if ((image_header.size > buffer_size) ||
+ (image_header.offset > (buffer_size - image_header.size))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'code.size > buffer_size'
#651: FILE: drivers/net/sfc/base/ef10_image.c:633:
+ if ((code.size > buffer_size) ||
+ (code.offset > (buffer_size - code.size))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'image_trailer.size > buffer_size'
#659: FILE: drivers/net/sfc/base/ef10_image.c:641:
+ if ((image_trailer.size > buffer_size) ||
+ (image_trailer.offset > (buffer_size - image_trailer.size))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'signature.size > buffer_size'
#667: FILE: drivers/net/sfc/base/ef10_image.c:649:
+ if ((signature.size > buffer_size) ||
+ (signature.offset > (buffer_size - signature.size))) {
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#727: FILE: drivers/net/sfc/base/ef10_image.c:709:
+ EFX_STATIC_ASSERT(sizeof (chunk_hdr) == SIGNED_IMAGE_CHUNK_HDR_LEN);
WARNING:SPACING: space prohibited between function name and open parenthesis '('
#745: FILE: drivers/net/sfc/base/ef10_image.c:727:
+ memcpy(bufferp + hdr_offset, &chunk_hdr, sizeof (chunk_hdr));
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'chunk_hdr.len > buffer_size'
#747: FILE: drivers/net/sfc/base/ef10_image.c:729:
+ if ((chunk_hdr.len > buffer_size) ||
+ (chunk_hdr.offset > (buffer_size - chunk_hdr.len))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'chunk_hdr.len > buffer_size'
#772: FILE: drivers/net/sfc/base/ef10_image.c:754:
+ if ((chunk_hdr.len > buffer_size) ||
+ (chunk_hdr.offset > (buffer_size - chunk_hdr.len))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'chunk_hdr.len > buffer_size'
#799: FILE: drivers/net/sfc/base/ef10_image.c:781:
+ if ((chunk_hdr.len > buffer_size) ||
+ (chunk_hdr.offset > (buffer_size - chunk_hdr.len))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'chunk_hdr.len > buffer_size'
#825: FILE: drivers/net/sfc/base/ef10_image.c:807:
+ if ((chunk_hdr.len > buffer_size) ||
+ (chunk_hdr.offset > (buffer_size - chunk_hdr.len))) {
CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'chunk_hdr.len > buffer_size'
#850: FILE: drivers/net/sfc/base/ef10_image.c:832:
+ if ((chunk_hdr.len > buffer_size) ||
+ (chunk_hdr.offset > (buffer_size - chunk_hdr.len))) {
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#859: FILE: drivers/net/sfc/base/ef10_image.c:841:
+ return (0);
ERROR:RETURN_PARENTHESES: return is not a function, parentheses are not required
#896: FILE: drivers/net/sfc/base/ef10_image.c:878:
+ return (rc);
ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#975: FILE: drivers/net/sfc/base/efx.h:1636:
+ uint8_t * eii_imagep;
ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar"
#977: FILE: drivers/net/sfc/base/efx.h:1638:
+ efx_image_header_t * eii_headerp;
total: 21 errors, 10 warnings, 25 checks, 965 lines checked
^ permalink raw reply [flat|nested] only message in thread