From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B226FEB8FAF for ; Wed, 6 Sep 2023 12:17:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AA20410E623; Wed, 6 Sep 2023 12:17:42 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 59C7310E625 for ; Wed, 6 Sep 2023 12:17:41 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9C681106F; Wed, 6 Sep 2023 05:18:18 -0700 (PDT) Received: from [10.57.36.163] (unknown [10.57.36.163]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DE5323F67D; Wed, 6 Sep 2023 05:17:38 -0700 (PDT) Message-ID: <89be8f8f-7c4e-4efd-0b7b-c30bcfbf1d23@arm.com> Date: Wed, 6 Sep 2023 14:18:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 From: Ketil Johnsen Subject: Re: [PATCH v2 02/15] drm/panthor: Add uAPI To: Boris Brezillon , dri-devel@lists.freedesktop.org References: <20230809165330.2451699-1-boris.brezillon@collabora.com> <20230809165330.2451699-3-boris.brezillon@collabora.com> Content-Language: en-US In-Reply-To: <20230809165330.2451699-3-boris.brezillon@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , Nicolas Boichat , Daniel Stone , Liviu Dudau , Steven Price , =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= , "Marty E . Plummer" , Robin Murphy , Faith Ekstrand Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 8/9/23 18:53, Boris Brezillon wrote: > +enum drm_panthor_sync_op_flags { > + /** @DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_MASK: Synchronization handle type mask. */ > + DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_MASK = 0xff, > + > + /** @DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_SYNCOBJ: Synchronization object type. */ > + DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_SYNCOBJ = 0, > + > + /** > + * @DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_TIMELINE_SYNCOBJ: Timeline synchronization > + * object type. > + */ > + DRM_PANTHOR_SYNC_OP_HANDLE_TYPE_TIMELINE_SYNCOBJ = 1, > + > + /** @DRM_PANTHOR_SYNC_OP_WAIT: Wait operation. */ > + DRM_PANTHOR_SYNC_OP_WAIT = 0 << 31, > + > + /** @DRM_PANTHOR_SYNC_OP_SIGNAL: Signal operation. */ > + DRM_PANTHOR_SYNC_OP_SIGNAL = 1 << 31, > +}; We get an issue with --pedantic here: warning: enumerator value for 'DRM_PANTHOR_SYNC_OP_SIGNAL' is not an integer constant expression [-Wpedantic] Would be god to get rid of this, so user space can include this header without disabling pedantic. Either we can stop using the top most bit or a cast value like "(int)(1U << 31)" > + /** > + * @DRM_PANTHOR_VM_BIND_OP_TYPE_MASK: Mask used to determine the type of operation. > + */ > + DRM_PANTHOR_VM_BIND_OP_TYPE_MASK = 0xf << 28, Same issue for this member. Either not use the top most bit or cast value like "(int)(0xfU << 28)" avoids the pedantic warning. -- Regards, Ketil Johnsen