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" Content-Transfer-Encoding: 7bit Return-path: Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) by alsa0.perex.cz (Postfix) with ESMTP id 40D552604D0 for ; Mon, 5 Jan 2015 14:58:40 +0100 (CET) Content-Disposition: inline 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 Sender: alsa-devel-bounces@alsa-project.org To: SF Markus Elfring 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 List-Id: alsa-devel@alsa-project.org 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