https://github.com/torvalds/linux
Revision 4f1d0f1971ba37010603a3a5c763f398b888d2f4 authored by Alan Cox on 04 July 2012, 15:35:35 UTC, committed by Nicholas Bellinger on 06 July 2012, 20:09:23 UTC
Based upon Alan's patch from Coverity scan id 793583, these debug messages in qlt_async_event() should be starting from byte 0, which is always the Asynchronous Event Status Code from the parent switch statement. Also, rename reason_code -> login_code following the language used in 2500 FW spec for Port Database Changed (0x8014) -> Port Database Changed Event Mailbox Register for mailbox[2]. Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Chad Dupuis <chad.dupuis@qlogic.com> Cc: Giridhar Malavali <giridhar.malavali@qlogic.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
1 parent 863555b
Tip revision: 4f1d0f1971ba37010603a3a5c763f398b888d2f4 authored by Alan Cox on 04 July 2012, 15:35:35 UTC
qla2xxx: print the right array elements in qlt_async_event
qla2xxx: print the right array elements in qlt_async_event
Tip revision: 4f1d0f1
checkkconfigsymbols.sh
#!/bin/sh
# Find Kconfig variables used in source code but never defined in Kconfig
# Copyright (C) 2007, Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
# Tested with dash.
paths="$@"
[ -z "$paths" ] && paths=.
# Doing this once at the beginning saves a lot of time, on a cache-hot tree.
Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`"
/bin/echo -e "File list \tundefined symbol used"
find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i
do
# Output the bare Kconfig variable and the filename; the _MODULE part at
# the end is not removed here (would need perl an not-hungry regexp for that).
sed -ne 's!^.*\<\(UML_\)\?CONFIG_\([0-9A-Za-z_]\+\).*!\2 '$i'!p' < $i
done | \
# Smart "sort|uniq" implemented in awk and tuned to collect the names of all
# files which use a given symbol
awk '{map[$1, count[$1]++] = $2; }
END {
for (combIdx in map) {
split(combIdx, separate, SUBSEP);
# The value may have been removed.
if (! ( (separate[1], separate[2]) in map ) )
continue;
symb=separate[1];
printf "%s ", symb;
#Use gawk extension to delete the names vector
delete names;
#Portably delete the names vector
#split("", names);
for (i=0; i < count[symb]; i++) {
names[map[symb, i]] = 1;
# Unfortunately, we may still encounter symb, i in the
# outside iteration.
delete map[symb, i];
}
i=0;
for (name in names) {
if (i > 0)
printf ", %s", name;
else
printf "%s", name;
i++;
}
printf "\n";
}
}' |
while read symb files; do
# Remove the _MODULE suffix when checking the variable name. This should
# be done only on tristate symbols, actually, but Kconfig parsing is
# beyond the purpose of this script.
symb_bare=`echo $symb | sed -e 's/_MODULE//'`
if ! grep -q "\<$symb_bare\>" $Kconfigs; then
/bin/echo -e "$files: \t$symb"
fi
done|sort
Computing file changes ...