From: Alex Elder <elder@linaro.org>
To: davem@davemloft.net, kuba@kernel.org
Cc: bjorn.andersson@linaro.org, evgreen@chromium.org,
cpratapa@codeaurora.org, subashab@codeaurora.org,
elder@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next 05/12] net: ipa: combine resource type definitions
Date: Fri, 26 Mar 2021 10:11:15 -0500 [thread overview]
Message-ID: <20210326151122.3121383-6-elder@linaro.org> (raw)
In-Reply-To: <20210326151122.3121383-1-elder@linaro.org>
Combine the ipa_resource_type_src and ipa_resource_type_dst
enumerated types into a single enumerated type, ipa_resource_type.
Assign value 0 to the first element for the source and destination
types, so their numeric values are preserved. Add some additional
commentary where these are defined, stating explicitly that code
assumes the first source and first destination member must have
numeric value 0.
Fix the kerneldoc comments for the ipa_gsi_endpoint_data structure.
Signed-off-by: Alex Elder <elder@linaro.org>
---
drivers/net/ipa/ipa_data.h | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ipa/ipa_data.h b/drivers/net/ipa/ipa_data.h
index 7816583fc14aa..ccd7fd0b801aa 100644
--- a/drivers/net/ipa/ipa_data.h
+++ b/drivers/net/ipa/ipa_data.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2012-2018, The Linux Foundation. All rights reserved.
- * Copyright (C) 2019-2020 Linaro Ltd.
+ * Copyright (C) 2019-2021 Linaro Ltd.
*/
#ifndef _IPA_DATA_H_
#define _IPA_DATA_H_
@@ -177,12 +177,12 @@ struct ipa_endpoint_data {
/**
* struct ipa_gsi_endpoint_data - GSI channel/IPA endpoint data
- * ee: GSI execution environment ID
- * channel_id: GSI channel ID
- * endpoint_id: IPA endpoint ID
- * toward_ipa: direction of data transfer
- * gsi: GSI channel configuration data (see above)
- * ipa: IPA endpoint configuration data (see above)
+ * @ee_id: GSI execution environment ID
+ * @channel_id: GSI channel ID
+ * @endpoint_id: IPA endpoint ID
+ * @toward_ipa: direction of data transfer
+ * @channel: GSI channel configuration data (see above)
+ * @endpoint: IPA endpoint configuration data (see above)
*/
struct ipa_gsi_endpoint_data {
u8 ee_id; /* enum gsi_ee_id */
@@ -194,18 +194,17 @@ struct ipa_gsi_endpoint_data {
struct ipa_endpoint_data endpoint;
};
-/** enum ipa_resource_type_src - source resource types */
-enum ipa_resource_type_src {
- IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS,
+/** enum ipa_resource_type - IPA resource types */
+enum ipa_resource_type {
+ /* Source resource types; first must have value 0 */
+ IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS = 0,
IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS,
IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_BUFF,
IPA_RESOURCE_TYPE_SRC_HPS_DMARS,
IPA_RESOURCE_TYPE_SRC_ACK_ENTRIES,
-};
-/** enum ipa_resource_type_dst - destination resource types */
-enum ipa_resource_type_dst {
- IPA_RESOURCE_TYPE_DST_DATA_SECTORS,
+ /* Destination resource types; first must have value 0 */
+ IPA_RESOURCE_TYPE_DST_DATA_SECTORS = 0,
IPA_RESOURCE_TYPE_DST_DPS_DMARS,
};
@@ -225,7 +224,7 @@ struct ipa_resource_limits {
* @limits: array of limits to use for each resource group
*/
struct ipa_resource_src {
- enum ipa_resource_type_src type;
+ enum ipa_resource_type type; /* IPA_RESOURCE_TYPE_SRC_* */
struct ipa_resource_limits limits[IPA_RESOURCE_GROUP_SRC_MAX];
};
@@ -235,7 +234,7 @@ struct ipa_resource_src {
* @limits: array of limits to use for each resource group
*/
struct ipa_resource_dst {
- enum ipa_resource_type_dst type;
+ enum ipa_resource_type type; /* IPA_RESOURCE_TYPE_DST_* */
struct ipa_resource_limits limits[IPA_RESOURCE_GROUP_DST_MAX];
};
--
2.27.0
next prev parent reply other threads:[~2021-03-26 15:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-26 15:11 [PATCH net-next 00/12] net: ipa: rework resource programming Alex Elder
2021-03-26 15:11 ` [PATCH net-next 01/12] net: ipa: introduce ipa_resource.c Alex Elder
2021-03-26 15:11 ` [PATCH net-next 02/12] net: ipa: fix bug in resource group limit programming Alex Elder
2021-03-26 15:11 ` [PATCH net-next 03/12] net: ipa: identify resource groups Alex Elder
2021-03-26 15:11 ` [PATCH net-next 04/12] net: ipa: add some missing resource limits Alex Elder
2021-03-26 15:11 ` Alex Elder [this message]
2021-03-26 15:11 ` [PATCH net-next 06/12] net: ipa: index resource limits with type Alex Elder
2021-03-26 15:11 ` [PATCH net-next 07/12] net: ipa: move ipa_resource_type definition Alex Elder
2021-03-26 15:11 ` [PATCH net-next 08/12] net: ipa: combine source and destination group limits Alex Elder
2021-03-26 15:11 ` [PATCH net-next 09/12] net: ipa: combine source and destation resource types Alex Elder
2021-03-26 15:11 ` [PATCH net-next 10/12] net: ipa: pass data for source and dest resource config Alex Elder
2021-03-26 15:11 ` [PATCH net-next 11/12] net: ipa: record number of groups in data Alex Elder
2021-03-26 15:11 ` [PATCH net-next 12/12] net: ipa: support more than 6 resource groups Alex Elder
2021-03-26 22:10 ` [PATCH net-next 00/12] net: ipa: rework resource programming patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210326151122.3121383-6-elder@linaro.org \
--to=elder@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=cpratapa@codeaurora.org \
--cc=davem@davemloft.net \
--cc=elder@kernel.org \
--cc=evgreen@chromium.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=subashab@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).