Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752604AbbBSH5a (ORCPT ); Thu, 19 Feb 2015 02:57:30 -0500 Received: from mail-vc0-f176.google.com ([209.85.220.176]:34490 "EHLO mail-vc0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751945AbbBSH52 (ORCPT ); Thu, 19 Feb 2015 02:57:28 -0500 MIME-Version: 1.0 In-Reply-To: <1416231775-31252-60-git-send-email-maxime.ripard@free-electrons.com> References: <1416231775-31252-1-git-send-email-maxime.ripard@free-electrons.com> <1416231775-31252-60-git-send-email-maxime.ripard@free-electrons.com> Date: Thu, 19 Feb 2015 15:57:27 +0800 X-Google-Sender-Auth: O7q1CvJvB5tQLxMlZfE6rEvKhdQ Message-ID: Subject: Re: [PATCH v5 59/61] dmaengine: Add a warning for drivers not using the generic slave caps retrieval From: Viresh Kumar To: Maxime Ripard , bloften80@gmail.com, jdelvare@suse.de Cc: Vinod Koul , dmaengine@vger.kernel.org, "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , Laurent Pinchart , =?ISO-8859-1?Q?Antoine_T=E9nart?= , Russell King , Lars-Peter Clausen Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1524 Lines: 38 On Mon, Nov 17, 2014 at 9:42 PM, Maxime Ripard wrote: > For the slave caps retrieval to be really useful, most drivers need to > implement it. > > Hence, we need to be slightly more aggressive, and trigger a warning at > registration time for drivers that don't fill their caps infos in order to > encourage them to implement it. > > Signed-off-by: Maxime Ripard > Acked-by: Laurent Pinchart > --- > drivers/dma/dmaengine.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c > index 98e9431f85ec..300c8cd2786c 100644 > --- a/drivers/dma/dmaengine.c > +++ b/drivers/dma/dmaengine.c > @@ -827,6 +827,9 @@ int dma_async_device_register(struct dma_device *device) > BUG_ON(!device->device_issue_pending); > BUG_ON(!device->dev); > > + WARN(dma_has_cap(DMA_SLAVE, device->cap_mask) && !device->directions, > + "this driver doesn't support generic slave capabilities reporting\n"); > + > /* note: this only matters in the > * CONFIG_ASYNC_TX_ENABLE_CHANNEL_SWITCH=n case > */ Probably you need to fix this ? https://bugzilla.kernel.org/show_bug.cgi?id=90801 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/