Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753478AbbGNIc4 (ORCPT ); Tue, 14 Jul 2015 04:32:56 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:10428 "EHLO mailapp01.imgtec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752151AbbGNIcw (ORCPT ); Tue, 14 Jul 2015 04:32:52 -0400 Date: Tue, 14 Jul 2015 09:32:48 +0100 From: Paul Burton To: Ralf Baechle CC: , Subject: Re: [PATCH 1/2] MIPS: PCI: ops-emma2rh: drop nonsensical db_assert Message-ID: <20150714083248.GE2519@NP-P-BURTON> References: <1436804062-30041-1-git-send-email-paul.burton@imgtec.com> <20150714083029.GA25179@linux-mips.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline In-Reply-To: <20150714083029.GA25179@linux-mips.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-Originating-IP: [10.100.200.168] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1373 Lines: 35 On Tue, Jul 14, 2015 at 10:30:30AM +0200, Ralf Baechle wrote: > On Mon, Jul 13, 2015 at 05:14:21PM +0100, Paul Burton wrote: > > > The db_assert call checks whether the bus_num pointer is non-NULL, but > > does so after said pointer has been dereferenced by the assignment on > > the previous line. Thus the check is pointless & likely to have been > > optimised out by the compiler anyway. The check_args function is static > > & only ever called from the local file with bus_num being a pointer to > > an on-stack variable, so the check seems somewhat overzealous anyway. > > Simply remove it. > > Thanks, applied. > > Your patch btw. leaves the db_verify() macro as the sole caller of > db_assert() and db_verify() itself is unused and in fact, nothing > includes anymore. Removing leaves > CONFIG_RUNTIME_DEBUG unused, so I'm removing that one, too. > > Ralf Hi Ralf, That's precisely what led me to write this patch, and precisely what the following patch I submitted (MIPS: drop CONFIG_RUNTIME_DEBUG & debug.h) does: http://patchwork.linux-mips.org/patch/10693/ Thanks, Paul -- 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/