Re: svn commit: r339936 - head/sys/amd64/vmm/amd
On Wed, Oct 31, 2018 at 06:50:53AM -0400, Ed Maste wrote: > On Wed, 31 Oct 2018 at 10:07, Shawn Webb wrote: > > > > Does this need a /* FALLTHROUGH */ comment to appease the Coverity > > Gods? > > No, successive case statements without intervening bodies is a widely > used idiom well understood by all reasonable tools. Good catch. Thanks for the clarification! -- Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal:+1 443-546-8752 Tor+XMPP+OTR:latt...@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE signature.asc Description: PGP signature
Re: svn commit: r339936 - head/sys/amd64/vmm/amd
On Wed, 2018-10-31 at 10:06 -0400, Shawn Webb wrote: > On Wed, Oct 31, 2018 at 01:27:44AM +, Marcelo Araujo wrote: > > > > Author: araujo > > Date: Wed Oct 31 01:27:44 2018 > > New Revision: 339936 > > URL: https://svnweb.freebsd.org/changeset/base/339936 > > > > Log: > > Merge cases with upper block. > > This is a cosmetic change only to simplify code. > > > > Reported by: anish > > Sponsored by: iXsystems Inc. > > > > Modified: > > head/sys/amd64/vmm/amd/svm_msr.c > > > > Modified: head/sys/amd64/vmm/amd/svm_msr.c > > === > > === > > --- head/sys/amd64/vmm/amd/svm_msr.cTue Oct 30 23:09:04 > > 2018(r339935) > > +++ head/sys/amd64/vmm/amd/svm_msr.cWed Oct 31 01:27:44 > > 2018(r339936) > > @@ -122,11 +122,7 @@ svm_rdmsr(struct svm_softc *sc, int vcpu, > > u_int num, u > > case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: > > case MSR_MTRR64kBase: > > case MSR_SYSCFG: > > - *result = 0; > > - break; > > case MSR_AMDK8_IPM: > > - *result = 0; > > - break; > > case MSR_EXTFEATURES: > > *result = 0; > > break; > Does this need a /* FALLTHROUGH */ comment to appease the Coverity > Gods? > > Thanks, > I would hope not, stacking multiple case values together is a common technique that almost never indicates a coding accident. The fall- through warning should only get triggered when there is executable code without a break between the various case values. Good: case 1: case 2: code(); break; Warning: case 1: code(); case 2: morecode(); break; -- Ian ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339936 - head/sys/amd64/vmm/amd
On Wed, 31 Oct 2018 at 10:07, Shawn Webb wrote: > > Does this need a /* FALLTHROUGH */ comment to appease the Coverity > Gods? No, successive case statements without intervening bodies is a widely used idiom well understood by all reasonable tools. ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339936 - head/sys/amd64/vmm/amd
On Wed, Oct 31, 2018, 10:07 PM Shawn Webb wrote: > On Wed, Oct 31, 2018 at 01:27:44AM +, Marcelo Araujo wrote: > > Author: araujo > > Date: Wed Oct 31 01:27:44 2018 > > New Revision: 339936 > > URL: https://svnweb.freebsd.org/changeset/base/339936 > > > > Log: > > Merge cases with upper block. > > This is a cosmetic change only to simplify code. > > > > Reported by:anish > > Sponsored by: iXsystems Inc. > > > > Modified: > > head/sys/amd64/vmm/amd/svm_msr.c > > > > Modified: head/sys/amd64/vmm/amd/svm_msr.c > > > == > > --- head/sys/amd64/vmm/amd/svm_msr.c Tue Oct 30 23:09:04 2018 > (r339935) > > +++ head/sys/amd64/vmm/amd/svm_msr.c Wed Oct 31 01:27:44 2018 > (r339936) > > @@ -122,11 +122,7 @@ svm_rdmsr(struct svm_softc *sc, int vcpu, u_int > num, u > > case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: > > case MSR_MTRR64kBase: > > case MSR_SYSCFG: > > - *result = 0; > > - break; > > case MSR_AMDK8_IPM: > > - *result = 0; > > - break; > > case MSR_EXTFEATURES: > > *result = 0; > > break; > > Does this need a /* FALLTHROUGH */ comment to appease the Coverity > Gods? > Wow yeah, probably yes!!! I will check tomorrow! Thanks. > Thanks, > > -- > Shawn Webb > Cofounder and Security Engineer > HardenedBSD > > Tor-ified Signal:+1 443-546-8752 > Tor+XMPP+OTR:latt...@is.a.hacker.sx > GPG Key ID: 0x6A84658F52456EEE > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE > ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r339936 - head/sys/amd64/vmm/amd
On Wed, Oct 31, 2018 at 01:27:44AM +, Marcelo Araujo wrote: > Author: araujo > Date: Wed Oct 31 01:27:44 2018 > New Revision: 339936 > URL: https://svnweb.freebsd.org/changeset/base/339936 > > Log: > Merge cases with upper block. > This is a cosmetic change only to simplify code. > > Reported by:anish > Sponsored by: iXsystems Inc. > > Modified: > head/sys/amd64/vmm/amd/svm_msr.c > > Modified: head/sys/amd64/vmm/amd/svm_msr.c > == > --- head/sys/amd64/vmm/amd/svm_msr.c Tue Oct 30 23:09:04 2018 > (r339935) > +++ head/sys/amd64/vmm/amd/svm_msr.c Wed Oct 31 01:27:44 2018 > (r339936) > @@ -122,11 +122,7 @@ svm_rdmsr(struct svm_softc *sc, int vcpu, u_int num, u > case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: > case MSR_MTRR64kBase: > case MSR_SYSCFG: > - *result = 0; > - break; > case MSR_AMDK8_IPM: > - *result = 0; > - break; > case MSR_EXTFEATURES: > *result = 0; > break; Does this need a /* FALLTHROUGH */ comment to appease the Coverity Gods? Thanks, -- Shawn Webb Cofounder and Security Engineer HardenedBSD Tor-ified Signal:+1 443-546-8752 Tor+XMPP+OTR:latt...@is.a.hacker.sx GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE signature.asc Description: PGP signature
svn commit: r339936 - head/sys/amd64/vmm/amd
Author: araujo Date: Wed Oct 31 01:27:44 2018 New Revision: 339936 URL: https://svnweb.freebsd.org/changeset/base/339936 Log: Merge cases with upper block. This is a cosmetic change only to simplify code. Reported by: anish Sponsored by: iXsystems Inc. Modified: head/sys/amd64/vmm/amd/svm_msr.c Modified: head/sys/amd64/vmm/amd/svm_msr.c == --- head/sys/amd64/vmm/amd/svm_msr.cTue Oct 30 23:09:04 2018 (r339935) +++ head/sys/amd64/vmm/amd/svm_msr.cWed Oct 31 01:27:44 2018 (r339936) @@ -122,11 +122,7 @@ svm_rdmsr(struct svm_softc *sc, int vcpu, u_int num, u case MSR_MTRR16kBase ... MSR_MTRR16kBase + 1: case MSR_MTRR64kBase: case MSR_SYSCFG: - *result = 0; - break; case MSR_AMDK8_IPM: - *result = 0; - break; case MSR_EXTFEATURES: *result = 0; break; ___ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"