linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Larry Finger <Larry.Finger@lwfinger.net>,
	Jean Delvare <jdelvare@suse.de>,
	Jes Sorensen <Jes.Sorensen@redhat.com>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>,
	Kalle Valo <kvalo@codeaurora.org>,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] realtek: Add switch variable to 'switch case not processed' messages
Date: Sat, 24 Sep 2016 10:32:38 -0700	[thread overview]
Message-ID: <1474738358.23838.11.camel@perches.com> (raw)
In-Reply-To: <49094659-662d-a902-6740-ea3d1fea6660@lwfinger.net>

(adding Jes Sorensen to recipients)

On Sat, 2016-09-24 at 11:35 -0500, Larry Finger wrote:
> I have patches that makes HAL_DEF_WOWLAN be a no-op for the rest of the drivers, 
> and one that sets the enum values for that particular statement to hex values. I 
> also looked at the other large enums and decided that they never need the human 
> lookup.

Hey Larry.

There are many somewhat common realtek wireless drivers.

Not to step on your toes, but what do you think of
rationalizing the switch/case statements of all the
realtek drivers in a few steps:

o Reindent all the switch/case blocks to a more normal
  kernel style (git diff -w would show no changes here)

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.

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.

o Consolidation of equivalent function spanning drivers
  With the style only changes minimized, where possible
  make the drivers use common ops/callback functions.

Is there any value in that or is Jes' work going to make
doing any or all of this unnecessary and futile?

  reply	other threads:[~2016-09-24 17:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22  9:51 rtl8192ce:rtl92ce_get_hw_reg():<0-0> switch case not processed Jean Delvare
2016-09-22 15:09 ` Larry Finger
2016-09-22 17:05   ` Jean Delvare
2016-09-22 21:01   ` Jean Delvare
2016-09-23 12:16   ` Jean Delvare
2016-09-23 18:10     ` Larry Finger
2016-09-24 15:25       ` Jean Delvare
2016-09-23 18:12   ` Joe Perches
2016-09-23 18:27     ` [PATCH] realtek: Add switch variable to 'switch case not processed' messages Joe Perches
2016-09-23 18:59       ` Larry Finger
2016-09-23 19:02         ` Joe Perches
2016-09-24 15:55           ` Jean Delvare
2016-09-24 16:15             ` Joe Perches
2016-09-24 16:35               ` Larry Finger
2016-09-24 17:32                 ` Joe Perches [this message]
2016-09-24 19:06                   ` Larry Finger
2016-09-24 20:02                     ` Jes Sorensen
2016-09-24 20:29                     ` Joe Perches
2016-09-24 20:35                       ` Jes Sorensen
2016-09-26  9:33               ` David Laight
2016-09-23 19:07       ` Larry Finger
2016-09-27 15:45       ` rtlwifi: " Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474738358.23838.11.camel@perches.com \
    --to=joe@perches.com \
    --cc=Jes.Sorensen@redhat.com \
    --cc=Larry.Finger@lwfinger.net \
    --cc=chaoming_li@realsil.com.cn \
    --cc=jdelvare@suse.de \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).