Received: by 10.192.165.156 with SMTP id m28csp855159imm; Tue, 17 Apr 2018 22:42:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Zgx/BwptZ5S6uO/2XAHNqs9hehlrEUjoo0rXQ/W9muibtkHFT8FbTvCiavVNtpyspCh8b X-Received: by 10.99.153.17 with SMTP id d17mr663680pge.62.1524030140989; Tue, 17 Apr 2018 22:42:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524030140; cv=none; d=google.com; s=arc-20160816; b=TuaQHWi9X+/LWgndpO3nA32cGKR18Gh4eWq/gYikm+YnJZOxC2t5loe6t5Qx5BZ65p 9XY39tuxjj8nF9NmjzDOpVRnqGAeEuEnShRWmg8fEceM4kPHPQOghX3/qDsY94uIqvbt Fo+6ON03/W2FanQitN9m2gmQP4mQb7xfrdUC9Uxvj+ZqWgKBRQxiaJGxeWcFaCCDronf txQdprxP/wcGQLmvsz3S/11v6bNKD+UkYhZTgc0u/Ux0lwPjMMykbSiHmoQGG/wUGsgz 4rATn4KdVgE8ye9kJWSIZ2ZxevSQoxeijaVX2JLg9AxwpoKL3FPmKvNaLwx42zv9QNhX r6vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=oG//FFr5Dab5frSize0EFgVBoKLyqIy0FntReurNKfw=; b=ynmFrRTTsH0WBo3xMG+VzvroM8noGBmPq3QVrpoLfT//aN7ujLe39rdPOUmXrpK114 ssP5cKzxrc5pPdDUffbFLahG6lqqNL7/WgtPJMWlRoe/BH5SOSUrHdP3LsP50IbRYfYx k8ASCNi64e22VILmM5qNFFZKK7mDqX5tgbnpqgYJuQnxABMI3WFc8MKv78QAXvjwlngJ HkZEM42SoLLiSIajAvtcOLW7X+0vjtwvtuTAzr3DLws6JxRlBoZqGGWDF13ubbd8T2cg bsfcREa5e9/zLWACt1+SORN3h9yrY7ASEKsztilLrdc6c9fHfXAz+P1fGE+UMG+QWnWl MVcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KxvEbW/a; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10-v6si521928plz.290.2018.04.17.22.42.06; Tue, 17 Apr 2018 22:42:20 -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=pass header.i=@linaro.org header.s=google header.b=KxvEbW/a; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752319AbeDRFk5 (ORCPT + 99 others); Wed, 18 Apr 2018 01:40:57 -0400 Received: from mail-ot0-f193.google.com ([74.125.82.193]:46198 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751431AbeDRFkz (ORCPT ); Wed, 18 Apr 2018 01:40:55 -0400 Received: by mail-ot0-f193.google.com with SMTP id v64-v6so592447otb.13 for ; Tue, 17 Apr 2018 22:40:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oG//FFr5Dab5frSize0EFgVBoKLyqIy0FntReurNKfw=; b=KxvEbW/aydFJD5iLH92dXNwRdzuwxzWvzfHMiBEsrAG1QgoaDxbqbSpBQjjVSTuFJj 6OwvCivoFqr1zUxGshT6u/+L4OrP4yZzYQ5EIeKOYR26p7UEIujF94+7En3pJKB3V0H+ ZtvH7nktOIW14hR9+TagW2H72oZR8JWXHzjXk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oG//FFr5Dab5frSize0EFgVBoKLyqIy0FntReurNKfw=; b=XUmw547ZUlEtjQg09Fr2S+FiAe09kEA8pNZCl8VKPXoUpAor1ozlbF2dwXQqwP0A92 Gf3jJ+tJpk0Gi1FXUdCW+ViIBKy6V23mwSwhFM3ducC1VQ4vQn+bEFROoLgYAOyPa5rr KH6L1H7Vu8mYg3F/42b9hEx2143bQ7spye7NceWG+zSpWbc9HComilNtLcZYbTHaefEu ATUFkPphQM99pHWZy7Nx1arM8gfb+btqhVGiJ8S1hGL8tAGD3+PMy6M1lvi5Za3X5Hsk PB+/8hus4/qqhQzxujIr/K4lBPEDYAwCnXWrE8Muua716DHcTd4Le2iaYMnY6KDvAzaQ 5H4w== X-Gm-Message-State: ALQs6tBvpw3Ck5JsfK9Mve0gEIEOUVoj9bc+rOlnu5fYFrn0hkDecNoJ oKGi8ddci/p8Q8LBbUeCshstZdMMp8cHoDXCTErFxnhDUUk= X-Received: by 2002:a9d:5511:: with SMTP id l17-v6mr358702oth.159.1524030054984; Tue, 17 Apr 2018 22:40:54 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a9d:7081:0:0:0:0:0 with HTTP; Tue, 17 Apr 2018 22:40:54 -0700 (PDT) In-Reply-To: <5c951129-b167-3ed6-48f4-0a42cd2df28e@metafoo.de> References: <0a9fa618bd74e74c135ebee2e40b30d361c1d905.1523346135.git.baolin.wang@linaro.org> <5c951129-b167-3ed6-48f4-0a42cd2df28e@metafoo.de> From: Baolin Wang Date: Wed, 18 Apr 2018 13:40:54 +0800 Message-ID: Subject: Re: [PATCH 5/5] dmaengine: sprd: Add 'device_config' and 'device_prep_slave_sg' interfaces To: Lars-Peter Clausen Cc: Dan Williams , Vinod Koul , Eric Long , Mark Brown , dmaengine@vger.kernel.org, LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17 April 2018 at 18:45, Lars-Peter Clausen wrote: > On 04/10/2018 09:46 AM, Baolin Wang wrote: > [...] >> +static int sprd_dma_slave_config(struct dma_chan *chan, >> + struct dma_slave_config *config) >> +{ >> + struct sprd_dma_chn *schan = to_sprd_dma_chan(chan); >> + struct sprd_dma_config *slave_cfg = >> + container_of(config, struct sprd_dma_config, config); >> + > > Please do not overload standard API with custom semantics. This makes the > driver incompatible to the API and negates the whole idea of having a common > API. E.g. this will crash when somebody passes a normal dma_slave_config > struct to this function. > Yes, we have discussed with Vinod how to use 'dma_slave_config' to reach our requirements. Thanks for your comments. -- Baolin.wang Best Regards