7 echo "Usage: $0 <filename>"
8 echo "You must be at the base of the kernel tree to run this."
14 name
=$
(mutt
-Q realname | cut
-d '"' -f 2)
15 [ "$name" = "" ] && name
="Your Name"
16 email
=$
(mutt
-Q from | cut
-d '"' -f 2)
17 [ "$email" = "" ] && email
="address@example.com"
18 echo "Signed-off-by: $name <${email}>"
23 echo -n "Do you want to fix these check patch errors now? "
25 if ! echo $ans |
grep -iq ^n
; then
37 if ! echo $ans |
grep -qi ^y
; then
49 filename
=$
(basename $fullname)
51 DIFF_FILE
=$TMP_DIR/${filename}.
diff
52 MAIL_FILE
=$TMP_DIR/${filename}.msg
55 qc
"Have you handled all the errors properly?"
56 if git
diff $fullname |
grep ^
+ |
grep -qi alloc
; then
57 qc
"Have you freed all your mallocs?"
59 if git
diff $fullname |
grep ^
+ |
grep -qi alloc
; then
60 qc
"Have you check all your mallocs for NULL returns?"
63 kchecker
--spammy $fullname
64 kchecker
--sparse $fullname
65 echo "Press ENTER to continue"
68 to_addr
=$
(.
/scripts
/get_maintainer.pl
-f $fullname |
head -n 1)
69 cc_addr
=$
(.
/scripts
/get_maintainer.pl
-f $fullname |
tail -n +2 | \
70 perl
-ne 's/\n$/, /; print')
71 cc_addr
="$cc_addr, kernel-janitors@vger.kernel.org"
73 echo -n "To: " > $MAIL_FILE
74 echo "$to_addr" >> $MAIL_FILE
75 echo -n "CC: " >> $MAIL_FILE
76 echo "$cc_addr" >> $MAIL_FILE
79 echo "$MY_SIGNOFF" >> $DIFF_FILE
82 git
diff $fullname |
tee -a $DIFF_FILE
84 .
/scripts
/checkpatch.pl
$DIFF_FILE || continue_yn
86 echo "Press ENTER to continue"
89 cat $DIFF_FILE >> $MAIL_FILE