Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1490748
| From | Jes Sorensen <Jes.Sorensen@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages |
| Date | 2016-09-24 22:40 +0200 |
| Message-ID | <sl1TQ-5HT-25@gated-at.bofh.it> (permalink) |
| References | (5 earlier) <skXQd-3em-11@gated-at.bofh.it> <skY9A-3kN-13@gated-at.bofh.it> <skZ5E-3ST-1@gated-at.bofh.it> <sl0uK-4TP-9@gated-at.bofh.it> <sl1Ka-5EF-31@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Joe Perches <joe@perches.com> writes: > On Sat, 2016-09-24 at 14:06 -0500, Larry Finger wrote: >> On 09/24/2016 12:32 PM, Joe Perches wrote: > [] >> o Reindent all the switch/case blocks to a more normal >> kernel style (git diff -w would show no changes here) >> That sounds like busy work to me, but if you want to do it, go ahead. > > It's really just to make the comparison case block reductions > easier to verify for later steps done > >> > o cast, spacing and parenthesis reductions >> > Lots of odd and somewhat unique styles in various >> > drivers, looks like too many individual authors without >> > a style guide / code enforcer using slightly different >> > personalized code. Glancing at the code, it looks to be >> > similar logic, just written in different styles. >> Same comment. > > Same rationale > >> > o Logic changes like >> > from: >> > if (foo) func(..., bar, ...); else func(..., baz, ...); >> > to: >> > func(..., foo ? bar : baz, ...); >> > to make the case statement code blocks more consistent >> > and emit somewhat smaller object code. >> I find if .. else constructs much easier to read than the cond ? xxxx : yyyy >> form. I would reject any such patches. > > <shrug> I think object code reduction generally a good thing > but then again, I'm not a maintainer here. I missed this part, but I am with Larry here - 'foo ? bar : boo' are just obfuscating the code and far less clear than if or switch statements. Jes
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages Joe Perches <joe@perches.com> - 2016-09-23 21:10 +0200
Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages Jean Delvare <jdelvare@suse.de> - 2016-09-24 18:00 +0200
Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages Joe Perches <joe@perches.com> - 2016-09-24 18:20 +0200
Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages Larry Finger <Larry.Finger@lwfinger.net> - 2016-09-24 18:40 +0200
Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages Joe Perches <joe@perches.com> - 2016-09-24 19:40 +0200
Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages Larry Finger <Larry.Finger@lwfinger.net> - 2016-09-24 21:10 +0200
Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages Jes Sorensen <Jes.Sorensen@redhat.com> - 2016-09-24 22:10 +0200
Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages Joe Perches <joe@perches.com> - 2016-09-24 22:30 +0200
Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages Jes Sorensen <Jes.Sorensen@redhat.com> - 2016-09-24 22:40 +0200
RE: [PATCH] realtek: Add switch variable to 'switch case not processed' messages David Laight <David.Laight@ACULAB.COM> - 2016-09-26 11:40 +0200
csiph-web