7 echo "Usage: $0 [--no-compile|--ammend] <filename>"
8 echo "You must be at the base of the kernel tree to run this."
14 echo -n "Do you want to fix these issues now? "
16 if ! echo $ans |
grep -iq ^n
; then
28 if ! echo $ans |
grep -qi ^y
; then
37 if [[ "$1" == "--no-compile" ]] ; then
40 elif [[ "$1" == "--ammend" ]] ; then
53 filename
=$
(basename $fullname)
54 oname
=$
(echo ${fullname/.c/.o})
56 MAIL_FILE
=$TMP_DIR/${filename}.msg
59 qc
"Have you handled all the errors properly?"
60 if git
diff $fullname |
grep ^
+ |
grep -qi alloc
; then
61 qc
"Have you freed all your mallocs?"
63 if git
diff $fullname |
grep ^
+ |
grep -qi alloc
; then
64 qc
"Have you check all your mallocs for NULL returns?"
67 if [ "$NO_COMPILE" != "true" ] ; then
68 kchecker
--spammy $fullname
69 kchecker
--sparse --endian $fullname
71 # make C=1 CHECK="scripts/coccicheck" $oname
74 grepmail
$fullname ~
/var
/mail
/sent
* |
grep -i ^subject ||
echo -n ""
77 git log
--oneline $fullname |
head -n 10
78 echo "Copy and paste one of these subjects?"
82 git commit
--signoff $AMEND
84 to_addr
=$
(.
/scripts
/get_maintainer.pl
-f --noroles --norolestats $fullname |
head -n 1)
85 cc_addr
=$
(.
/scripts
/get_maintainer.pl
-f --noroles --norolestats $fullname |
tail -n +2 | \
86 perl
-ne 's/\n$/, /; print')
87 cc_addr
="$cc_addr, kernel-janitors@vger.kernel.org"
89 echo -n "To: " > $MAIL_FILE
90 echo "$to_addr" >> $MAIL_FILE
91 echo -n "CC: " >> $MAIL_FILE
92 echo "$cc_addr" >> $MAIL_FILE
93 echo "X-Mailer: git-send-email haha only kidding" >> $MAIL_FILE
95 git format-patch HEAD^
--stdout >> $MAIL_FILE
97 .
/scripts
/checkpatch.pl
$MAIL_FILE || continue_yn
99 echo "Press ENTER to continue"