Page MenuHomeFreeBSD

powerpc64: Remove unused variables avoid gcc warnings
Needs ReviewPublic

Authored by breno.leitao_gmail.com on Feb 23 2018, 6:52 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Compiling the powerpc64 kernel with a newer GCC generates some annoying
messages, as unused and uninitialized variables.

This patchset fixes these warnings and this patchset shouldn't cause any change
in the code.

Diff Detail

Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 15228
Build 15296: arc lint + arc unit

Event Timeline

jhibbits added inline comments.Feb 23 2018, 8:03 PM
sys/powerpc/cpufreq/pmufreq.c
117

This line can just be deleted.

sys/powerpc/pseries/phyp_llan.c
159

I think this is incorrect, and error should be handled.

187

Don't ignore it, handle it.

285

Error should be handled, not ignored.

breno.leitao_gmail.com updated this revision to Diff 39748.EditedFeb 26 2018, 2:44 PM

Resubmitting a code that treats the errors other than ignoring them,.

jhibbits added inline comments.Apr 3 2018, 8:23 PM
sys/powerpc/pseries/phyp_llan.c
194

You need to clean up the resource allocations when you exit prematurely. Often there'll be a label at the end of the function to do cleanup before returning error.

304

Is there any cleanup needed from the H_FREE_LOGICAL_LAN call if this second hcall fails?