]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
nvme: Fix for fdpa reserved field printing
authorBrandon Paupore <brandon.paupore@wdc.com>
Wed, 20 Sep 2023 15:00:19 +0000 (10:00 -0500)
committerDaniel Wagner <wagi@monom.org>
Mon, 25 Sep 2023 08:57:34 +0000 (10:57 +0200)
Noticed this when adding similar behavior for phy_rx_eom_log's odp, it
doesn't make much sense to right-shift the byte by 8.

Signed-off-by: Brandon Paupore <brandon.paupore@wdc.com>
nvme-print-stdout.c

index 59ffa63c563d5415ca28a1b5db5d907a0b94bb69..dd5d7dccbb66fe2df1315a085f5d0f5c3577fb43 100644 (file)
@@ -735,7 +735,7 @@ static void stdout_media_unit_stat_log(struct nvme_media_unit_stat_log *mus_log)
 static void stdout_fdp_config_fdpa(uint8_t fdpa)
 {
        __u8 valid = (fdpa >> 7) & 0x1;
-       __u8 rsvd = (fdpa >> 5) >> 0x3;
+       __u8 rsvd = (fdpa >> 5) & 0x3;
        __u8 fdpvwc = (fdpa >> 4) & 0x1;
        __u8 rgif = fdpa & 0xf;