mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Giampaolo Tomassoni <g.tomassoni@libero.it>
Cc: linux-kernel@vger.kernel.org, linux-atm-general@lists.sourceforge.net
Subject: Re: R: [Linux-ATM-General] [ATMSAR] Request for review - update #1
Date: Sun, 4 Sep 2005 17:32:41 +0200	[thread overview]
Message-ID: <20050904153241.GA7779@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <NBBBIHMOBLOHKCGIMJMDCEICEKAA.g.tomassoni@libero.it>

Giampaolo Tomassoni <g.tomassoni@libero.it> :
[...]
> Well, the idea is that more pci devices may appear, as adsl-enabled
> embedded systems will begin to appear in the market.
> 
> Also, I believe that adsl will carry much more services then just AAL5 for
> internet connection in the future.

I'd be happily surprized to see more documented ADSL PCI/USB device in the
near future. :o(

> Even if the ATMSAR actually lacks of AAL1 and AAL2/3 capabilities, adding
> them in a single, specialized module is much easier than swimming in a
> usb+atm middle layer.
> 
> Finally, the fact that ATMSAR is device-unspecific makes it easier to
> maintain, I guess.

Ok. Your suggestion may have more impact if there is a patch to convert
the sole existing in-kernel driver to use this module.

[...]
> > The codingstyle is broken. Please read again Documentation/CodingStyle,
> 
> That's a matter of taste: even Linus burned the GNU coding style book...

An uniform codingstyle is useful when people need to review code. Something
is wrong when a reviewer must uncipher a piece of code. You will find areas
in the kernel whose trends differ but a codingstyle from Mars is usually a
hint. So it is not _only_ a matter of taste.

> However, if it is needed by the linux community, I shurely will fix it
> whenever the ATMSAR idea will get passed: I'm just gathering feedbacks
> like the previous one you expressed.

You may have more feedback/review then. I only gave a cursory look at the
code.

[...]
> > remove the redundant typedef
> 
> Oh, you mean the "typedef enum _HECSTS ..." ?

Rather the "typedef struct atmsar_dev atmsar_dev_t;" (yes, I know the "It
saves typing" argument). Maybe something could be done at the same time
regarding the need for the forward declarations.

[...]
> > and the silly comments ("Reserve 
> > header space",
> > Encode packet into cells", ...).
> 
> I would prefer to explain better what the ATMSAR is doing there. So, I'll
> get your as a "clarify silly comments". Ok?

s/what/why/

And no, documenting a call to skb_reserve is silly.

[...]
> > - &page[strlen(page)] in atmProcRead sucks.
> 
> Why? It is preceded by an strcpy(page,...). A constant would be worse if
> someone changes the prefix string...

The value returned by sprintf and friends contains the needed offset, i.e.
buf += sprintf(buf, ...);.

[...]
> > - "return" is not a function.
> 
> Not even for() or while(). But doesn't they look cute this way?

No.

for (), while (), return rc;

[...]
> > - consider 'goto' to handle the errors instead of deep nesting
> 
> I prefer not using goto when not required to. Nesting is far more readable
> to my opinion.

OTOH, it makes ugly code to have it fit in a 80 columns console.

[...]
> Anyway, which are the functions you are objecting?

atmSend. Probably others.

If you can make the code look like existing in-kernel code (not fs/cifs
please) say network or ata driver code and you do not need goto, it's fine
too.

[...]
> > - +const atmsar_aalops_t opsAALR = {
> >   +       ATM_AAL0,
> >   +       "raw",
> >   -> use .foo = baz instead.
> 
> atmasr_aalops_t is not an exported structure (you'll find just an opaque
> definition in include/linux/atmsar.h), so it is not meant to be statically
> declared by device drivers. But I guess that the problem is readability,
> right?

struct foo zoy {
	.bar	= barbar,
	.baz	= bazbaz,
	.quuz	= ...
};

[...]
> May I ask if this is just your own contribution or if you are in charge of
> something in the linux and/or linux-atm projects?

/me scratches head

http://ww.google.com/search?hl=en&q=romieu+linux+cabal

--
Ueimor

  reply	other threads:[~2005-09-04 15:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-04 11:05 Giampaolo Tomassoni
2005-09-04 12:00 ` [Linux-ATM-General] " Francois Romieu
2005-09-04 13:13   ` R: " Giampaolo Tomassoni
2005-09-04 15:32     ` Francois Romieu [this message]
2005-09-04 18:44       ` R: " Giampaolo Tomassoni
2005-09-04 19:11         ` matthieu castet
2005-09-04 19:33           ` R: " Giampaolo Tomassoni
2005-09-04 19:42           ` Giampaolo Tomassoni
2005-09-05  6:05     ` Zoran Stojsavljevic
2005-09-05  6:21       ` R: " Giampaolo Tomassoni
2005-09-04 16:20 ` Alistair John Strachan
2005-09-04 16:41   ` Grzegorz Kulewski
2005-09-04 16:54     ` Alistair John Strachan
2005-09-04 17:22       ` Grzegorz Kulewski
2005-09-05 15:04       ` Duncan Sands
2005-09-04 18:36   ` R: " Giampaolo Tomassoni
2005-09-04 18:51     ` Alistair John Strachan
2005-09-05  9:36   ` David Woodhouse
2005-09-05 13:52     ` Alistair John Strachan
2005-09-05 13:56       ` David Woodhouse
2005-09-05 14:18         ` Alistair John Strachan
2005-09-05 14:32           ` David Woodhouse
2005-09-05 14:46   ` Duncan Sands
2005-09-04 16:55 ` Jiri Slaby

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=20050904153241.GA7779@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=g.tomassoni@libero.it \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®