Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754815AbbK0PFp (ORCPT ); Fri, 27 Nov 2015 10:05:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40105 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753729AbbK0PFn (ORCPT ); Fri, 27 Nov 2015 10:05:43 -0500 Subject: Re: [PATCH 2/3] arcmsr: Split dma resource allocation to a new function To: Ching Huang , Joe Perches References: <1448538075.10768.47.camel@Centos6.3-64> <1448567174.18647.19.camel@perches.com> <1448593128.4834.5.camel@Centos6.3-64> Cc: hch@infradead.org, jbottomley@parallels.com, dan.carpenter@oracle.com, agordeev@redhat.com, linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org, hare@suse.de, jthumshirn@suse.de, hch@lst.de From: Tomas Henzl Message-ID: <56587143.7090407@redhat.com> Date: Fri, 27 Nov 2015 16:05:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1448593128.4834.5.camel@Centos6.3-64> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1283 Lines: 38 On 27.11.2015 03:58, Ching Huang wrote: > On Thu, 2015-11-26 at 11:46 -0800, Joe Perches wrote: >> On Thu, 2015-11-26 at 19:41 +0800, Ching Huang wrote: >>> split dma resource allocation and io register assignment from get_config to a new function arcmsr_alloc_io_queue. >> trivia: >> >>> diff -uprN a/drivers/scsi/arcmsr/arcmsr_hba.c b/drivers/scsi/arcmsr/arcmsr_hba.c >> [] >>> +static bool arcmsr_alloc_io_queue(struct AdapterControlBlock *acb) >>> +{ >> [] >>> + dma_coherent = dma_alloc_coherent(&pdev->dev, acb->roundup_ccbsize, >>> + &dma_coherent_handle, GFP_KERNEL); >>> + if (!dma_coherent){ >>> + pr_notice("arcmsr%d: DMA allocation failed.\n", acb->host->host_no); >>> + return false; >>> + } >>> + memset(dma_coherent, 0, acb->roundup_ccbsize); >>> >> There is a dma_zalloc_coherent >> >> (and even more trivially) >> >> Most all of your error messages don't use periods. > Thanks Joe. > Revised as below. > > Signed-of-by: Ching Huang Reviewed-by: Tomas Henzl Tomas -- 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/