From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Brownell Subject: Re: [patch 4/4 2.6.23-rc2 + mm2-git-mmc] mmc_spi host driver Date: Wed, 29 Aug 2007 13:00:04 -0700 Message-ID: <200708291300.05562.david-b@pacbell.net> References: <200708080906.18993.david-b@pacbell.net> <200708290959.33584.david-b@pacbell.net> <20070829213905.71236d24@poseidon.drzeus.cx> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Hans-Peter Nilsson , Mikael Starvik , Mike Lavender To: Pierre Ossman Return-path: In-Reply-To: <20070829213905.71236d24-mgABNEgzgxm+PRNnhPf8W5YgPPQkE1Si@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Wednesday 29 August 2007, Pierre Ossman wrote: > Could I get that patch instead? Pretty please? :) ======= CUT HERE Small bugfix for an issue noted by Sascha Hauer , whereby a buffer length was the passed with the wrong size. This also includes a minor cleanup, to eliminate the error-prone +1/-1 stuff. Signed-off-by: David Brownell --- drivers/mmc/host/mmc_spi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- g26.orig/drivers/mmc/host/mmc_spi.c 2007-08-29 12:53:41.000000000 -0700 +++ g26/drivers/mmc/host/mmc_spi.c 2007-08-29 12:54:24.000000000 -0700 @@ -882,11 +882,12 @@ mmc_spi_data_do(struct mmc_spi_host *hos list_add(&host->early_status.transfer_list, &host->m.transfers); + memset(scratch->status, 0xff, statlen); scratch->status[0] = SPI_TOKEN_STOP_TRAN; - memset(scratch->status + 1, 0xff, statlen - 1); + host->early_status.tx_buf = host->early_status.rx_buf; host->early_status.tx_dma = host->early_status.rx_dma; - host->early_status.len = 1 + statlen; + host->early_status.len = statlen; if (host->dma_dev) dma_sync_single_for_device(host->dma_dev, ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/