Page MenuHomeFreeBSD

nvme_ctrlr_enable: Small style nits
ClosedPublic

Authored by imp on Oct 1 2021, 3:21 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 19, 8:38 PM
Unknown Object (File)
Mon, Oct 14, 9:50 PM
Unknown Object (File)
Oct 7 2024, 1:26 AM
Unknown Object (File)
Sep 30 2024, 6:37 PM
Unknown Object (File)
Sep 30 2024, 2:45 PM
Unknown Object (File)
Sep 30 2024, 8:23 AM
Unknown Object (File)
Sep 29 2024, 5:09 PM
Unknown Object (File)
Sep 29 2024, 1:31 AM
Subscribers

Details

Summary

Rewrite the nested if's using the preferred FreeBSD style for branches
of ifs that return. NFC.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Oct 1 2021, 3:21 AM
sys/dev/nvme/nvme_ctrlr.c
318

I have no objections, but if you flip this (en == 1) condition, you could use the same formatting as in next chunk,

Start with en == 0, per mav, to make this less indented too.

This revision is now accepted and ready to land.Oct 1 2021, 2:25 PM
chuck added inline comments.
sys/dev/nvme/nvme_ctrlr.c
306–307

With the restructuring, I'm mixed on whether this comment needs to exist. It was helpful in the else clause to remind the reader of the state. But with the en == 0 immediately above, maybe the comment isn't as useful. I'm good either keeping it or ditching it.

Minor tweak in comment (mostly FYI)

This revision now requires review to proceed.Oct 1 2021, 3:42 PM

fold in chuck's comments and go a step further

This revision was not accepted when it landed; it landed in state Needs Review.Oct 1 2021, 4:57 PM
This revision was automatically updated to reflect the committed changes.