From: greg@kroah.com (Greg KH)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [PATCH 01/11] hwmon: w83792d misc cleanups
Date: Thu, 22 Dec 2005 17:25:01 +0000 [thread overview]
Message-ID: <20051222172501.GA23601@kroah.com> (raw)
In-Reply-To: <20051218162940.702a24ac.khali@linux-fr.org>
On Thu, Dec 22, 2005 at 11:11:14AM +0100, Jean Delvare wrote:
> Hi Greg,
>
> > On Sun, Dec 18, 2005 at 04:29:40PM +0100, Jean Delvare wrote:
> > > -static int w83792d_read_value(struct i2c_client *client, u8 register);
> > > -static int w83792d_write_value(struct i2c_client *client, u8 register,
> > > +static inline int w83792d_read_value(struct i2c_client *client, u8 register);
> > > +static inline int w83792d_write_value(struct i2c_client *client, u8 register,
> > > u8 value);
> >
> > Will cause compile errors, so I've dropped this portion of the patch
> > (see the patch I sent back to you for details.)
>
> Can you explain please? We have four other hardware monitoring drivers
> with similar code, and no problem was ever reported. This change to the
> w83792d driver was compiling just fine for me with both gcc 2.95.3 and
> gcc 3.3.6. What exactly is supposed to cause problems, and with which
> compiler?
I'm using gcc 3.4.4 here, and this change caused build errors. You
can't declare a function "static inline" and not actually declare the
full function before calling it, like this driver did (it called
w83792d_write_value() before that function was fully written.) I think
older versions of gcc just ignore this and don't inline it.
The other drivers that do this, properly define the functions fully
before calling them, that's why it works.
Hope this helps,
greg k-h
next prev parent reply other threads:[~2005-12-22 17:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-18 15:29 [lm-sensors] [PATCH 01/11] hwmon: w83792d misc cleanups Jean Delvare
2005-12-21 23:30 ` Greg KH
2005-12-22 10:11 ` Jean Delvare
2005-12-22 17:25 ` Greg KH [this message]
2005-12-28 22:39 ` Jean Delvare
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=20051222172501.GA23601@kroah.com \
--to=greg@kroah.com \
--cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.