Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3076270ybt; Mon, 29 Jun 2020 14:41:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKNTucoseYIL1Wgzi2IpcO+uoG2/p6d4jbvfxIuJkBLpxjlOjO70GNpiu622omK1H46JaE X-Received: by 2002:a17:907:a92:: with SMTP id by18mr16561680ejc.116.1593466910306; Mon, 29 Jun 2020 14:41:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593466910; cv=none; d=google.com; s=arc-20160816; b=lXJmHBrxa2ZG0tF6CRvMNwxdMYNaHven2f8DQWHHjTbZZlcHFbZ72MzxGrzuBBGoyg LM6GkgFxS4EYq4kE0FhIye5rFNQpAzVkMHz3UyZJIWuvMHWP53P7ordjaSpwO69v3vXx osBViNA1waLaAqM/HLjVHNz+c17GH8KAcYRcvzHaL8JtNY8tNunRg631pz9Xgn+hsWrH POXI70x1Ew+4sNKrvDAW7r2j1e951AZo6p5QbrA+2zH9aRTD7gnstKFq1YdD8L4U3PQc p3e/aL3+JQHCGktieu5cGEjw9xWUJ1sFJONPsqc9W8LgTdo7p4JXiTAl5bmxMP6PnBBt p7Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CeIlxolJVbNNXtjyaXzLRd0YqyIgLSzfmH4JDO6jXaM=; b=Bnx67WPB0L1voJxrfmfkrrStzHDHiHKAhRkN52GkILQFKiuB9HVjR13VHLoLFdNXNH xGWxH2ZwXzOQ+UC/5On7uwd/2giCmiCN6o8qUGVltyVy//RTgibVtRwOCgQRT0xWntFk wcWxPK9+wGdlrtNH/tnzBb2MYqyjJQLHl4Oyu5/7SiIOfEB7yhLGkR0FMszzJ8blRsr5 8fTOQBb7ZMJvxmQlpR3AwQRvmcqgNaOQyt2M/cCIfK2COUfTYI8eMVnP+cau6RSLde+D vGjnU3Eu2V+3MyxQkVIPdoaRAwnUIqBMZ8gqVJyPz6F39WdMq1iAH/Q2zJ7n3akjiCbg m/PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SBvp+p2J; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a3si524125ejd.741.2020.06.29.14.41.27; Mon, 29 Jun 2020 14:41:50 -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=@kernel.org header.s=default header.b=SBvp+p2J; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391370AbgF2Vk6 (ORCPT + 99 others); Mon, 29 Jun 2020 17:40:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:60600 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728214AbgF2SkV (ORCPT ); Mon, 29 Jun 2020 14:40:21 -0400 Received: from localhost (unknown [122.182.251.219]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 994E1235FF; Mon, 29 Jun 2020 09:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593424331; bh=FvnI01MrqwrGCSn1pXUy+BedbEZpbcC56ZDWbIF8mFk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=SBvp+p2JVOK+mbuCO0DyD4m6cTuqvLnfQwf0MoDwwc8qToNCpesGe8dGwvR4NHuwO Um0wpFOI/f3glHy7M5ECcY13Z3m0pS1xZjX2DpfInnFAL2wXMZ7j9bYOC/Yc/h/5lx oe0ArLBMZ0u5XA50l1TuR2YiQ+bH3SrCAP+UPgQ0= Date: Mon, 29 Jun 2020 15:22:07 +0530 From: Vinod Koul To: Amit Tomer Cc: Andre Przywara , Andreas =?iso-8859-1?Q?F=E4rber?= , Manivannan Sadhasivam , dan.j.williams@intel.com, cristian.ciocaltea@gmail.com, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel , linux-actions@lists.infradead.org Subject: Re: [PATCH v4 02/10] dmaengine: Actions: Add support for S700 DMA engine Message-ID: <20200629095207.GG2599@vkoul-mobl> References: <1591697830-16311-1-git-send-email-amittomer25@gmail.com> <1591697830-16311-3-git-send-email-amittomer25@gmail.com> <20200624061529.GF2324254@vkoul-mobl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29-06-20, 13:49, Amit Tomer wrote: > Hi Vinod, > > Thanks for having a look and providing the comments. > > > Is the .compatible documented, Documentation patch should come before > > the driver use patch in a series > > Yes, this new compatible string is documented in patch (05/10). > I would make it as a patch (1/10). > > > > static int owl_dma_probe(struct platform_device *pdev) > > > { > > > struct device_node *np = pdev->dev.of_node; > > > struct owl_dma *od; > > > int ret, i, nr_channels, nr_requests; > > > + const struct of_device_id *of_id = > > > + of_match_device(owl_dma_match, &pdev->dev); > > > > You care about driver_data rather than of_id, so using > > of_device_get_match_data() would be better.. > > Okay. would take care of it in next version. > > > > od = devm_kzalloc(&pdev->dev, sizeof(*od), GFP_KERNEL); > > > if (!od) > > > @@ -1083,6 +1116,8 @@ static int owl_dma_probe(struct platform_device *pdev) > > > dev_info(&pdev->dev, "dma-channels %d, dma-requests %d\n", > > > nr_channels, nr_requests); > > > > > > + od->devid = (enum owl_dma_id)(uintptr_t)of_id->data; > > > > Funny casts, I dont think you need uintptr_t! > > But without this cast, clang compiler emits following warning: > > warning: cast to smaller integer type 'enum owl_dma_id' from 'const void *' > [-Wvoid-pointer-to-enum-cast] If you use of_device_get_match_data() you will not fall into this :) -- ~Vinod