Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751652AbdG1DKv (ORCPT ); Thu, 27 Jul 2017 23:10:51 -0400 Received: from mga09.intel.com ([134.134.136.24]:57363 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751573AbdG1DKt (ORCPT ); Thu, 27 Jul 2017 23:10:49 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,423,1496127600"; d="scan'208";a="132933806" Date: Fri, 28 Jul 2017 08:43:42 +0530 From: Vinod Koul To: Anup Patel Cc: Rob Herring , Mark Rutland , Dan Williams , Florian Fainelli , Scott Branden , Ray Jui , Linux Kernel , Linux ARM Kernel , Device Tree , dmaengine@vger.kernel.org, BCM Kernel Feedback Subject: Re: [PATCH 1/6] dma: bcm-sba-raid: Improve memory allocation in SBA RAID driver Message-ID: <20170728031342.GR3053@localhost> References: <1501047404-14456-1-git-send-email-anup.patel@broadcom.com> <1501047404-14456-2-git-send-email-anup.patel@broadcom.com> <20170726170932.GI3053@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2603 Lines: 71 On Thu, Jul 27, 2017 at 09:42:33AM +0530, Anup Patel wrote: > On Wed, Jul 26, 2017 at 10:39 PM, Vinod Koul wrote: > > On Wed, Jul 26, 2017 at 11:06:39AM +0530, Anup Patel wrote: > >> drivers/dma/bcm-sba-raid.c | 439 +++++++++++++++++++++++---------------------- > >> 1 file changed, 226 insertions(+), 213 deletions(-) > >> > >> diff --git a/drivers/dma/bcm-sba-raid.c b/drivers/dma/bcm-sba-raid.c > >> index e41bbc7..6d15fed 100644 > >> --- a/drivers/dma/bcm-sba-raid.c > >> +++ b/drivers/dma/bcm-sba-raid.c > >> @@ -48,7 +48,8 @@ > >> > >> #include "dmaengine.h" > >> > >> -/* SBA command related defines */ > >> +/* ====== Driver macros and defines ===== */ > > > > why this noise, seems unrelated to the change! > > This is just minor beautification. Again, I will put this > in separate patch. Well you can't shove garlands under an unrelated change. By all means throw the whole garden out there, but please as a separate patch > > > > >> + > >> #define SBA_TYPE_SHIFT 48 > >> #define SBA_TYPE_MASK GENMASK(1, 0) > >> #define SBA_TYPE_A 0x0 > >> @@ -82,39 +83,41 @@ > >> #define SBA_CMD_WRITE_BUFFER 0xc > >> #define SBA_CMD_GALOIS 0xe > >> > >> -/* Driver helper macros */ > >> +#define SBA_MAX_REQ_PER_MBOX_CHANNEL 8192 > >> + > >> #define to_sba_request(tx) \ > >> container_of(tx, struct sba_request, tx) > >> #define to_sba_device(dchan) \ > >> container_of(dchan, struct sba_device, dma_chan) > >> > >> -enum sba_request_state { > >> - SBA_REQUEST_STATE_FREE = 1, > >> - SBA_REQUEST_STATE_ALLOCED = 2, > >> - SBA_REQUEST_STATE_PENDING = 3, > >> - SBA_REQUEST_STATE_ACTIVE = 4, > >> - SBA_REQUEST_STATE_RECEIVED = 5, > >> - SBA_REQUEST_STATE_COMPLETED = 6, > >> - SBA_REQUEST_STATE_ABORTED = 7, > >> +/* ===== Driver data structures ===== */ > >> + > >> +enum sba_request_flags { > >> + SBA_REQUEST_STATE_FREE = 0x001, > >> + SBA_REQUEST_STATE_ALLOCED = 0x002, > >> + SBA_REQUEST_STATE_PENDING = 0x004, > >> + SBA_REQUEST_STATE_ACTIVE = 0x008, > >> + SBA_REQUEST_STATE_RECEIVED = 0x010, > >> + SBA_REQUEST_STATE_COMPLETED = 0x020, > >> + SBA_REQUEST_STATE_ABORTED = 0x040, > >> + SBA_REQUEST_STATE_MASK = 0x0ff, > >> + SBA_REQUEST_FENCE = 0x100, > > > > how does this help in mem alloctn? ?? -- ~Vinod