From patchwork Thu Oct 1 08:21:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= X-Patchwork-Id: 255470 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD934C4727C for ; Thu, 1 Oct 2020 08:21:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 81B04208B8 for ; Thu, 1 Oct 2020 08:21:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=silabs.onmicrosoft.com header.i=@silabs.onmicrosoft.com header.b="iqF+lv9G" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731611AbgJAIV5 (ORCPT ); Thu, 1 Oct 2020 04:21:57 -0400 Received: from mail-eopbgr750075.outbound.protection.outlook.com ([40.107.75.75]:58753 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725894AbgJAIV4 (ORCPT ); Thu, 1 Oct 2020 04:21:56 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Hmf44o7/7XFZmBiYTsM9FthHI2/h0EzDpwGj6rt4RblGYYU25/7yFadyuae+Hv0GjVU4oj2QNRlrB1OVJOo1oB/v0w2Pw5R0dyJd2MVDp/M92E6ibdpY9yQeDxjegVdOtqjGtgZ1QORIaZiNxGx85Yv2dK0I5nbT/X5H25TrWyLuAcOtl/7rlpixAgqz5wpxdR8buYt9UlwrkVKyurFsDa7EebcfENNtzTRluF6E0oXVXLu4H78MSrJnOmqqDTnH2OqduuBdmQaj/KwBkjAWaUTJLx3QHe7cIuVBTs3FCE1hBxorHwiTpEsZZM/Cym6Jut3DFnu/80LFFeoYgyKsLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5OXQNVWsE3OGIQJmMbzo7IwXQN/TwMiJA/unJhBImi0=; b=XJIiQwpYbVPr76PtEsUS0sezeXn4oARhwB47Gmpg/YQzv4t+TOneVQwXiPHvsDe0mXoGuKg3OZhdOi1kh2sRvQkf5p2uuLXAU6+Xwwg11GOp9sfz+E9SWqmG1Z37tR/hc9xCDy4TnzLcwjNUV8gpnejLMDTf5N/2WmkQ9OLU+g6q1VJtf5ubdscxhfrmI4vZDBUsPdFJk53E4QUP1yFxwZCuKYqugaiY2oJFk6mDrvCq+wCVuPC90QP9zfBabn68+3c+4jnKuZTee1jAdBt+3SOdXl0KKnLIdfvF8jGgjk/Cylt5KmGtfxlLllan6FYOXWFS2DEKAFP0CI2WGjdAng== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5OXQNVWsE3OGIQJmMbzo7IwXQN/TwMiJA/unJhBImi0=; b=iqF+lv9GNR6kaoUFPY/SRvkn3ERp45Hu//e1dSbWrtc9GIHj0MZf3fiSX8K60kkIak7KZXscLdtvRQj8RQMApQA5I7d+cOrMWskP6lPTOMl1mm2QQPXm9HWolRCk1/GnsGaEAK1Y6Nfy7We9aLD7j8/Fff/CCNEbKK9H3ABPf6s= Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none; vger.kernel.org; dmarc=none action=none header.from=silabs.com; Received: from SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) by SA0PR11MB4574.namprd11.prod.outlook.com (2603:10b6:806:71::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.34; Thu, 1 Oct 2020 08:21:54 +0000 Received: from SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a]) by SN6PR11MB2718.namprd11.prod.outlook.com ([fe80::4f5:fbe5:44a7:cb8a%5]) with mapi id 15.20.3412.029; Thu, 1 Oct 2020 08:21:54 +0000 From: Jerome Pouiller To: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org, Daniel Vetter , Martin Liu , Sumit Semwal , =?utf-8?b?SsOpcsO0bWUg?= =?utf-8?q?Pouiller?= Subject: [PATCH] dma-buf: fix compilation of the userspace header Date: Thu, 1 Oct 2020 10:21:38 +0200 Message-Id: <20201001082138.381495-1-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.28.0 X-Originating-IP: [2a01:e35:2435:66a0:d660:ad2d:93af:2700] X-ClientProxiedBy: AM6P192CA0078.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::19) To SN6PR11MB2718.namprd11.prod.outlook.com (2603:10b6:805:63::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pc-42.home (2a01:e35:2435:66a0:d660:ad2d:93af:2700) by AM6P192CA0078.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.32 via Frontend Transport; Thu, 1 Oct 2020 08:21:52 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d647eaee-eded-408b-8ff5-08d865e30dbf X-MS-TrafficTypeDiagnostic: SA0PR11MB4574: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:4941; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ZFtrAWvmcF+J9oo3Ph3Quwo5LkkLqy5FvwEglyUqt0Du2HShhovArGDhKu6xZuxqKwyu+sEcVfEU+LOFyCojXQ+O9UKsOvg3JgBNHZ6cew9n6vroKNHySqD7cXFNC91uzY5VoGifQ9ak9Wk97BNxXV0DIMVWaM0n9EBSuUFmWaV6oyWGxn27B57VobIgdDMOC0CT43g5cOQdn5cs7GPObeAtf6EqkywwKPWLnAI4Ptlxdn++cDqAhlhFX+orrvRNuyvSm6A30qSoP+xjxlfWD76KdUuNYhTKKUxYqGiUEquei4LtH0W32cKtV15a3xVvh3MtmQHMVLTjgAKJjaUf/Q== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2718.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(376002)(366004)(346002)(136003)(39850400004)(396003)(8676002)(36756003)(6486002)(4326008)(6916009)(66556008)(8886007)(8936002)(478600001)(86362001)(66946007)(66476007)(52116002)(6666004)(5660300002)(6506007)(1076003)(186003)(316002)(2906002)(54906003)(16526019)(107886003)(6512007)(83380400001)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: eyaOS4C/8KQcNnPToR4E3yQLuuTozfPtrNTevhH3EwJqqVyw40EJ9Vopy/2jwGxoms7Y+nO8ykPXGux9JGgp75wlje9zUCwlFLCo7WgjOWkMYKxJyvKB8r/SK5BkfN+nNvMB85wXSnVx/Mrdq6yxaof26859uU0XUbRlouCC+SgR4rvZ0A5Lk6FIJ3Ig5AA8RYJt05nlj/w/RYd6oSRxZUgj2/c58P54UaiLjv2gc6NVcU2KkYOjuQwzg/2M2WAahkFxQjB1TEfc66dgI4bM5tdyKN1/glu5IynJ2DVn4O7Oow9rWXWFEKW7aqaFQaW6BCK47No0WboKgWUb3R0aoiCfCO6GL3PtbhpkXJj8yxIIcE3ont8VUoR+CacseV0uwt0x9K47HeUFSYZquJ9GJiy9qiQNF61G8M/E95XtFy2w+UpwqNZGXkJ7/Wke50B0zgPLJCGkCzUhUfTOGIqiLNXgcRp1tHgagtvDj/Z6gLGz+66No0CBhHZDV9J8nkLuzpKbTY09edX7AGVAt7+4VN2dmMg8T6ALUBabAc5Xrl7wj1+xG0evvJXTSqzzP2+hKTG/ZM7zAbjXuLwWLW6FK4kyA9lh1qmbK9MKe76KfhhLdYyZJqc53Atrieim6nA8QfJLKMN9TO5X8crgwRAXtTrDrJI77RwLjCQzkbt+PzWt7t6soUfyMoIkR72fq61aVHcR3nVNLze+tGWiHVzNzQ== X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: d647eaee-eded-408b-8ff5-08d865e30dbf X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2718.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2020 08:21:53.8842 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: POj5u/Q2IO6W4t77GGzGOoG56vBnNoVWPOSFinrltRNnI/L7qAQWDe6xzCcE6ardQX4oCa4egcOHECEScDNxmg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR11MB4574 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Jérôme Pouiller The typedefs u{8,16,32,64} do not exist in userspace. However, the ioctls DMA_BUF_SET_NAME_A and DMA_BUF_SET_NAME_B use them. So, currently, these ioctl cannot be directly called from userspace code: ioctls_list.c:436:29: error: ‘u32’ undeclared here (not in a function) 436 | { DMA_BUF_SET_NAME_A, -1, -1 }, // linux/dma-buf.h | ^~~~~~~~~~~~~~~~~~ ioctls_list.c:437:29: error: ‘u64’ undeclared here (not in a function) 437 | { DMA_BUF_SET_NAME_B, -1, -1 }, // linux/dma-buf.h | ^~~~~~~~~~~~~~~~~~ Replacing u32/u64 by __u32/__u64 is sufficient to solve the problem. Fixes: c11e391da2a8 ("dma-buf: Add ioctls to allow userspace to flush") Signed-off-by: Jérôme Pouiller --- include/uapi/linux/dma-buf.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/dma-buf.h b/include/uapi/linux/dma-buf.h index 7f30393b92c3..f76d11725c6c 100644 --- a/include/uapi/linux/dma-buf.h +++ b/include/uapi/linux/dma-buf.h @@ -44,7 +44,7 @@ struct dma_buf_sync { * between them in actual uapi, they're just different numbers. */ #define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *) -#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32) -#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64) +#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, __u32) +#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, __u64) #endif