On Wed, Oct 25, 2017 at 09:25:15PM +0200, Rasmus Villemoes wrote: > For some reason this spits out an enourmous amount of false positives, > making this entirely useless. We hit a lot of "%lx", (long)(a - b), > but I don't understand why the a-b expression (a pointer difference) > passes is_ptr_type(). Well, it is a pointer type. If you do pointer math, you get pointer results. You can't really treat subtract different from addition because container_of() is a subtraction. 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