From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3006741D5F; Fri, 24 Feb 2023 16:12:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A1FF242D13; Fri, 24 Feb 2023 16:12:21 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 6604F41153 for ; Fri, 24 Feb 2023 16:12:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677251537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+QC5N7fdw2YpcSZdVy5nwVTTnJpJG+iHrtpsW8GzoNI=; b=UJR7Sctd7wo2qSn2lIfh2NdRREDBJgv1oz2jI+xIvg2EYEFoYTPMKAfn/0s1Wc7bkNZvt4 GHJva6a4KAoVsEMjNVRdhIVkx68s3VgnjAxIEwQ94HU9bzDjE9sL3asMy3scOBmibf2Irs iyU/aPsyL2l9IbIzRFNqyF2E7T3j33c= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-245-0Dx0SF-qOnWwLKEhQHxNfA-1; Fri, 24 Feb 2023 10:12:12 -0500 X-MC-Unique: 0Dx0SF-qOnWwLKEhQHxNfA-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BF2E3100F901; Fri, 24 Feb 2023 15:12:11 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.55]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0393A2166B29; Fri, 24 Feb 2023 15:12:10 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, Rahul Lakkireddy Subject: [PATCH v2 07/20] net/cxgbe: inherit lock annotations Date: Fri, 24 Feb 2023 16:11:30 +0100 Message-Id: <20230224151143.3274897-8-david.marchand@redhat.com> In-Reply-To: <20230224151143.3274897-1-david.marchand@redhat.com> References: <20230224081642.2566619-1-david.marchand@redhat.com> <20230224151143.3274897-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Due to clang limitation, inline helpers don't inherit lock annotations from the EAL lock API. Replace them with macros. Signed-off-by: David Marchand --- drivers/net/cxgbe/base/adapter.h | 35 +++++++------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) diff --git a/drivers/net/cxgbe/base/adapter.h b/drivers/net/cxgbe/base/adapter.h index 16cbc1a345..8f2ffa0eeb 100644 --- a/drivers/net/cxgbe/base/adapter.h +++ b/drivers/net/cxgbe/base/adapter.h @@ -351,28 +351,19 @@ struct adapter { * t4_os_rwlock_init - initialize rwlock * @lock: the rwlock */ -static inline void t4_os_rwlock_init(rte_rwlock_t *lock) -{ - rte_rwlock_init(lock); -} +#define t4_os_rwlock_init(lock) rte_rwlock_init(lock) /** * t4_os_write_lock - get a write lock * @lock: the rwlock */ -static inline void t4_os_write_lock(rte_rwlock_t *lock) -{ - rte_rwlock_write_lock(lock); -} +#define t4_os_write_lock(lock) rte_rwlock_write_lock(lock) /** * t4_os_write_unlock - unlock a write lock * @lock: the rwlock */ -static inline void t4_os_write_unlock(rte_rwlock_t *lock) -{ - rte_rwlock_write_unlock(lock); -} +#define t4_os_write_unlock(lock) rte_rwlock_write_unlock(lock) /** * ethdev2pinfo - return the port_info structure associated with a rte_eth_dev @@ -678,37 +669,25 @@ static inline void t4_os_set_hw_addr(struct adapter *adapter, int port_idx, * t4_os_lock_init - initialize spinlock * @lock: the spinlock */ -static inline void t4_os_lock_init(rte_spinlock_t *lock) -{ - rte_spinlock_init(lock); -} +#define t4_os_lock_init(lock) rte_spinlock_init(lock) /** * t4_os_lock - spin until lock is acquired * @lock: the spinlock */ -static inline void t4_os_lock(rte_spinlock_t *lock) -{ - rte_spinlock_lock(lock); -} +#define t4_os_lock(lock) rte_spinlock_lock(lock) /** * t4_os_unlock - unlock a spinlock * @lock: the spinlock */ -static inline void t4_os_unlock(rte_spinlock_t *lock) -{ - rte_spinlock_unlock(lock); -} +#define t4_os_unlock(lock) rte_spinlock_unlock(lock) /** * t4_os_trylock - try to get a lock * @lock: the spinlock */ -static inline int t4_os_trylock(rte_spinlock_t *lock) -{ - return rte_spinlock_trylock(lock); -} +#define t4_os_trylock(lock) rte_spinlock_trylock(lock) /** * t4_os_init_list_head - initialize -- 2.39.2