From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH 11/13] ALSA: Deletion of checks before the function call "iounmap" Date: Mon, 5 Jan 2015 16:58:21 +0300 Message-ID: <20150105135821.GD15033@mwanda> References: <530CD2C4.4050903@users.sourceforge.net> <530CF8FF.8080600@users.sourceforge.net> <530DD06F.4090703@users.sourceforge.net> <5317A59D.4@users.sourceforge.net> <54A9355F.4050102@users.sourceforge.net> <54A941C1.4020906@users.sourceforge.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: alsa-devel@alsa-project.org, Russell King , linux-parisc@vger.kernel.org, Takashi Iwai , kernel-janitors@vger.kernel.org, Clemens Ladisch , LKML , Julia Lawall , Thibaut Varene , Johannes Berg , linuxppc-dev@lists.ozlabs.org To: SF Markus Elfring Return-path: In-Reply-To: <54A941C1.4020906@users.sourceforge.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org List-ID: On Sun, Jan 04, 2015 at 02:36:01PM +0100, SF Markus Elfring wrote: > /* unmap PCI memory space, mapped during device init. */ > - for (idx = 0; idx < HPI_MAX_ADAPTER_MEM_SPACES; idx++) { > - if (pci.ap_mem_base[idx]) > - iounmap(pci.ap_mem_base[idx]); > - } > + for (idx = 0; idx < HPI_MAX_ADAPTER_MEM_SPACES; ++idx) > + iounmap(pci.ap_mem_base[idx]); > Don't do the gratuitous idx++ to ++idx changes. You do it a couple other places as well. It belongs in a separate patch if you really feel it is worth doing. (It is not a clean up and it is not worth doing). regards, dan carpenter