Skip to content

Commit

Permalink
prov/rxm: fix definition of the rxm SAR segment enum
Browse files Browse the repository at this point in the history
The rxm SAR segment type enum was defined inside another struct.
While techincally ok, this made it difficult for editors to find
the type and reported compiler errors. This cleans it up to make
it more readible and easier for editors to find the type

Signed-off-by: Alexia Ingerson <[email protected]>
  • Loading branch information
aingerson committed Dec 6, 2024
1 parent 0931d06 commit 335829f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions prov/rxm/src/rxm.h
Original file line number Diff line number Diff line change
Expand Up @@ -417,13 +417,15 @@ struct rxm_pkt {
char data[];
};

enum rxm_sar_seg_type {
RXM_SAR_SEG_FIRST = 1,
RXM_SAR_SEG_MIDDLE = 2,
RXM_SAR_SEG_LAST = 3,
};

union rxm_sar_ctrl_data {
struct {
enum rxm_sar_seg_type {
RXM_SAR_SEG_FIRST = 1,
RXM_SAR_SEG_MIDDLE = 2,
RXM_SAR_SEG_LAST = 3,
} seg_type : 2;
enum rxm_sar_seg_type seg_type : 2;
uint32_t offset;
};
uint64_t align;
Expand Down

0 comments on commit 335829f

Please sign in to comment.