Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755973Ab2HFMmf (ORCPT ); Mon, 6 Aug 2012 08:42:35 -0400 Received: from mailout1.w1.samsung.com ([210.118.77.11]:57109 "EHLO mailout1.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752789Ab2HFMmd (ORCPT ); Mon, 6 Aug 2012 08:42:33 -0400 Message-id: <501FBBB4.6000109@samsung.com> Date: Mon, 06 Aug 2012 14:42:28 +0200 From: Tomasz Stanislawski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-version: 1.0 To: Michal Nazarewicz Cc: Rob Clark , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linaro-mm-sig@lists.linaro.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, patches@linaro.org, linux@arm.linux.org.uk, arnd@arndb.de, jesse.barker@linaro.org, m.szyprowski@samsung.com, daniel@ffwll.ch, sumit.semwal@ti.com, maarten.lankhorst@canonical.com, Rob Clark Subject: Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms References: <1342715014-5316-1-git-send-email-rob.clark@linaro.org> <1342715014-5316-3-git-send-email-rob.clark@linaro.org> <501F9C8E.4080002@samsung.com> In-reply-to: Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-TM-AS-MML: No Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 745 Lines: 25 On 08/06/2012 01:58 PM, Michal Nazarewicz wrote: > > Tomasz Stanislawski writes: >> I recommend to change the semantics for unlimited number of segments >> from 'value 0' to: >> >> #define DMA_SEGMENTS_COUNT_UNLIMITED ((unsigned long)INT_MAX) Sorry. It should be: #define DMA_SEGMENTS_COUNT_UNLIMITED ((unsigned int)INT_MAX) >> >> Using INT_MAX will allow using safe conversions between signed and >> unsigned integers. > > LONG_MAX seems cleaner regardless. > > > -- 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/