Skip to content

Commit a4ddbd1

Browse files
David Kozubaxboe
authored andcommitted
block: sed-opal: add token for OPAL_LIFECYCLE
Define OPAL_LIFECYCLE token and use it instead of literals in get_lsp_lifecycle. Acked-by: Jon Derrick <jonathan.derrick@intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Scott Bauer <sbauer@plzdonthack.me> Signed-off-by: David Kozub <zub@linux.fjfi.cvut.cz> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 2855995 commit a4ddbd1

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎block/opal_proto.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ enum opal_token {
170170
OPAL_READLOCKED = 0x07,
171171
OPAL_WRITELOCKED = 0x08,
172172
OPAL_ACTIVEKEY = 0x0A,
173+
/* lockingsp table */
174+
OPAL_LIFECYCLE = 0x06,
173175
/* locking info table */
174176
OPAL_MAXRANGES = 0x04,
175177
/* mbr control */

‎block/sed-opal.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,12 +1786,12 @@ static int get_lsp_lifecycle(struct opal_dev *dev, void *data)
17861786

17871787
add_token_u8(&err, dev, OPAL_STARTNAME);
17881788
add_token_u8(&err, dev, 3); /* Start Column */
1789-
add_token_u8(&err, dev, 6); /* Lifecycle Column */
1789+
add_token_u8(&err, dev, OPAL_LIFECYCLE);
17901790
add_token_u8(&err, dev, OPAL_ENDNAME);
17911791

17921792
add_token_u8(&err, dev, OPAL_STARTNAME);
17931793
add_token_u8(&err, dev, 4); /* End Column */
1794-
add_token_u8(&err, dev, 6); /* Lifecycle Column */
1794+
add_token_u8(&err, dev, OPAL_LIFECYCLE);
17951795
add_token_u8(&err, dev, OPAL_ENDNAME);
17961796

17971797
add_token_u8(&err, dev, OPAL_ENDLIST);

0 commit comments

Comments
 (0)