Page MenuHomeFreeBSD

newbus: Remove redundant check for 0
AcceptedPublic

Authored by imp on Mar 7 2024, 7:15 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 28, 2:09 PM
Unknown Object (File)
Thu, May 23, 10:08 AM
Unknown Object (File)
Thu, May 23, 7:12 AM
Unknown Object (File)
Sun, May 12, 4:03 AM
Unknown Object (File)
Sat, May 4, 8:30 PM
Unknown Object (File)
Sat, May 4, 1:21 PM
Unknown Object (File)
Apr 28 2024, 2:09 PM
Unknown Object (File)
Apr 26 2024, 6:36 AM
Subscribers

Details

Reviewers
jhb
jrtc27
Summary

We already checked to see if the return code is 0 above. This code is
redundant.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 56502
Build 53390: arc lint + arc unit

Event Timeline

imp requested review of this revision.Mar 7 2024, 7:15 PM

actually fix the redundancy

sys/kern/subr_bus.c
1670

I suppose this line could also be dropped.

1739

Maybe we finally need to implement strdup above.

jhb added inline comments.
sys/kern/subr_bus.c
1670

Yes, you can drop pri == 0

1671

out is ok, but you could also use something like exact_match or some other name for the label.

1739

Lots of description strings are constants rather than dynamically allocated. I don't think it would matter if we started always dynamically allocating them though.

This revision is now accepted and ready to land.Mar 13 2024, 8:40 PM