Sure, I can put that part of the the "unreachable code" check under --spammy. The warning will still be triggered if someone sets a state. These days probably there is a state change for almost every line of regular C code. On Wed, Dec 18, 2013 at 08:26:34PM +0100, Johannes Berg wrote: > Hi Dan, > > The "unreachable code" info thing has gotten rather spammy even though > you tried to print it less ... I get a ton on assembly stuff etc. I haven't actually changed this for years, although I did yesterday but I haven't pushed it yet. > > I've changed my copy as below but I have no idea if that's really > useful. It still prints out genuinely unreachable code like > > if (blabla) { > return 12345; > printk(KERN_DEBUG "oohhh\n"); > } > > but stops printing things about assembly like > > arch/x86/include/asm/bitops.h:254 test_and_clear_bit() info: ignoring unreachable code. > arch/x86/include/asm/preempt.h:79 __preempt_count_dec_and_test() info: ignoring unreachable code. It's the asm goto that does it. I should look for a real fix for this. But in the mean time, what I did was added a smatch_data/kernel.silenced_functions file so those functions won't generate any output. But I will apply your patch as well to just disable this part. Also even for the --spammy output, I changed the code so it doesn't warn about unreachable break statements and empty statements like "return ;;". regards, dan carpenter -- To unsubscribe from this list: send the line "unsubscribe smatch" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html