The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Markus Grabner <grabner@icg.tugraz.at>
Cc: Dan Carpenter <dan.carpenter@oracle.com>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	devel@driverdev.osuosl.org,
	line6linux-devel@lists.sourceforge.net,
	linux-kernel@vger.kernel.org, Daniel Mack <zonque@gmail.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH 1/8] staging: line6: wrap >80 char lines in capture.c
Date: Thu, 15 Nov 2012 16:30:57 -0800	[thread overview]
Message-ID: <1353025857.24310.15.camel@joe-AO722> (raw)
In-Reply-To: <1475639.oCQjCBj5TR@mark>

On Fri, 2012-11-16 at 00:43 +0100, Markus Grabner wrote:
> On Thursday 15 November 2012 14:12:31 Joe Perches wrote:
> > On Thu, 2012-11-15 at 22:03 +0100, Markus Grabner wrote:
> > > Am Mittwoch, 14. November 2012, 17:33:05 schrieb Dan Carpenter:
> > > > The reason this is hitting the 80 character limit is because
> > > > "LINE6_INDEX_PCM_ALSA_CAPTURE_STREAM" is 35 characters long.  It
> > > > isn't even clear from the name what it holds.  It's just a very crap
> > > > name.
> > > 
> > > Please refer to the file pcm.h for a detailed documentation of this and
> > > similar names (in fact, the documentation explains the LINE6_BIT_PCM_*
> > > names instead, but I bevlieve the correspondence is obvious). It's hard
> > > to define a shorter name which is at the same time descriptive,
> > > consistent, and not to be confused with related names.
> > > 
> > > Should such documentation be moved to a separate file (e.g.,
> > > "Documentation/sound/alsa/line6usb.txt")?
> > 
> > Documenting poor naming choices doesn't make it better.
> Yes, but the documentation might help understanding why a particular naming 
> was chosen and that it might not be as poor as it seemed at first sight. I 
> assume that you are aware of the meaning of the LINE6_INDEX_PCM_* symbols (and 
> of the issues that were fixed by introducing them), so which naming scheme 

Hi Markus

Dunno why they were introduced, but I think
several things could be shorter as to me
none of these longish L6_BIT(foo) elements
means much and I'd need to read the code
to figure them out anyway.

the LINE6_ prefix is excessive,
L6_ would probably be fine.
(and that goes for all the functions too)

CAPTURE/RECORD could be RD/WR
MONITOR could be MON
IMPULSE could be IRM

BUFFER could be I
STREAM could be O
(or the other way 'round)

etc..., cheers, Joe


  reply	other threads:[~2012-11-16  0:31 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-11 12:24 [PATCH 0/8] staging: line6: checkpatch.pl cleanups Stefan Hajnoczi
2012-11-11 12:24 ` [PATCH 1/8] staging: line6: wrap >80 char lines in capture.c Stefan Hajnoczi
2012-11-14 14:33   ` Dan Carpenter
2012-11-15 21:03     ` Markus Grabner
2012-11-15 21:38       ` Dan Carpenter
2012-11-15 22:12       ` Joe Perches
2012-11-15 23:43         ` Markus Grabner
2012-11-16  0:30           ` Joe Perches [this message]
2012-11-11 12:24 ` [PATCH 2/8] staging: line6: fix quoted string across lines in midibuf.c Stefan Hajnoczi
2012-11-11 12:24 ` [PATCH 3/8] staging: line6: shorten comment below 80 chars in pcm.c Stefan Hajnoczi
2012-11-11 12:24 ` [PATCH 4/8] staging: line6: drop trailing whitespace in pcm.h Stefan Hajnoczi
2012-11-11 12:24 ` [PATCH 5/8] staging: line6: wrap lines to 80 chars in playback.c Stefan Hajnoczi
2012-11-11 12:24 ` [PATCH 6/8] staging: line6: replace deprecated strict_strtol() in toneport.c Stefan Hajnoczi
2012-11-11 12:24 ` [PATCH 7/8] staging: line6: wrap lines to 80 chars in usbdefs.h Stefan Hajnoczi
2012-11-11 12:24 ` [PATCH 8/8] staging: line6: wrap comment to 80 chars in variax.c Stefan Hajnoczi

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=1353025857.24310.15.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=dan.carpenter@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=grabner@icg.tugraz.at \
    --cc=gregkh@linuxfoundation.org \
    --cc=line6linux-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefanha@gmail.com \
    --cc=zonque@gmail.com \
    /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