All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sesterhenn / snakebyte <snakebyte@gmx.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [Patch] check u32 < 0 in cpufreq-nforce2
Date: Wed, 14 Dec 2005 12:58:14 +0000	[thread overview]
Message-ID: <1134565094.23689.5.camel@alice> (raw)
In-Reply-To: <1134563209.23516.2.camel@alice>

[-- Attachment #1: Type: text/plain, Size: 1606 bytes --]

hi,

thanks for the reply

> Please make patches that can be applied with  patch -p1  that is, run
> diff from the directory holding the kernel source dir, not from within
> the kernel source dir itself. Also, unless creating your diff that way
> makes it obvious what version of the kernel you are patching, please
> state the version in your email.

ok, rediffed, kernel ist 2.6.16-rc5-git2

> nforce2_calc_pll() which is used to obtain the value stored in the pll
> variable returns a plain 'int', and nforce2_write_pll() which the
> value is later passed to also expects a plain 'int', so why not make
> the type of pll a plain int instead of s32 ??

i wasnt brave enough, since i am not fully aware of the differences 
between s32 and int. changed it to int.

> Other than that, I agree with you that the variable needs to be signed
> since nforce2_calc_pll() returns -1 on failure.

so such cleanups are ok? the icc compiler spits out some more warnings
regarding this ( not all seem to be a problem ).


Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>

--- linux-2.6.15-rc5-git2/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c.orig	2005-12-14 13:19:43.000000000 +0100
+++ linux-2.6.15-rc5-git2/arch/i386/kernel/cpu/cpufreq/cpufreq-nforce2.c	2005-12-14 13:55:06.000000000 +0100
@@ -177,9 +177,9 @@ static unsigned int nforce2_fsb_read(int
  */
 static int nforce2_set_fsb(unsigned int fsb)
 {
-	u32 pll, temp = 0;
+	u32 temp = 0;
 	unsigned int tfsb;
-	int diff;
+	int diff, pll;
 
 	if ((fsb > max_fsb) || (fsb < NFORCE2_MIN_FSB)) {
 		printk(KERN_ERR "cpufreq: FSB %d is out of range!\n", fsb);



[-- Attachment #2: Type: text/plain, Size: 168 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

  parent reply	other threads:[~2005-12-14 12:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-14 12:26 [KJ] [Patch] check u32 < 0 in cpufreq-nforce2 Eric Sesterhenn / snakebyte
2005-12-14 12:49 ` Jesper Juhl
2005-12-14 12:58 ` Eric Sesterhenn / snakebyte [this message]
2005-12-14 13:33 ` Dave Jones

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=1134565094.23689.5.camel@alice \
    --to=snakebyte@gmx.de \
    --cc=kernel-janitors@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.