From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Kluin Subject: [PATCH] spi: limit reaches -1, tested 0 Date: Sat, 31 Jan 2009 12:33:05 +0100 Message-ID: <498436F1.4020505@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org With a postfix decrement limit will reach -1 rather than 0, so the warning will not be issued. Signed-off-by: Roel Kluin --- diff --git a/drivers/spi/spi_imx.c b/drivers/spi/spi_imx.c index 269a55e..a4652f1 100644 --- a/drivers/spi/spi_imx.c +++ b/drivers/spi/spi_imx.c @@ -779,7 +779,7 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data) /* Read trailing bytes */ limit = loops_per_jiffy << 1; - while ((read(drv_data) == 0) && limit--); + while ((read(drv_data) == 0) && --limit); if (limit == 0) dev_err(&drv_data->pdev->dev, ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword