From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754118AbcAEEm4 (ORCPT ); Mon, 4 Jan 2016 23:42:56 -0500 Received: from mga04.intel.com ([192.55.52.120]:29632 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753913AbcAEEmv (ORCPT ); Mon, 4 Jan 2016 23:42:51 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,523,1444719600"; d="scan'208";a="720332623" Date: Tue, 5 Jan 2016 10:16:19 +0530 From: Vinod Koul To: Andy Shevchenko Cc: Sinan Kaya , dmaengine , Mark Rutland , Timur Tabi , devicetree , Christopher Covington , jcm@redhat.com, Andy Gross , Arnd Bergmann , linux-arm-msm@vger.kernel.org, linux-arm Mailing List , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH V11 3/7] dma: add Qualcomm Technologies HIDMA management driver Message-ID: <20160105044619.GJ2940@localhost> References: <1451865996-12808-1-git-send-email-okaya@codeaurora.org> <1451865996-12808-4-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 04, 2016 at 08:37:30PM +0200, Andy Shevchenko wrote: > > +static int set_priority(struct hidma_mgmt_dev *mdev, unsigned int i, u64 val) > > +{ > > + u64 tmp; > > + int rc; > > + > > + if (i > mdev->dma_channels) > > Shouldn't be >= ? I somehow missed that. There is no merit is posting not related context while replying, makes your emails harder to read, please fix that > > + return -EINVAL; > > + > > + tmp = mdev->priority[i]; > > + mdev->priority[i] = val; > > + rc = hidma_mgmt_setup(mdev); > > + if (rc) > > + mdev->priority[i] = tmp; > > + return rc; > > +} > > + > > +static int set_weight(struct hidma_mgmt_dev *mdev, unsigned int i, u64 val) > > +{ > > + u64 tmp; > > + int rc; > > + > > + if (i > mdev->dma_channels) > > Ditto. Exactly, ditto... -- ~Vinod