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, Apr 6, 4:35 AM
Unknown Object (File)
Apr 2 2024, 5:14 PM
Unknown Object (File)
Mar 7 2024, 5:51 PM
Unknown Object (File)
Jan 21 2024, 11:02 PM
Unknown Object (File)
Dec 29 2023, 8:52 PM
Unknown Object (File)
Dec 25 2023, 7:09 PM
Unknown Object (File)
Dec 20 2023, 10:18 PM
Unknown Object (File)
Dec 20 2023, 8:16 PM
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.