Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752209AbbBKJMp (ORCPT ); Wed, 11 Feb 2015 04:12:45 -0500 Received: from mail-lb0-f172.google.com ([209.85.217.172]:65114 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751518AbbBKJMm (ORCPT ); Wed, 11 Feb 2015 04:12:42 -0500 MIME-Version: 1.0 In-Reply-To: <54DB1A3C.3050207@samsung.com> References: <1423498466-16718-1-git-send-email-ricardo.ribalda@gmail.com> <54DB0D84.7020600@samsung.com> <54DB1A3C.3050207@samsung.com> From: Ricardo Ribalda Delgado Date: Wed, 11 Feb 2015 10:12:20 +0100 Message-ID: Subject: Re: [PATCH 1/3] media/videobuf2-dma-sg: Fix handling of sg_table structure To: Marek Szyprowski Cc: Hans Verkuil , Pawel Osciak , Kyungmin Park , Mauro Carvalho Chehab , linux-media , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1204 Lines: 38 Hello again On Wed, Feb 11, 2015 at 10:00 AM, Marek Szyprowski wrote: > Well, this int return value seems to be misleading, but according to > Documentation/DMA-API.txt, the only error value is zero: > > "As with the other mapping interfaces, dma_map_sg() can fail. When it > does, 0 is returned and a driver must take appropriate action. It is > critical that the driver do something, in the case of a block driver > aborting the request or even oopsing is better than doing nothing and > corrupting the filesystem." > > I've also checked various dma-mapping implementation for different > architectures and they follow this convention. > > Maybe one should add some comments to include/linux/dma_mapping.h to > clarify this and avoid further confusion. > > Or maybe change it to unsigned int... Let me redo the patch and resend. I will also try to ping whoever is the maintainer of dma_mapping Thanks! -- Ricardo Ribalda -- 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/