Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752627AbbBKLbQ (ORCPT ); Wed, 11 Feb 2015 06:31:16 -0500 Received: from mout.web.de ([212.227.17.12]:59924 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751752AbbBKLbO (ORCPT ); Wed, 11 Feb 2015 06:31:14 -0500 Message-ID: <54DB3D6E.5000304@users.sourceforge.net> Date: Wed, 11 Feb 2015 12:30:54 +0100 From: SF Markus Elfring User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Bas Peters , Chris Mason , David Sterba , Josef Bacik CC: linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Julia Lawall Subject: Re: [PATCH] fs: btrfs: free-space-cache.c: remove two unnecessary checks before calling kfree() References: <1423646233-16637-1-git-send-email-baspeters93@gmail.com> In-Reply-To: <1423646233-16637-1-git-send-email-baspeters93@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:5uX7lyNr3KnqjRQr9UFmMwavlZZXaUEhevc+XliXfbVYiQGfZLG bMhXFvV0BbIsLjkwmYHJvpaZu79dArqkKaB0bCckFvi3bCAZ0huNSIh2ws4qeCAXnRgn6Is lZlxHH9bqkZRlmWJliE67uz0V/acTIztbICqzkErXMYJej62mVYCZiwA1dvVUsphy+5crJJ hvh0Q/ezoYaJGv3gv6V2Q== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 692 Lines: 19 > kfree checks whether the pointer it is passed is NULL. The two foregoing > checks are therefore unnecessary. > > This issue was detected using Coccinelle. Would you like to integrate my update suggestion "btrfs: Deletion of unnecessary checks before six function calls"? https://lkml.org/lkml/2014/10/31/606 http://article.gmane.org/gmane.linux.kernel/1818924 https://systeme.lip6.fr/pipermail/cocci/2014-October/001321.html Regards, Markus -- 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/