Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933005Ab0FBTUw (ORCPT ); Wed, 2 Jun 2010 15:20:52 -0400 Received: from sj-iport-5.cisco.com ([171.68.10.87]:10667 "EHLO sj-iport-5.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932976Ab0FBTUu (ORCPT ); Wed, 2 Jun 2010 15:20:50 -0400 Authentication-Results: sj-iport-5.cisco.com; dkim=neutral (message not signed) header.i=none X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEAI9LBkyrR7Ht/2dsb2JhbACeH3GnPJonhRYEg0g X-IronPort-AV: E=Sophos;i="4.53,348,1272844800"; d="scan'208";a="206108663" From: Roland Dreier To: Dan Carpenter Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: Re: [announce] smatch 1.54 References: <20100109085325.GE7840@bicker> X-Message-Flag: Warning: May contain useful information Date: Wed, 02 Jun 2010 12:20:46 -0700 In-Reply-To: <20100109085325.GE7840@bicker> (Dan Carpenter's message of "Sat, 9 Jan 2010 11:53:25 +0300") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1014 Lines: 28 Hi Dan, I'm trying out smatch on some kernel code now. Neat stuff, but I'm seeing some puzzling false positives relating to signedness. Basically, if I have code like: __be16 foo; __u16 bar; foo = cpu_to_be16(128); bar = cpu_to_be16(128); then the first line warns about 32768 not fitting into foo, but while the second line doesn't warn, even though __be16 is just a __bitwise__ __u16. I don't understand the sparse / smatch internals so I'm not sure why applying __bitwise__ apparently kills the unsigned modifier. Maybe it's an easy fix for you? Otherwise I'll poke at it a little later. Thanks, Roland -- Roland Dreier || For corporate legal information go to: http://www.cisco.com/web/about/doing_business/legal/cri/index.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/