public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix a argument WARN bug of scripts/checkpatch.pl
@ 2011-07-28  7:14 gmail
  2011-07-31  0:44 ` Hillf Danton
  2011-08-01 12:09 ` Hui Zhu
  0 siblings, 2 replies; 7+ messages in thread
From: gmail @ 2011-07-28  7:14 UTC (permalink / raw)
  To: Andy Whitcroft, linux-kernel

Sorry the prev patch have the format error.  So I re-send it.

Get following error with a patch that have min_t error:
Use of uninitialized value in concatenation (.) or string at
scripts/checkpatch.pl line 1256.
WARNING:
This is because:
				}
				WARN("$call() should probably be ${call}_t($cast, $arg1, $arg2)\n" . $herecurr);
			}
It lost the first argument.
So make a patch to fix it.

Signed-off-by: Hui Zhu <teawater@gmail.com>
---
 scripts/checkpatch.pl |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2574,7 +2574,8 @@ sub process {
 				} else {
 					$cast = $cast2;
 				}
-				WARN("$call() should probably be ${call}_t($cast, $arg1, $arg2)\n" . $herecurr);
+				WARN("MINMAX",
+				     "$call() should probably be ${call}_t($cast, $arg1, $arg2)\n" . $herecurr);
 			}
 		}
 

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH] Fix a argument WARN bug of scripts/checkpatch.pl
@ 2011-08-03  2:36 Hui Zhu
  0 siblings, 0 replies; 7+ messages in thread
From: Hui Zhu @ 2011-08-03  2:36 UTC (permalink / raw)
  To: Andrew Morton, "Joe Perches joe"; +Cc: Andy Whitcroft, linux-kernel

Hi Joe,

Thanks for your help.

Best,
Hui

The following part is the original patch:

Get following error with a patch that have min_t error:
Use of uninitialized value in concatenation (.) or string at
scripts/checkpatch.pl line 1256.
WARNING:
This is because:
				}
				WARN("$call() should probably be ${call}_t($cast, $arg1, $arg2)\n" . $herecurr);
			}
It lost the first argument.
So make a patch to fix it.

Signed-off-by: Hui Zhu <teawater@gmail.com>
Acked-by: Joe Perches <joe@perches.com>
---
 scripts/checkpatch.pl |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2574,7 +2574,8 @@ sub process {
 				} else {
 					$cast = $cast2;
 				}
-				WARN("$call() should probably be ${call}_t($cast, $arg1, $arg2)\n" . $herecurr);
+				WARN("MINMAX",
+				     "$call() should probably be ${call}_t($cast, $arg1, $arg2)\n" . $herecurr);
 			}
 		}

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH] Fix a argument WARN bug of scripts/checkpatch.pl
@ 2011-07-28  6:56 Hui Zhu
  0 siblings, 0 replies; 7+ messages in thread
From: Hui Zhu @ 2011-07-28  6:56 UTC (permalink / raw)
  To: Andy Whitcroft, linux-kernel

Get following error with a patch that have min_t error:
Use of uninitialized value in concatenation (.) or string at
scripts/checkpatch.pl line 1256.
WARNING:
This is because:
				}
				WARN("$call() should probably be ${call}_t($cast, $arg1, $arg2)\n"
. $herecurr);
			}
It lost the first argument.
So make a patch to fix it.

Signed-off-by: Hui Zhu <teawater@gmail.com>
---
 scripts/checkpatch.pl |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2574,7 +2574,8 @@ sub process {
 				} else {
 					$cast = $cast2;
 				}
-				WARN("$call() should probably be ${call}_t($cast, $arg1,
$arg2)\n" . $herecurr);
+				WARN("MINMAX",
+				     "$call() should probably be ${call}_t($cast, $arg1,
$arg2)\n" . $herecurr);
 			}
 		}

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-08-03  2:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28  7:14 [PATCH] Fix a argument WARN bug of scripts/checkpatch.pl gmail
2011-07-31  0:44 ` Hillf Danton
2011-07-31 15:23   ` Hui Zhu
2011-08-01 12:09 ` Hui Zhu
2011-08-01 15:15   ` Joe Perches
  -- strict thread matches above, loose matches on Subject: below --
2011-08-03  2:36 Hui Zhu
2011-07-28  6:56 Hui Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox