public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: Greg KH <greg@kroah.com>
Cc: Yani Ioannou <yani.ioannou@gmail.com>,
	LM Sensors <lm-sensors@lm-sensors.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [lm-sensors] [PATCH 2.6.12-rc4 15/15] drivers/i2c/chips/adm1026.c: use dynamic sysfs callbacks
Date: Thu, 19 May 2005 22:57:12 +0200	[thread overview]
Message-ID: <20050519225712.02137a47.khali@linux-fr.org> (raw)
In-Reply-To: <20050519205222.GA311@kroah.com>

Hi Greg,

> > If we are into code refactoring and driver size shrinking, you may
> > want to take a look at the following patch, which makes it87 even
> > smaller (from 18976 bytes down to 16992 bytes on my system) and IMHO
> > more cleaner.
> 
> But this doesn't reduce the binary size of the module, right?

It does, as I just said. The benefit is probably mainly due to the
introduction of loops around device_create_file() calls. The patch
reduces the number of calls (in the binary) from 59 to 20.

> You know, we do have arrays of attributes that can be registered with
> a single call...
> 
> I'd recommend using that over this mess anyday :)

Yeah, I'll take a look into this at some point. This should make the
code even more readable and efficient.

> No, I hate HEAD and TAIL macros.  This really isn't buying you much
> code savings, you could do it yourself with the __ATTR() macro
> yourself with the same ammount of code I bet...
>
> Or use the new macro that Yani created, that will make it even smaller
> :)

Agreed. This was really a quick hack, not meant for inclusion. Maybe I
should have polished it a bit more before I dared sending it. I'll do so
next time, sorry for the noise.

-- 
Jean Delvare

  reply	other threads:[~2005-05-19 20:57 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-17 10:47 [PATCH 2.6.12-rc4 15/15] drivers/i2c/chips/adm1026.c: use dynamic sysfs callbacks Yani Ioannou
2005-05-17 11:04 ` [lm-sensors] " Jean Delvare
2005-05-17 11:18   ` Yani Ioannou
2005-05-17 20:23     ` Grant Coady
2005-05-17 20:56       ` Yani Ioannou
2005-05-17 23:13         ` Grant Coady
2005-05-17 23:21           ` Yani Ioannou
2005-05-18  1:58             ` Grant Coady
     [not found]     ` <253818670505172136613abb43@mail.gmail.com>
2005-05-19 20:02       ` Jean Delvare
2005-05-19 20:52         ` Greg KH
2005-05-19 20:57           ` Jean Delvare [this message]
2005-05-19 21:35             ` Greg KH
2005-05-20  7:46               ` Jean Delvare
2005-05-20  8:53                 ` Yani Ioannou
2005-05-22  1:58                   ` Dmitry Torokhov
2005-05-22  6:50                     ` Jean Delvare
2005-05-22  7:04                       ` Dmitry Torokhov
2005-05-22 12:15                         ` Yani Ioannou
2005-05-22 12:32                           ` Jean Delvare
2005-05-22 13:05                             ` Yani Ioannou
2005-05-22 13:39                               ` Jean Delvare
2005-05-19 21:14         ` Yani Ioannou
2005-06-05  8:51 ` Jean Delvare
2005-06-06  6:14   ` Greg KH

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=20050519225712.02137a47.khali@linux-fr.org \
    --to=khali@linux-fr.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=yani.ioannou@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