Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp5794721imm; Tue, 26 Jun 2018 18:51:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdC2VSFu8E4o+4VrVSLHtdaFwV9InWoKDsrKTBGb2mF1AR9CbXTPMETnLeucupZOnZoY/r5 X-Received: by 2002:a62:678f:: with SMTP id t15-v6mr569559pfj.85.1530064278161; Tue, 26 Jun 2018 18:51:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530064278; cv=none; d=google.com; s=arc-20160816; b=QjZYJPCogfiBx3PlnWw9AAXxoWQ7u63DTzD9tgj+a2H1pAbr++DFSVrz26Fcll143E kTLTzAm0GKrNlTqSvBYTjimXmZWEEXDEjWsyseVFaf5ZnlffINtjGoNIbCdc3prtHFH1 mQjX50NcTHV+OOVosx9zKdOJ71Jhc85IHRXcqeciZEaSfwfpMHQj4SUMxsDvcH3Wnxyv vRZsUzGPNRvhhuWELMoLuxVIBZ8k6ly/ilKECWRO1AZP6SpuVgt8GrLkOfnW/QrPgMLX y6JYbGqqTOVAA4F4lIekyIAh73AtdZ4V+xIK1vaFhMcGuxtO346BqJOTEEhxJx2jpnB1 R8Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=Mx5UGowW7YcLHJw5uH8dxZIUAxvl9Kzd/zVKwWW042s=; b=Yyntjd7ivvykNc4s0ildQPHYL93MK14TXc2QGrTOWfq+w/IJI4cWuaHLwL8hL3jiB8 o8jxmP6wnpVWFgstyODOZNsCKxPeZPywgCEZxMM01/J+cB2viPmp9vtI6dwn2g+5SdRu ZqMLJoznziJv6THpgD+iwrmv1yjaEWdFR66QcWqtBCCMOBdATaIKydtGBxYg0pMqguX7 Yzm9oj+pol3O8WLU57As7Q/3irxXYv466iE7d1R4MWd6HNIrHt9QwJ1o398ETyXEGRxL fkgCnf9K6WABbVMe3hA5+o1nWI1xVcX9zMuL7/YPTrFEY6DPS6xuj7/sHvxvPS5g8KLi M0sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AH5iHRj8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si2341771pgq.183.2018.06.26.18.51.03; Tue, 26 Jun 2018 18:51:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=AH5iHRj8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933606AbeFZXA7 (ORCPT + 99 others); Tue, 26 Jun 2018 19:00:59 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:51866 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933304AbeFZXA6 (ORCPT ); Tue, 26 Jun 2018 19:00:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Mx5UGowW7YcLHJw5uH8dxZIUAxvl9Kzd/zVKwWW042s=; b=AH5iHRj8NX4R2cUbGo78MCQRY PRQi2oOLdDnn2demTqtCSmQpzG+srWdJxhYicwqRikjvp2iaqxNkn2UvQHZBJhLsS3Q4l5FA2ObFv 2mj3Osb3ENa0VygoI47ioV6jVzyh0rhfPsUhOpxECWISQ9BzkXm7kkaUsOIVwXOk51OsDN4SybR2v MMR0+DDy0nLiyWyjKVxuUM6n+HINGkxh1uw/r+9u/mmrFmGlzAC7vHuoBtG8vFFLjFKILz1N2QTIh Z86VHVSyAMnufpZpTmGZgAqzb16kVpO6rghxzPJY5IwPO16jdKuLe13dqEzoZNoaemyDIJxpZGSUf uUCUYni/w==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fXwxF-0002hr-Ew; Tue, 26 Jun 2018 23:00:57 +0000 Date: Tue, 26 Jun 2018 16:00:57 -0700 From: Matthew Wilcox To: Lars-Peter Clausen Cc: linux-kernel@vger.kernel.org, Dan Williams , Vinod Koul , dmaengine@vger.kernel.org Subject: Re: [PATCH 16/26] dmaengine: Convert to new IDA API Message-ID: <20180626230057.GB17633@bombadil.infradead.org> References: <20180621212835.5636-1-willy@infradead.org> <20180621212835.5636-17-willy@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 24, 2018 at 09:57:45AM +0200, Lars-Peter Clausen wrote: > > + int rc = ida_alloc(&dma_ida, GFP_KERNEL); > > > > + if (rc >= 0) > > + device->dev_id = rc; > > return rc; > > This used to return 0 on success, now it returns the ID. That wont work > considering that it is used like this > > rc = get_dma_id(device); > if (rc != 0) ... Thanks! I changed it to this: static int get_dma_id(struct dma_device *device) { int rc = ida_alloc(&dma_ida, GFP_KERNEL); if (rc < 0) return rc; device->dev_id = rc; return 0; }