Skip to content

Commit 1237075

Browse files
committed
dmaengine: sdxi: Renaming: (l1, l2) -> (L1, L2)
Depart slightly from local naming convention to make things less ambiguous for reviewers. (Is it l1 or 11? l2 or 12?) sdxi_cxt_l2_ent -> sdxi_cxt_L2_ent sdxi_cxt_l2_table -> sdxi_cxt_L2_table sdxi_cxt_l1_ent -> sdxi_cxt_L1_ent sdxi_cxt_l1_table -> sdxi_cxt_L1_table Signed-off-by: Nathan Lynch <nathan.lynch@amd.com>
1 parent bb80a13 commit 1237075

4 files changed

Lines changed: 18 additions & 18 deletions

File tree

drivers/dma/sdxi/context.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ struct sdxi_cxt_L1_cfg {
173173
bool pv;
174174
};
175175

176-
static int configure_L1_entry(struct sdxi_cxt_l1_ent *ent,
176+
static int configure_L1_entry(struct sdxi_cxt_L1_ent *ent,
177177
const struct sdxi_cxt_L1_cfg *cfg)
178178
{
179179
u64 cxt_ctl_ptr, akey_ptr;
@@ -213,7 +213,7 @@ static int configure_L1_entry(struct sdxi_cxt_l1_ent *ent,
213213
return 0;
214214
}
215215

216-
static void invalidate_L1_entry(struct sdxi_cxt_l1_ent *ent)
216+
static void invalidate_L1_entry(struct sdxi_cxt_L1_ent *ent)
217217
{
218218
u64 cxt_ctl_ptr = le64_to_cpu(ent->cxt_ctl_ptr);
219219

@@ -232,7 +232,7 @@ static int sdxi_publish_cxt(const struct sdxi_cxt *cxt)
232232
{
233233
struct sdxi_cxt_ctl_cfg ctl_cfg;
234234
struct sdxi_cxt_L1_cfg L1_cfg;
235-
struct sdxi_cxt_l1_ent *ent;
235+
struct sdxi_cxt_L1_ent *ent;
236236
u8 l1_idx;
237237
int err;
238238

@@ -277,7 +277,7 @@ static int sdxi_publish_cxt(const struct sdxi_cxt *cxt)
277277
static void sdxi_rescind_cxt(struct sdxi_cxt *cxt)
278278
{
279279
u8 l1_idx = ID_TO_L1_INDEX(cxt->id);
280-
struct sdxi_cxt_l1_ent *ent = &cxt->sdxi->L1_table->entry[l1_idx];
280+
struct sdxi_cxt_L1_ent *ent = &cxt->sdxi->L1_table->entry[l1_idx];
281281

282282
invalidate_L1_entry(ent);
283283
invalidate_cxtl_ctl(cxt->cxt_ctl);

drivers/dma/sdxi/device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static int sdxi_dev_stop(struct sdxi_dev *sdxi)
164164
*/
165165
static int sdxi_fn_activate(struct sdxi_dev *sdxi)
166166
{
167-
struct sdxi_cxt_l2_ent *L2_ent;
167+
struct sdxi_cxt_L2_ent *L2_ent;
168168
u64 lv01_ptr, version, cxt_l2, cap0, cap1, ctl2;
169169
int err;
170170

drivers/dma/sdxi/hw.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
* Names of structures, members, and subfields (bit ranges within
1010
* members) are written to match the spec, generally. E.g. struct
11-
* sdxi_cxt_l2_ent corresponds to CXT_L2_ENT in the spec.
11+
* sdxi_cxt_L2_ent corresponds to CXT_L2_ENT in the spec.
1212
*
1313
* Note: a member can have a subfield whose name is identical to the
1414
* member's name. E.g. CXT_L2_ENT's lv01_ptr.
@@ -30,22 +30,22 @@
3030
#include <asm/byteorder.h>
3131

3232
/* SDXI 1.0 Table 3-2: Context Level 2 Table Entry (CXT_L2_ENT) */
33-
struct sdxi_cxt_l2_ent {
33+
struct sdxi_cxt_L2_ent {
3434
__le64 lv01_ptr;
3535
#define SDXI_CXT_L2_ENT_VL BIT_ULL(0)
3636
#define SDXI_CXT_L2_ENT_LV01_PTR GENMASK_ULL(63, 12)
3737
} __packed;
38-
static_assert(sizeof(struct sdxi_cxt_l2_ent) == 8);
38+
static_assert(sizeof(struct sdxi_cxt_L2_ent) == 8);
3939

4040
/* SDXI 1.0 3.2.1 Context Level 2 Table */
4141
#define SDXI_L2_TABLE_ENTRIES 512
42-
struct sdxi_cxt_l2_table {
43-
struct sdxi_cxt_l2_ent entry[SDXI_L2_TABLE_ENTRIES];
42+
struct sdxi_cxt_L2_table {
43+
struct sdxi_cxt_L2_ent entry[SDXI_L2_TABLE_ENTRIES];
4444
};
45-
static_assert(sizeof(struct sdxi_cxt_l2_table) == 4096);
45+
static_assert(sizeof(struct sdxi_cxt_L2_table) == 4096);
4646

4747
/* SDXI 1.0 Table 3-3: Context Level 1 Table Entry (CXT_L1_ENT) */
48-
struct sdxi_cxt_l1_ent {
48+
struct sdxi_cxt_L1_ent {
4949
__le64 cxt_ctl_ptr;
5050
#define SDXI_CXT_L1_ENT_VL BIT_ULL(0)
5151
#define SDXI_CXT_L1_ENT_KA BIT_ULL(1)
@@ -60,14 +60,14 @@ struct sdxi_cxt_l1_ent {
6060
__le32 opb_000_enb;
6161
__u8 rsvd_0[8];
6262
} __packed;
63-
static_assert(sizeof(struct sdxi_cxt_l1_ent) == 32);
63+
static_assert(sizeof(struct sdxi_cxt_L1_ent) == 32);
6464

6565
/* SDXI 1.0 3.2.2 Context Level 1 Table */
6666
#define SDXI_L1_TABLE_ENTRIES 128
67-
struct sdxi_cxt_l1_table {
68-
struct sdxi_cxt_l1_ent entry[SDXI_L1_TABLE_ENTRIES];
67+
struct sdxi_cxt_L1_table {
68+
struct sdxi_cxt_L1_ent entry[SDXI_L1_TABLE_ENTRIES];
6969
};
70-
static_assert(sizeof(struct sdxi_cxt_l1_table) == 4096);
70+
static_assert(sizeof(struct sdxi_cxt_L1_table) == 4096);
7171

7272
/* SDXI 1.0 Table 3-4: Context Control (CXT_CTL) */
7373
struct sdxi_cxt_ctl {

drivers/dma/sdxi/sdxi.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ struct sdxi_dev {
103103
u32 op_grp_cap; /* supported operatation group cap */
104104

105105
/* context management */
106-
struct sdxi_cxt_l2_table *L2_table;
106+
struct sdxi_cxt_L2_table *L2_table;
107107
dma_addr_t L2_dma;
108-
struct sdxi_cxt_l1_table *L1_table;
108+
struct sdxi_cxt_L1_table *L1_table;
109109
dma_addr_t L1_dma;
110110

111111
struct dma_pool *write_index_pool;

0 commit comments

Comments
 (0)