New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove reborrows? #1973
Remove reborrows? #1973
Conversation
let regs = &*self.registers; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't need this line of code with the obscure &*
everywhere, then I definitely want it gone.
This could also be a good time to standardize whether the reference to registers is called |
I support this.
I don't, however, think we need to manage variable names at this level. |
I don't think we need to manage them, but consistency is good. I.e., we're not going to reject a PR because it says |
94c96ac
to
a2e92c9
Compare
These were a holderover from older MMIO strategy. Pseudo-RFP in original draft of #1973; discussed on call 2020-09-18.
a2e92c9
to
06e0d69
Compare
I think I got all of the ones that make sense to do as part of a mass refactor. We sill have the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too much for me to look through...hopefully it is all good :)
bors r+ |
bors retry |
Pull Request Overview
We use a re-borrow idiom everywhere we access registers. Once upon a lifetime, when MMIO looked very different, I think this was necessary as we changed types to something that let us access the hardware. After the introduction of
StaticRef
, however, I don't think we actually need this anymore and we can simplify all of the register accesses.There ~300 more instances of this
&*
register pattern in the kernel, so I wanted to take a temperature check on this before doing more of them.Testing Strategy
Compiling.
TODO or Help Wanted
Is there are a reason to keep all of these
&*
around?Documentation Updated
/docs
, or no updates are required.Formatting
make prepush
.