Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268AbbGNIak (ORCPT ); Tue, 14 Jul 2015 04:30:40 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:50067 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbbGNIai (ORCPT ); Tue, 14 Jul 2015 04:30:38 -0400 Date: Tue, 14 Jul 2015 10:30:30 +0200 From: Ralf Baechle To: Paul Burton Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] MIPS: PCI: ops-emma2rh: drop nonsensical db_assert Message-ID: <20150714083029.GA25179@linux-mips.org> References: <1436804062-30041-1-git-send-email-paul.burton@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1436804062-30041-1-git-send-email-paul.burton@imgtec.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1045 Lines: 23 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 -- 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/