From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755902AbcHWUmi (ORCPT ); Tue, 23 Aug 2016 16:42:38 -0400 Received: from mail.kapsi.fi ([217.30.184.167]:49719 "EHLO mail.kapsi.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755788AbcHWUmf (ORCPT ); Tue, 23 Aug 2016 16:42:35 -0400 Date: Tue, 23 Aug 2016 23:42:32 +0300 From: Mikko Rapeli To: Bart Van Assche Cc: "linux-kernel@vger.kernel.org" , "dm-devel@redhat.com" , Mike Snitzer , Alasdair Kergon Subject: Re: [dm-devel] [PATCH v05 04/72] dm-log-userspace.h: use __u32, __s32 and __u64 from linux/types.h Message-ID: <20160823204232.GP5399@lakka.kapsi.fi> References: <1471890809-4383-1-git-send-email-mikko.rapeli@iki.fi> <1471890809-4383-5-git-send-email-mikko.rapeli@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2001:1bc8:1004::1 X-SA-Exim-Mail-From: mikko.rapeli@iki.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 23, 2016 at 02:28:19PM +0000, Bart Van Assche wrote: > On 08/23/16 06:57, Bart Van Assche wrote: > > On 08/22/16 11:32, Mikko Rapeli wrote: > >> - * uint32_t (*get_region_size)(struct dm_dirty_log *log); > >> + * __u32 (*get_region_size)(struct dm_dirty_log *log); > > > > uint32_t is a type that is defined by ANSI C but __u32 not. So this > > change looks wrong to me. Would it have been sufficient to add "#include > > " and keep the uint32_t etc. type names? > > Answering my own question: adding "#include " wouldn't be > sufficient. How about adding the following code that also occurs in a > few other uapi header files? > > #ifndef __KERNEL__ > #include > #endif > #include I have tried that before but I was instructed to use the linux/types.h versions. For example https://lkml.org/lkml/2015/6/1/160 But lately drm and fuse and some others have questioned this approach and would like to use/continue using C99 stdint.h types. -Mikko