Staging: gasket: apex_driver: fixed a line over 80 characters coding style issue
Subsystems (2)
PATCH 1/1 Staging: gasket: apex_driver: fixed a line over 80 characters coding style issue
Fixed four lines of code that were over 80 characters long.
Signed-off-by Samuil Ivanov <[email protected]>
--- drivers/staging/gasket/apex_driver.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/gasket/apex_driver.c +5 -5
@@ -263,8 +263,8 @@ static int apex_enter_reset(struct gasket_dev *gasket_dev)* - Enable GCB idle */ gasket_read_modify_write_64 (gasket_dev,APEX_BAR_INDEX , -APEX_BAR2_REG_IDLEGENERATOR_IDLEGEN_IDLEREGISTER , -0x0 ,1 ,32 ); +APEX_BAR2_REG_IDLEGENERATOR_IDLEGEN_IDLEREGISTER , +0x0 ,1 ,32 );/* - Initiate DMA pause */ gasket_dev_write_64(gasket_dev, 1, APEX_BAR_INDEX,
@@ -399,7 +399,7 @@ static int apex_device_cleanup(struct gasket_dev *gasket_dev) hib_error =gasket_dev_read_64 (gasket_dev,APEX_BAR_INDEX ,APEX_BAR2_REG_USER_HIB_ERROR_STATUS ); scalar_error =gasket_dev_read_64 (gasket_dev,APEX_BAR_INDEX , -APEX_BAR2_REG_SCALAR_CORE_ERROR_STATUS ); +APEX_BAR2_REG_SCALAR_CORE_ERROR_STATUS ); dev_dbg(gasket_dev->dev, "%s 0x%p hib_error 0x%llx scalar_error 0x%llx\n",
@@ -606,10 +606,10 @@ static int apex_pci_probe(struct pci_dev *pci_dev,while (retries <APEX_RESET_RETRY ) { page_table_ready =gasket_dev_read_64 (gasket_dev,APEX_BAR_INDEX , -APEX_BAR2_REG_KERNEL_HIB_PAGE_TABLE_INIT ); +APEX_BAR2_REG_KERNEL_HIB_PAGE_TABLE_INIT ); msix_table_ready =gasket_dev_read_64 (gasket_dev,APEX_BAR_INDEX , -APEX_BAR2_REG_KERNEL_HIB_MSIX_TABLE_INIT ); +APEX_BAR2_REG_KERNEL_HIB_MSIX_TABLE_INIT );if (page_table_ready && msix_table_ready)break ;schedule_timeout (msecs_to_jiffies (APEX_RESET_DELAY ));
Signature · 1 line
2.17.1
Joe Perches
maintainerQuoted 1 line · Samuil Ivanov
Fixed four lines of code that were over 80 characters long.
Some of the 80 column messages that checkpatch emits should be ignored. These are some of them because each of these lines is a single very long name (48 chars!) identifier.
Perhaps checkpatch should not warn on these
drivers/staging/gasket/apex_driver.c
Quoted 1 line
drivers/staging/gasket/apex_driver.c +0
-0
[]
drivers/staging/gasket/apex_driver.c static int apex_enter_reset(struct gasket_dev *gasket_dev) · line 267
Quoted 8 lines
drivers/staging/gasket/apex_driver.c +2
-2@@ -263,8 +263,8 @@ static int apex_enter_reset(struct gasket_dev *gasket_dev)* - Enable GCB idle */ gasket_read_modify_write_64 (gasket_dev,APEX_BAR_INDEX , -APEX_BAR2_REG_IDLEGENERATOR_IDLEGEN_IDLEREGISTER , -0x0 ,1 ,32 ); +APEX_BAR2_REG_IDLEGENERATOR_IDLEGEN_IDLEREGISTER , +0x0 ,1 ,32 );
Maybe add a checkpatch test for this and allow ignoring single identifier lines using LONG_LINE_IDENT
---
o Add a couple missing semicolons too.
scripts/checkpatch.pl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
scripts/checkpatch.pl +9 -4
@@ -3140,13 +3140,14 @@ sub process { # # There are a few types of lines that may extend beyond $max_line_length: # logging functions like pr_info that end in a string -# lines with a single string +# lines with a single string or identifier # #defines that are a single string # lines with an RFC3986 like URL # -# There are 3 different line length message types: +# There are 4 different line length message types: # LONG_LINE_COMMENT a comment starts before but extends beyond $max_line_length # LONG_LINE_STRING a string starts before but extends beyond $max_line_length +# LONG_LINE_IDENT a single identifier starts before but extends beyond $max_line_length # LONG_LINE all other lines longer than $max_line_length # # if LONG_LINE is ignored, the other 2 types are also ignored
@@ -3183,12 +3184,16 @@ sub process { # a comment starts before $max_line_length } elsif ($line =~ /($;[\s$;]*)$/ && length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) { - $msg_type = "LONG_LINE_COMMENT" + $msg_type = "LONG_LINE_COMMENT"; # a quoted string starts before $max_line_length } elsif ($sline =~ /\s*($String(?:\s*(?:\\|,\s*|\)\s*;\s*))?)$/ && length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) { - $msg_type = "LONG_LINE_STRING" + $msg_type = "LONG_LINE_STRING"; + # a single identifier starts before $max_line_length + } elsif ($sline =~ /^.\s*($Ident(?:\\|,\s*|\)\s*;\s*))?$/ && + length(expand_tabs(substr($line, 1, length($line) - length($1) - 1))) <= $max_line_length) { + $msg_type = "LONG_LINE_IDENT"; } if ($msg_type ne "" &&