From: Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
To: tori@unhappy.mine.nu (Tobias Ringstrom)
Cc: jgarzik@mandrakesoft.com, alan@lxorguk.ukuu.org.uk (Alan Cox),
linux-kernel@vger.kernel.org (kernel list)
Subject: Re: [PATCH] drivers/net/others
Date: Thu, 24 May 2001 14:01:14 +0200 (CEST) [thread overview]
Message-ID: <200105241201.OAA32046@green.mif.pg.gda.pl> (raw)
In-Reply-To: <Pine.LNX.4.33.0105241035230.10914-100000@boris.prodako.se> from "Tobias Ringstrom" at May 24, 2001 10:45:25 AM
> Thanks for your impressive clean-up patch. I have a couple of comments
> regarding your clean-up of the dmfe.c driver.
Thanks for your response.
> On Thu, 24 May 2001, Andrzej Krzysztofowicz wrote:
>
> > @@ -395,7 +395,7 @@
> > u32 dev_rev, pci_pmr;
> >
> > if (!printed_version++)
> > - printk(version);
> > + printk("%s", version);
> >
> > DMFE_DBUG(0, "dmfe_init_one()", 0);
> >
>
> Could you please explain the purpose of this change? To me it looks less
> efficient in both performance and memory usage.
Basically I also preferred to avoid the extra string here. But Alan suggests
it may cause problems while somebody wants to add a literal % to the version
string. Moreover, IMHO it is better to have a standard here, i.e. either all
drivers contain the format or none does.
If you still complain, I'll drop this change.
> > @@ -2024,8 +2027,10 @@
> > {
> > int rc;
> >
> > - printk(version);
> > +#ifdef MODULE
> > + printk("s", version);
> > printed_version = 1;
> > +#endif /* MODULE */
> >
> > DMFE_DBUG(0, "init_module() ", debug);
> >
>
> Whoups... And why did you add the ifdef, btw?
AFAIK module_init becomes __initcall while compiled into kernel. So it is
called (IMO) always and the previous "version" printing (around line 400)
would never be executed (printed_version == 1).
And we do not want to print version for built-in drivers which do not detect
hardware, do we ?
Andrzej
--
=======================================================================
Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl
tel. (0-58) 347 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej
next prev parent reply other threads:[~2001-05-24 12:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-24 1:02 Andrzej Krzysztofowicz
2001-05-24 3:43 ` Jeff Garzik
2001-05-24 8:45 ` Tobias Ringstrom
2001-05-24 8:51 ` Lars Marowsky-Bree
2001-05-24 12:01 ` Andrzej Krzysztofowicz [this message]
2001-05-24 14:30 ` Alan Cox
2001-05-24 16:00 ` Jonathan Lundell
2001-05-24 18:22 ` Rasmus Andersen
2001-05-25 9:08 ` Paul Gortmaker
2001-05-25 11:38 ` Andrzej Krzysztofowicz
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=200105241201.OAA32046@green.mif.pg.gda.pl \
--to=ankry@green.mif.pg.gda.pl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tori@unhappy.mine.nu \
/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®