Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751782AbdI1GNY (ORCPT ); Thu, 28 Sep 2017 02:13:24 -0400 Received: from ozlabs.org ([103.22.144.67]:34629 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750929AbdI1GNU (ORCPT ); Thu, 28 Sep 2017 02:13:20 -0400 From: Michael Ellerman To: Christoph Hellwig , Linus Torvalds , Daniel Axtens Cc: Al Viro , Kyle Huey , open list , "Robert O'Callahan" Subject: Script to do smart sparse diffs (was Re: [git pull] vfs.git regression fix Re: Regression related to ipc shmctl compat) In-Reply-To: <20170926064213.GA8473@infradead.org> References: <20170926010036.GX32076@ZenIV.linux.org.uk> <20170926064213.GA8473@infradead.org> Date: Thu, 28 Sep 2017 16:13:18 +1000 Message-ID: <87mv5f73lt.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1228 Lines: 30 Christoph Hellwig writes: > On Mon, Sep 25, 2017 at 06:37:28PM -0700, Linus Torvalds wrote: >> Pulled and pushed out, but I'd like to note that sparse would have >> caught this. Except we are so far away from being sparse-clean that >> nobody runs it. > > I tend to run sparse over the nvme code before sending pull request > every time. But it's a fairly new codebase, so it it actually > is clean. I wish we'd just default to running sparse at some point > so people have to clean their shit up, as it catches a lot of > useful things. But maybe for the default we want to tune it down > a bit (e.g. don't warn about missing statics by default, skip > the lock imbalance checks which while often useful also generate > tons of false positives). Daniel (++Cc) wrote a script a while back that can do a "smart" diff of the sparse output from two builds. Roughly it sorts the output (important when using make -j) and does some other munging to try and give you a minimal diff across runs. That allows you to check if a commit added new sparse warnings without the build being clean at the beginning. Anyway it's here if anyone wants to try it: https://github.com/daxtens/smart-sparse-diff cheers