linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Francois Romieu <romieu@fr.zoreil.com>
To: Ronald Bultje <rbultje@ronald.bitfreak.net>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.6.0-test3 zoran driver update
Date: Sun, 24 Aug 2003 13:32:25 +0200	[thread overview]
Message-ID: <20030824133225.A24289@electric-eye.fr.zoreil.com> (raw)
In-Reply-To: <1061684006.4302.251.camel@localhost.localdomain>; from rbultje@ronald.bitfreak.net on Sun, Aug 24, 2003 at 06:23:40AM +0200

Ronald Bultje <rbultje@ronald.bitfreak.net> :
[avoid code duplication in {adv7170/adv7175/bt819/saa7111/saa7185}_write_block]
> I'm wondering how. I could make an inline function that each of them
> includes (but that doesn't decrease binary size, code is still
> duplicated), or I could make a parent module (and I don't want to do
> that). The only bad thing of the current way is the maintainance, but I
> don't really mind.

These functions differ only in:

struct XXX *encoder = i2c_get_clientdata(client);
       ^^^
[...]
                        do {
                                block_data[msg.len++] =
                                    encoder->reg[reg++] = data[1];
                                    ^^^^^^^^^ 
[...]
                        if ((ret =
                             XXX_write(client, reg, *data++)) < 0)
                             ^^^^^^^^^

Make i2c_get_clientdata() return a generic container struct which
provides instance specific methods to retrieve the "reg" member and
the XXX_write() function. Init these in XXX_detect_client() just
before i2c_set_clientdata() and it is done.

Patches that remove code used to make Penguin #0 happy. We want an happy
Penguin #0, don't we ? :o)

> Does it matter if I just keep it the way it is right now? I don't really
> mind at all.

Your choice. As a maintainer, you can say "It would be great. Volunteer
anyone ?" and see voluteer appearing.

[...]
> I'm moving some things explicitely to the long-term list, btw, that's on
> purpose. It'd be cool to handle the new DMA/PCI subsystem, but we've got
> many things to work on, some of which are more important than this.

Ok, I'll check http://mjpeg.sourceforge.net/driver-zoran/development.php and
try to kill one or two simple, self-contained, tasks.

[part-time kernel involvement]

Same thing here.

Regards

--
Ueimor

      reply	other threads:[~2003-08-24 11:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-20 21:23 [PATCH] 2.6.0-test3 zoran driver update Ronald Bultje
2003-08-20 23:08 ` Francois Romieu
2003-08-21  7:47   ` Ronald Bultje
2003-08-21 11:01     ` Francois Romieu
2003-08-21 11:40       ` Ronald Bultje
2003-08-24  4:23   ` Ronald Bultje
2003-08-24 11:32     ` Francois Romieu [this message]

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=20030824133225.A24289@electric-eye.fr.zoreil.com \
    --to=romieu@fr.zoreil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rbultje@ronald.bitfreak.net \
    /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).