* [PATCH] Staging: gasket: apex_driver: fixed a line over 80 characters coding style issue
@ 2019-10-20 17:50 Samuil Ivanov
2019-10-20 18:39 ` Joe Perches
0 siblings, 1 reply; 2+ messages in thread
From: Samuil Ivanov @ 2019-10-20 17:50 UTC (permalink / raw)
To: gregkh; +Cc: devel, linux-kernel, Samuil Ivanov
Fixed four lines of code that were over 80 characters long.
Signed-off-by: Samuil Ivanov <samuil.ivanovbg@gmail.com>
---
drivers/staging/gasket/apex_driver.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
index 46199c8ca441..f729ecd6363b 100644
--- a/drivers/staging/gasket/apex_driver.c
+++ b/drivers/staging/gasket/apex_driver.c
@@ -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));
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] Staging: gasket: apex_driver: fixed a line over 80 characters coding style issue
2019-10-20 17:50 [PATCH] Staging: gasket: apex_driver: fixed a line over 80 characters coding style issue Samuil Ivanov
@ 2019-10-20 18:39 ` Joe Perches
0 siblings, 0 replies; 2+ messages in thread
From: Joe Perches @ 2019-10-20 18:39 UTC (permalink / raw)
To: Samuil Ivanov, gregkh; +Cc: devel, linux-kernel, Andrew Morton, Dan Carpenter
dOn Sun, 2019-10-20 at 20:50 +0300, Samuil Ivanov wrote:
> 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
> diff --git a/drivers/staging/gasket/apex_driver.c b/drivers/staging/gasket/apex_driver.c
[]
> @@ -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(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a85d719df1f4..cdce58be4f66 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -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 "" &&
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-20 18:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-20 17:50 [PATCH] Staging: gasket: apex_driver: fixed a line over 80 characters coding style issue Samuil Ivanov
2019-10-20 18:39 ` Joe Perches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®