scripts/checkpatch: Test if >100 chars per line is easy to review
cover scripts/checkpatch: Test if >100 chars per line is easy to review
Test if this changes are allowed by checkpatch.
Patchew should reply with a simple warning.
Based-on: <[email protected]>
https://www.mail-archive.com/[email protected]/msg758018.html
Philippe Mathieu-Daudé (2):
hw/net: Test line with 342 chars
hw/pci: Test line with 391 chars
include/hw/net/imx_fec.h | 8 +------- include/hw/pci/pcie_regs.h | 17 +---------------- 2 files changed, 2 insertions(+), 23 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/2 hw/net: Test line with 342 chars
Applying using unrestricted checkpatch:
WARNING: line over 100 characters
#16: FILE: include/hw/net/imx_fec.h:118:
This change is not easy to review in gitk.
$ xwininfo -root | egrep "Width|Height"
Width: 1920
Height: 2160--- include/hw/net/imx_fec.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
include/hw/net/imx_fec.h +1 -7
@@ -115,13 +115,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(IMXFECState, IMX_FEC)#define ENET_INT_TXF1 (1 << 3)#define ENET_INT_TXB1 (1 << 2) -#define ENET_INT_MAC (ENET_INT_HB | ENET_INT_BABR | ENET_INT_BABT | \ - ENET_INT_GRA | ENET_INT_TXF | ENET_INT_TXB | \ - ENET_INT_RXF | ENET_INT_RXB | ENET_INT_MII | \ - ENET_INT_EBERR | ENET_INT_LC | ENET_INT_RL | \ - ENET_INT_UN | ENET_INT_PLR | ENET_INT_WAKEUP | \ - ENET_INT_TS_AVAIL | ENET_INT_TXF1 | \ - ENET_INT_TXB1 | ENET_INT_TXF2 | ENET_INT_TXB2) +#define ENET_INT_MAC (ENET_INT_HB | ENET_INT_BABR | ENET_INT_BABT | ENET_INT_GRA | ENET_INT_TXF | ENET_INT_TXB | ENET_INT_RXF | ENET_INT_RXB | ENET_INT_MII | ENET_INT_EBERR | ENET_INT_LC | ENET_INT_RL | ENET_INT_UN | ENET_INT_PLR | ENET_INT_WAKEUP | ENET_INT_TS_AVAIL | ENET_INT_TXF1 | ENET_INT_TXB1 | ENET_INT_TXF2 | ENET_INT_TXB2)/* RDAR */ #define ENET_RDAR_RDAR (1 << 24)
Signature · 1 line
2.26.2
PATCH 2/2 hw/pci: Test line with 391 chars
In reply to Philippe Mathieu-DaudéApplying using unrestricted checkpatch:
WARNING: line over 100 characters
#25: FILE: include/hw/pci/pcie_regs.h:141:
This change is not easy to review with 'git-log -p'.
$ echo ${COLUMNS}x${LINES}
210x52--- include/hw/pci/pcie_regs.h | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-)
include/hw/pci/pcie_regs.h +1 -16
@@ -138,22 +138,7 @@ typedef enum PCIExpLinkWidth { PCI_ERR_ROOT_NONFATAL_RCV | \ PCI_ERR_ROOT_FATAL_RCV) -#define PCI_ERR_UNC_SUPPORTED (PCI_ERR_UNC_DLP | \ - PCI_ERR_UNC_SDN | \ - PCI_ERR_UNC_POISON_TLP | \ - PCI_ERR_UNC_FCP | \ - PCI_ERR_UNC_COMP_TIME | \ - PCI_ERR_UNC_COMP_ABORT | \ - PCI_ERR_UNC_UNX_COMP | \ - PCI_ERR_UNC_RX_OVER | \ - PCI_ERR_UNC_MALF_TLP | \ - PCI_ERR_UNC_ECRC | \ - PCI_ERR_UNC_UNSUP | \ - PCI_ERR_UNC_ACSV | \ - PCI_ERR_UNC_INTN | \ - PCI_ERR_UNC_MCBTLP | \ - PCI_ERR_UNC_ATOP_EBLOCKED | \ - PCI_ERR_UNC_TLP_PRF_BLOCKED) +#define PCI_ERR_UNC_SUPPORTED (PCI_ERR_UNC_DLP | PCI_ERR_UNC_SDN | PCI_ERR_UNC_POISON_TLP | PCI_ERR_UNC_FCP | PCI_ERR_UNC_COMP_TIME | PCI_ERR_UNC_COMP_ABORT | PCI_ERR_UNC_UNX_COMP | PCI_ERR_UNC_RX_OVER | PCI_ERR_UNC_MALF_TLP | PCI_ERR_UNC_ECRC | PCI_ERR_UNC_UNSUP | PCI_ERR_UNC_ACSV | PCI_ERR_UNC_INTN | PCI_ERR_UNC_MCBTLP | PCI_ERR_UNC_ATOP_EBLOCKED | PCI_ERR_UNC_TLP_PRF_BLOCKED)#define PCI_ERR_UNC_SEVERITY_DEFAULT (PCI_ERR_UNC_DLP | \ PCI_ERR_UNC_SDN | \
Signature · 1 line
2.26.2