* linux-next: Fixes tag needs some work in the sound-current tree
@ 2021-06-02 7:09 Stephen Rothwell
2021-06-02 7:13 ` Dongliang Mu
2021-06-02 7:36 ` Takashi Iwai
0 siblings, 2 replies; 7+ messages in thread
From: Stephen Rothwell @ 2021-06-02 7:09 UTC (permalink / raw)
To: Takashi Iwai
Cc: Dongliang Mu, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 506 bytes --]
Hi all,
In commit
b3531c648d87 ("ALSA: control led: fix memory leak in snd_ctl_led_register")
Fixes tag
Fixes: a135dfb5de1 ("ALSA: led control - add sysfs kcontrol LED marking layer")
has these problem(s):
- SHA1 should be at least 12 digits long
This is probably not worth rebasing to fix, but can be avoided in the
future by setting core.abbrev to 12 (or more) or (for git v2.11 or later)
just making sure it is not set (or set to "auto").
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: Fixes tag needs some work in the sound-current tree
2021-06-02 7:09 linux-next: Fixes tag needs some work in the sound-current tree Stephen Rothwell
@ 2021-06-02 7:13 ` Dongliang Mu
2021-06-02 7:36 ` Takashi Iwai
1 sibling, 0 replies; 7+ messages in thread
From: Dongliang Mu @ 2021-06-02 7:13 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Takashi Iwai, Linux Kernel Mailing List, Linux Next Mailing List
On Wed, Jun 2, 2021 at 3:09 PM Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> Hi all,
>
> In commit
>
> b3531c648d87 ("ALSA: control led: fix memory leak in snd_ctl_led_register")
>
> Fixes tag
>
> Fixes: a135dfb5de1 ("ALSA: led control - add sysfs kcontrol LED marking layer")
>
> has these problem(s):
>
> - SHA1 should be at least 12 digits long
>
> This is probably not worth rebasing to fix, but can be avoided in the
> future by setting core.abbrev to 12 (or more) or (for git v2.11 or later)
> just making sure it is not set (or set to "auto").
:/ Sorry about this tag. The right SHA should be a135dfb5de15.
>
> --
> Cheers,
> Stephen Rothwell
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: Fixes tag needs some work in the sound-current tree
2021-06-02 7:09 linux-next: Fixes tag needs some work in the sound-current tree Stephen Rothwell
2021-06-02 7:13 ` Dongliang Mu
@ 2021-06-02 7:36 ` Takashi Iwai
2021-06-02 7:42 ` Dongliang Mu
1 sibling, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2021-06-02 7:36 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Takashi Iwai, Dongliang Mu, Linux Kernel Mailing List,
Linux Next Mailing List
On Wed, 02 Jun 2021 09:09:46 +0200,
Stephen Rothwell wrote:
>
> Hi all,
>
> In commit
>
> b3531c648d87 ("ALSA: control led: fix memory leak in snd_ctl_led_register")
>
> Fixes tag
>
> Fixes: a135dfb5de1 ("ALSA: led control - add sysfs kcontrol LED marking layer")
>
> has these problem(s):
>
> - SHA1 should be at least 12 digits long
>
> This is probably not worth rebasing to fix, but can be avoided in the
> future by setting core.abbrev to 12 (or more) or (for git v2.11 or later)
> just making sure it is not set (or set to "auto").
My bad, I must have overlooked the warning at applying.
Since it's the top commit and quite fresh (just an hour old), I'll
refresh the tree.
thanks,
Takashi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: Fixes tag needs some work in the sound-current tree
2021-06-02 7:36 ` Takashi Iwai
@ 2021-06-02 7:42 ` Dongliang Mu
2021-06-02 7:47 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Dongliang Mu @ 2021-06-02 7:42 UTC (permalink / raw)
To: Takashi Iwai
Cc: Stephen Rothwell, Linux Kernel Mailing List, Linux Next Mailing List
On Wed, Jun 2, 2021 at 3:36 PM Takashi Iwai <tiwai@suse.de> wrote:
>
> On Wed, 02 Jun 2021 09:09:46 +0200,
> Stephen Rothwell wrote:
> >
> > Hi all,
> >
> > In commit
> >
> > b3531c648d87 ("ALSA: control led: fix memory leak in snd_ctl_led_register")
> >
> > Fixes tag
> >
> > Fixes: a135dfb5de1 ("ALSA: led control - add sysfs kcontrol LED marking layer")
> >
> > has these problem(s):
> >
> > - SHA1 should be at least 12 digits long
> >
> > This is probably not worth rebasing to fix, but can be avoided in the
> > future by setting core.abbrev to 12 (or more) or (for git v2.11 or later)
> > just making sure it is not set (or set to "auto").
>
> My bad, I must have overlooked the warning at applying.
Hi Takashi,
I don't know why checkpatch.pl does not capture this warning for me.
./scripts/checkpatch.pl
0001-ALSA-control-led-fix-memory-leak-in-snd_ctl_led_regi.patch
total: 0 errors, 0 warnings, 89 lines checked
0001-ALSA-control-led-fix-memory-leak-in-snd_ctl_led_regi.patch has no
obvious style problems and is ready for submission.
Any idea?
>
> Since it's the top commit and quite fresh (just an hour old), I'll
> refresh the tree.
>
>
> thanks,
>
> Takashi
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: Fixes tag needs some work in the sound-current tree
2021-06-02 7:42 ` Dongliang Mu
@ 2021-06-02 7:47 ` Takashi Iwai
0 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2021-06-02 7:47 UTC (permalink / raw)
To: Dongliang Mu
Cc: Takashi Iwai, Stephen Rothwell, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]
On Wed, 02 Jun 2021 09:42:15 +0200,
Dongliang Mu wrote:
>
> On Wed, Jun 2, 2021 at 3:36 PM Takashi Iwai <tiwai@suse.de> wrote:
> >
> > On Wed, 02 Jun 2021 09:09:46 +0200,
> > Stephen Rothwell wrote:
> > >
> > > Hi all,
> > >
> > > In commit
> > >
> > > b3531c648d87 ("ALSA: control led: fix memory leak in snd_ctl_led_register")
> > >
> > > Fixes tag
> > >
> > > Fixes: a135dfb5de1 ("ALSA: led control - add sysfs kcontrol LED marking layer")
> > >
> > > has these problem(s):
> > >
> > > - SHA1 should be at least 12 digits long
> > >
> > > This is probably not worth rebasing to fix, but can be avoided in the
> > > future by setting core.abbrev to 12 (or more) or (for git v2.11 or later)
> > > just making sure it is not set (or set to "auto").
> >
> > My bad, I must have overlooked the warning at applying.
>
> Hi Takashi,
>
> I don't know why checkpatch.pl does not capture this warning for me.
>
> ./scripts/checkpatch.pl
> 0001-ALSA-control-led-fix-memory-leak-in-snd_ctl_led_regi.patch
> total: 0 errors, 0 warnings, 89 lines checked
>
> 0001-ALSA-control-led-fix-memory-leak-in-snd_ctl_led_regi.patch has no
> obvious style problems and is ready for submission.
>
> Any idea?
checkpatch doesn't check it strictly, IIRC.
I'm using a script Stephen posted some time ago. This should be
better covered generically in checkpatch, though...
Takashi
[-- Attachment #2: git-check-fixes --]
[-- Type: application/octet-stream, Size: 4195 bytes --]
#!/bin/bash
if [ "$#" -lt 1 ]; then
printf 'Usage: %s <commit range>\n', "$0" 1>&2
exit 1
fi
commits=$(git rev-list --no-merges -i --grep='^[[:space:]]*Fixes:' "$@")
if [ -z "$commits" ]; then
exit 0
fi
# This should be a git tree that contains *only* Linus' tree
Linus_tree="${HOME}/kernels/linus.git"
split_re='^([Cc][Oo][Mm][Mm][Ii][Tt])?[[:space:]]*([[:xdigit:]]{5,})([[:space:]]*)(.*)$'
nl=$'\n'
tab=$'\t'
# Strip the leading and training spaces from a string
strip_spaces()
{
[[ "$1" =~ ^[[:space:]]*(.*[^[:space:]])[[:space:]]*$ ]]
echo "${BASH_REMATCH[1]}"
}
for c in $commits; do
commit_log=$(git log -1 --format='%h ("%s")' "$c")
commit_msg="In commit
$commit_log
"
fixes_lines=$(git log -1 --format='%B' "$c" |
grep -i '^[[:space:]]*Fixes:')
while read -r fline; do
[[ "$fline" =~ ^[[:space:]]*[Ff][Ii][Xx][Ee][Ss]:[[:space:]]*(.*)$ ]]
f="${BASH_REMATCH[1]}"
fixes_msg="Fixes tag
$fline
has these problem(s):
"
sha=
subject=
msg=
if [[ "$f" =~ $split_re ]]; then
first="${BASH_REMATCH[1]}"
sha="${BASH_REMATCH[2]}"
spaces="${BASH_REMATCH[3]}"
subject="${BASH_REMATCH[4]}"
if [ "$first" ]; then
msg="${msg:+${msg}${nl}} - leading word '$first' unexpected"
fi
if [ -z "$subject" ]; then
msg="${msg:+${msg}${nl}} - missing subject"
elif [ -z "$spaces" ]; then
msg="${msg:+${msg}${nl}} - missing space between the SHA1 and the subject"
fi
else
printf '%s%s - %s\n' "$commit_msg" "$fixes_msg" 'No SHA1 recognised'
commit_msg=''
continue
fi
if ! git rev-parse -q --verify "$sha" >/dev/null; then
printf '%s%s - %s\n' "$commit_msg" "$fixes_msg" 'Target SHA1 does not exist'
commit_msg=''
continue
fi
if [ "${#sha}" -lt 12 ]; then
msg="${msg:+${msg}${nl}} - SHA1 should be at least 12 digits long${nl} Can be fixed by setting core.abbrev to 12 (or more) or (for git v2.11${nl} or later) just making sure it is not set (or set to \"auto\")."
fi
# reduce the subject to the part between () if there
if [[ "$subject" =~ ^\((.*)\) ]]; then
subject="${BASH_REMATCH[1]}"
elif [[ "$subject" =~ ^\((.*) ]]; then
subject="${BASH_REMATCH[1]}"
msg="${msg:+${msg}${nl}} - Subject has leading but no trailing parentheses"
fi
# strip matching quotes at the start and end of the subject
# the unicode characters in the classes are
# U+201C LEFT DOUBLE QUOTATION MARK
# U+201D RIGHT DOUBLE QUOTATION MARK
# U+2018 LEFT SINGLE QUOTATION MARK
# U+2019 RIGHT SINGLE QUOTATION MARK
re1=$'^[\"\u201C](.*)[\"\u201D]$'
re2=$'^[\'\u2018](.*)[\'\u2019]$'
re3=$'^[\"\'\u201C\u2018](.*)$'
if [[ "$subject" =~ $re1 ]]; then
subject="${BASH_REMATCH[1]}"
elif [[ "$subject" =~ $re2 ]]; then
subject="${BASH_REMATCH[1]}"
elif [[ "$subject" =~ $re3 ]]; then
subject="${BASH_REMATCH[1]}"
msg="${msg:+${msg}${nl}} - Subject has leading but no trailing quotes"
fi
subject=$(strip_spaces "$subject")
target_subject=$(git log -1 --format='%s' "$sha")
target_subject=$(strip_spaces "$target_subject")
# match with ellipses
case "$subject" in
*...) subject="${subject%...}"
target_subject="${target_subject:0:${#subject}}"
;;
...*) subject="${subject#...}"
target_subject="${target_subject: -${#subject}}"
;;
*\ ...\ *)
s1="${subject% ... *}"
s2="${subject#* ... }"
subject="$s1 $s2"
t1="${target_subject:0:${#s1}}"
t2="${target_subject: -${#s2}}"
target_subject="$t1 $t2"
;;
esac
subject=$(strip_spaces "$subject")
target_subject=$(strip_spaces "$target_subject")
if [ "$subject" != "${target_subject:0:${#subject}}" ]; then
msg="${msg:+${msg}${nl}} - Subject does not match target commit subject${nl} Just use${nl}${tab}git log -1 --format='Fixes: %h ("%s")'"
fi
lsha=$(cd "$Linus_tree" && git rev-parse -q --verify "$sha")
if [ -z "$lsha" ]; then
count=$(git rev-list --count "$sha".."$c")
if [ "$count" -eq 0 ]; then
msg="${msg:+${msg}${nl}} - Target is not an ancestor of this commit"
fi
fi
if [ "$msg" ]; then
printf '%s%s%s\n' "$commit_msg" "$fixes_msg" "$msg"
commit_msg=''
fi
done <<< "$fixes_lines"
done
exit 0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: linux-next: Fixes tag needs some work in the sound-current tree
2024-04-01 20:58 Stephen Rothwell
@ 2024-04-02 5:56 ` Takashi Iwai
0 siblings, 0 replies; 7+ messages in thread
From: Takashi Iwai @ 2024-04-02 5:56 UTC (permalink / raw)
To: Stephen Rothwell
Cc: Takashi Iwai, Oswald Buddenhagen, Linux Kernel Mailing List,
Linux Next Mailing List
On Mon, 01 Apr 2024 22:58:53 +0200,
Stephen Rothwell wrote:
>
> Hi all,
>
> In commit
>
> e1d8acf35ce7 ("Revert "ALSA: emu10k1: fix synthesizer sample playback position and caching"")
>
> Fixes tag
>
> Fixes: df335e9a8b (ALSA: emu10k1: fix synthesizer sample playback position and caching, 2023-05-18)
>
> has these problem(s):
>
> - SHA1 should be at least 12 digits long
> This can be fixed for the future by setting core.abbrev to 12 (or
> more) or (for git v2.11 or later) just making sure it is not set
> (or set to "auto").
> - Subject does not match target commit subject
> Just use
> git log -1 --format='Fixes: %h ("%s")'
>
> The date field adds nothing.
>
> Thus:
>
> Fixes: df335e9a8bcb ("ALSA: emu10k1: fix synthesizer sample playback position and caching")
The commit is corrected now. Thanks.
Takashi
^ permalink raw reply [flat|nested] 7+ messages in thread
* linux-next: Fixes tag needs some work in the sound-current tree
@ 2024-04-01 20:58 Stephen Rothwell
2024-04-02 5:56 ` Takashi Iwai
0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2024-04-01 20:58 UTC (permalink / raw)
To: Takashi Iwai
Cc: Oswald Buddenhagen, Linux Kernel Mailing List, Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 758 bytes --]
Hi all,
In commit
e1d8acf35ce7 ("Revert "ALSA: emu10k1: fix synthesizer sample playback position and caching"")
Fixes tag
Fixes: df335e9a8b (ALSA: emu10k1: fix synthesizer sample playback position and caching, 2023-05-18)
has these problem(s):
- SHA1 should be at least 12 digits long
This can be fixed for the future by setting core.abbrev to 12 (or
more) or (for git v2.11 or later) just making sure it is not set
(or set to "auto").
- Subject does not match target commit subject
Just use
git log -1 --format='Fixes: %h ("%s")'
The date field adds nothing.
Thus:
Fixes: df335e9a8bcb ("ALSA: emu10k1: fix synthesizer sample playback position and caching")
--
Cheers,
Stephen Rothwell
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-04-02 5:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02 7:09 linux-next: Fixes tag needs some work in the sound-current tree Stephen Rothwell
2021-06-02 7:13 ` Dongliang Mu
2021-06-02 7:36 ` Takashi Iwai
2021-06-02 7:42 ` Dongliang Mu
2021-06-02 7:47 ` Takashi Iwai
2024-04-01 20:58 Stephen Rothwell
2024-04-02 5:56 ` Takashi Iwai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).