qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Adding support for MAC filtering in the FEC IP implementatio


From: no-reply
Subject: Re: [PATCH] Adding support for MAC filtering in the FEC IP implementation.
Date: Sat, 7 Dec 2019 13:08:02 -0800 (PST)

Patchew URL: https://patchew.org/QEMU/address@hidden/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PATCH] Adding support for MAC filtering in the FEC IP implementation.
Type: series
Message-id: address@hidden

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
19de63d Adding support for MAC filtering in the FEC IP implementation.

=== OUTPUT BEGIN ===
ERROR: space prohibited before that '--' (ctx:WxB)
#37: FILE: hw/net/imx_fec.c:430:
+    while (mac_length --) {
                       ^

WARNING: Block comments use a leading /* on a separate line
#44: FILE: hw/net/imx_fec.c:437:
+    /* only upper 6 bits (FEC_HASH_BITS) are used

ERROR: return is not a function, parentheses are not required
#47: FILE: hw/net/imx_fec.c:440:
+    return ((crc >> (32 - FEC_HASH_BITS)) & 0x3f);

ERROR: line over 90 characters
#62: FILE: hw/net/imx_fec.c:455:
+        return (FEC_RX_PROMISCUOUS_ACCEPT); /* Accept all packets in 
promiscuous mode (even if bc_rej is set). */

ERROR: return is not a function, parentheses are not required
#69: FILE: hw/net/imx_fec.c:462:
+            return (FEC_RX_REJECT);

WARNING: line over 80 characters
#71: FILE: hw/net/imx_fec.c:464:
+        return (FEC_RX_BROADCAST_ACCEPT); /* Accept packets from broadcast 
address. */

WARNING: line over 80 characters
#79: FILE: hw/net/imx_fec.c:472:
+        /* See if the computed hash matches a set bit in either GAUR / GALR 
register. */

ERROR: spaces required around that '-' (ctx:VxV)
#81: FILE: hw/net/imx_fec.c:474:
+                || ((hash > 31) && (s->regs[ENET_GAUR] & (1 << (hash-32))))) {
                                                                     ^

ERROR: line over 90 characters
#82: FILE: hw/net/imx_fec.c:475:
+            return (FEC_RX_MULTICAST_HASH_ACCEPT); /* Accept multicast hash 
enabled address. */

WARNING: line over 80 characters
#85: FILE: hw/net/imx_fec.c:478:
+        /* See if the computed hash matches a set bit in either IAUR / IALR 
register. */

ERROR: spaces required around that '-' (ctx:VxV)
#87: FILE: hw/net/imx_fec.c:480:
+                || ((hash > 31) && (s->regs[ENET_IAUR] & (1 << (hash-32))))) {
                                                                     ^

ERROR: line over 90 characters
#88: FILE: hw/net/imx_fec.c:481:
+            return (FEC_RX_UNICAST_HASH_ACCEPT); /* Accept multicast hash 
enabled address. */

ERROR: line over 90 characters
#95: FILE: hw/net/imx_fec.c:488:
+    if (!(memcmp(packet, (uint8_t *) &addr1, 4) || memcmp(packet+4, (uint8_t 
*) &addr2, 2))) {

ERROR: spaces required around that '+' (ctx:VxV)
#95: FILE: hw/net/imx_fec.c:488:
+    if (!(memcmp(packet, (uint8_t *) &addr1, 4) || memcmp(packet+4, (uint8_t 
*) &addr2, 2))) {
                                                                 ^

ERROR: line over 90 characters
#96: FILE: hw/net/imx_fec.c:489:
+        return (FEC_RX_UNICAST_ACCEPT); /* Accept packet because it matches my 
unicast address. */

ERROR: return is not a function, parentheses are not required
#100: FILE: hw/net/imx_fec.c:493:
+    return (FEC_RX_REJECT);

ERROR: that open brace { should be on the previous line
#124: FILE: hw/net/imx_fec.c:1148:
+    if (maf == FEC_RX_REJECT)
+    {

ERROR: return is not a function, parentheses are not required
#126: FILE: hw/net/imx_fec.c:1150:
+        return (FEC_RX_REJECT);

ERROR: line over 90 characters
#139: FILE: hw/net/imx_fec.c:1221:
+            bd.flags |= ENET_BD_BC; /* The packet is destined for the 
"broadcast" address. */

ERROR: line over 90 characters
#141: FILE: hw/net/imx_fec.c:1223:
+            bd.flags |= ENET_BD_MC; /* The packet is destined for a 
"multicast" address. */

ERROR: that open brace { should be on the previous line
#156: FILE: hw/net/imx_fec.c:1257:
+    if (maf == FEC_RX_REJECT)
+    {

ERROR: return is not a function, parentheses are not required
#158: FILE: hw/net/imx_fec.c:1259:
+        return (FEC_RX_REJECT);

ERROR: line over 90 characters
#171: FILE: hw/net/imx_fec.c:1358:
+            bd.flags |= ENET_BD_BC; /* The packet is destined for the 
"broadcast" address. */

ERROR: line over 90 characters
#173: FILE: hw/net/imx_fec.c:1360:
+            bd.flags |= ENET_BD_MC; /* The packet is destined for a 
"multicast" address. */

total: 20 errors, 4 warnings, 164 lines checked

Commit 19de63da8cde (Adding support for MAC filtering in the FEC IP 
implementation.) has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/address@hidden/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]