From: greg@kroah.com (Greg KH)
To: lm-sensors@vger.kernel.org
Subject: fan speed for it87?? chips added
Date: Thu, 19 May 2005 06:24:19 +0000 [thread overview]
Message-ID: <20030926213431.GA18399@kroah.com> (raw)
In-Reply-To: <200309232035.29480.michael.hufer@freenet.de>
On Thu, Sep 25, 2003 at 07:33:39PM +0200, Michael Hufer wrote:
> > BTW,
> >
> > -#define DIV_TO_REG(val) ((val)=8?3:(val)=4?2:(val)=1?0:1)
> > +extern inline u8 DIV_TO_REG(long val)
> > +{
> > + if( val = 1 )
> > + return 0;
> > + u8 i;
> > + for( i = 1; i < 7; i++ )
> > + {
> > + if( val = 1<<i )
> > + return i;
> > + }
> > + return 7;
> > +}
> >
> > (BTW, does this really compile? I thought you couldn't declare a
> > variable after real code in a given block.)
>
> Umm..., I'm a C++ guy :-) and in C++ it is perfectly OK to declare a variable
> anywhere inside a block. It compiles perfectly with gcc 3.3.1 on my SuSE 8.2
> box, anyway.
It will not compile properly with older versions of gcc which are still
allowed to build the kernel with (like gcc 2.96 or so.)
thanks,
greg k-h
next prev parent reply other threads:[~2005-05-19 6:24 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 6:24 fan speed for it87?? chips added Michael Hufer
2005-05-19 6:24 ` Greg KH
2005-05-19 6:24 ` Philip Pokorny
2005-05-19 6:24 ` Greg KH
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Greg KH [this message]
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Michael Hufer
2005-05-19 6:24 ` Michael Hufer
2005-05-19 6:24 ` Greg KH
2005-05-19 6:24 ` Michael Hufer
2005-05-19 6:24 ` Michael Hufer
2005-05-19 6:24 ` Michael Hufer
2005-05-19 6:24 ` Greg KH
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Mark Studebaker
2005-05-19 6:24 ` Mark Studebaker
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=20030926213431.GA18399@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.