Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp177198pxj; Tue, 15 Jun 2021 23:17:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOf1vzHox7eb0d1afOahXmTwHwmRfen5LM9LuBOFhbQqtSzaLaKkmXiCw6K621Po9tQVT+ X-Received: by 2002:a5e:8349:: with SMTP id y9mr2270300iom.105.1623824232132; Tue, 15 Jun 2021 23:17:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623824232; cv=none; d=google.com; s=arc-20160816; b=m+LM1t2ay88BV0eD7uGtRoNAqeNyhHhY0d1W61kvqNItVuYHdjreC1UA5x3g55+kx2 5OrCplChbczy4cX2rWDa/0GJhXmw80rM/z8YrKYFV/cbsAUfbfXObElI4QjHwl1jPL2Y mjzXqz+Q+PRoxnTquaLTV8P/RRk/wV9uGh9bpkjPphcD/OXXcMEqE2aRyUVx8z+GizWQ wd3AyZqcFugqK/a2/ZvPbFri3b8s1ugNrIpCPSHjkm5nTDnjWZRRH2nV/hSWjgKUBOIE PxT8S80fz1uEPn4rE7YjxPCnWp2Po7V4lTz0ACkx6B48JWNWwMoHzutLyebzI6QfY+fr ASNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=6iHj2pi7T0Ygg+GLiXHkNWrR/0ty6pX6inCvXfg3Ps4=; b=ND7WKbogwyC7S/plZ3wTGGJ4v2G9ACyu6AC0f2x+2yuD2mbdEXHxsxCzpTYuDhekHP kSWsSt6hKW2CssF+NEk91PLL1Psbx+t62ZcMZmzPg33hqiFAO2MS9oecA8ZMaq0OOUeW 18qmA+qBiNteQ3bOvGYEZvIJvpJuKCttRqUUtbfWW3M4y0X7O9Nr758WA6aioAfezNZH fUMxA4F+wPcBBwzc9g8q4WRnOqhZ4ZKWEI/B8lOTZ7FU/2CRiAxF6hL2p9+aZVr2rlKF sfpfK5IrCzHTtvjVvq0wL1HOwPqJxuyAas6NcP9hayXdexdyX8xiGDrEBSXAERaEv/SR McaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cwcoYXSk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i1si1260609ilq.80.2021.06.15.23.16.59; Tue, 15 Jun 2021 23:17:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=cwcoYXSk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230319AbhFPGSj (ORCPT + 99 others); Wed, 16 Jun 2021 02:18:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:42700 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229543AbhFPGSi (ORCPT ); Wed, 16 Jun 2021 02:18:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 402DD613C2; Wed, 16 Jun 2021 06:16:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1623824192; bh=n0MaySor92vcaSlNHggYCZWNY0gOnL+3Y3j8NPusdX8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cwcoYXSkOGqTJqizPHMafPo0S6zRL8Bn9H6cp3rJRUf9UZfsmH+fVWt4Fw3WYzs5w xNX3Fy4k8dgu27JdIWcpPx18SaODiHVC0mDwZkQ4H+vzNgvGcqW0qVsDpiBA5ft0Iz J53J3ykibbibiNO446wiPDMEbMS5WKSpeU3ZYnAg= Date: Wed, 16 Jun 2021 08:16:28 +0200 From: Greg KH To: Sanjay R Mehta Cc: Vinod Koul , Sanjay R Mehta , dan.j.williams@intel.com, Thomas.Lendacky@amd.com, Shyam-sundar.S-k@amd.com, Nehal-bakulchandra.Shah@amd.com, robh@kernel.org, mchehab+samsung@kernel.org, davem@davemloft.net, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org Subject: Re: [PATCH v9 1/3] dmaengine: ptdma: Initial driver for the AMD PTDMA Message-ID: References: <1622654551-9204-1-git-send-email-Sanju.Mehta@amd.com> <1622654551-9204-2-git-send-email-Sanju.Mehta@amd.com> <94bba5dd-b755-81d0-de30-ce3cdaa3f241@amd.com> <0bc4e249-b8ce-1d92-ddde-b763667a0bcb@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0bc4e249-b8ce-1d92-ddde-b763667a0bcb@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 16, 2021 at 10:24:52AM +0530, Sanjay R Mehta wrote: > > > On 6/16/2021 9:45 AM, Vinod Koul wrote: > > [CAUTION: External Email] > > > > On 15-06-21, 16:50, Sanjay R Mehta wrote: > > > >>>> +static struct pt_device *pt_alloc_struct(struct device *dev) > >>>> +{ > >>>> + struct pt_device *pt; > >>>> + > >>>> + pt = devm_kzalloc(dev, sizeof(*pt), GFP_KERNEL); > >>>> + > >>>> + if (!pt) > >>>> + return NULL; > >>>> + pt->dev = dev; > >>>> + pt->ord = atomic_inc_return(&pt_ordinal); > >>> > >>> What is the use of this number? > >>> > >> > >> There are eight similar instances of this DMA engine on AMD SOC. > >> It is to differentiate each of these instances. > > > > Are they individual device objects? > > > > Yes, they are individual device objects. Then what is "ord" for? Why are you using an atomic variable for this? What does this field do? Why doesn't the normal way of naming a device come into play here instead? thanks, greg k-h