From: Matt Porter <mporter@kernel.crashing.org>
To: akpm@osdl.org
Cc: linuxppc-dev@ozlabs.org, linux-kernel@vger.kernel.org
Subject: [PATCH][PPC32] Fix several warnings
Date: Mon, 4 Oct 2004 16:55:08 -0700 [thread overview]
Message-ID: <20041004165508.E13777@home.com> (raw)
Fixes some annoying warnings due to unitialized variables.
Please apply.
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
===== arch/ppc/kernel/signal.c 1.37 vs edited =====
--- 1.37/arch/ppc/kernel/signal.c 2004-08-25 10:13:41 -07:00
+++ edited/arch/ppc/kernel/signal.c 2004-10-04 16:38:12 -07:00
@@ -270,7 +270,7 @@
static int
restore_user_regs(struct pt_regs *regs, struct mcontext __user *sr, int sig)
{
- unsigned long save_r2;
+ unsigned long save_r2 = 0;
#if defined(CONFIG_ALTIVEC) || defined(CONFIG_SPE)
unsigned long msr;
#endif
===== arch/ppc/mm/44x_mmu.c 1.4 vs edited =====
--- 1.4/arch/ppc/mm/44x_mmu.c 2004-08-07 11:05:38 -07:00
+++ edited/arch/ppc/mm/44x_mmu.c 2004-10-04 16:38:13 -07:00
@@ -72,7 +72,7 @@
static void __init
ppc44x_pin_tlb(int slot, unsigned int virt, unsigned int phys)
{
- unsigned long attrib;
+ unsigned long attrib = 0;
__asm__ __volatile__("\
clrrwi %2,%2,10\n\
===== arch/ppc/syslib/ppc4xx_pic.c 1.11 vs edited =====
--- 1.11/arch/ppc/syslib/ppc4xx_pic.c 2004-07-01 22:23:47 -07:00
+++ edited/arch/ppc/syslib/ppc4xx_pic.c 2004-10-04 07:14:09 -07:00
@@ -256,7 +256,7 @@
ppc4xx_uic_end(unsigned int irq)
{
int bit, word;
- unsigned int tr_bits;
+ unsigned int tr_bits = 0;
bit = irq & 0x1f;
word = irq >> 5;
===== arch/ppc/syslib/todc_time.c 1.9 vs edited =====
--- 1.9/arch/ppc/syslib/todc_time.c 2004-03-02 11:54:26 -07:00
+++ edited/arch/ppc/syslib/todc_time.c 2004-10-04 16:38:14 -07:00
@@ -277,9 +277,9 @@
ulong
todc_get_rtc_time(void)
{
- uint year, mon, day, hour, min, sec;
+ uint year = 0, mon = 0, day = 0, hour = 0, min = 0, sec = 0;
uint limit, i;
- u_char save_control, uip;
+ u_char save_control, uip = 0;
spin_lock(&rtc_lock);
save_control = todc_read_val(todc_info->control_a);
@@ -361,7 +361,7 @@
todc_set_rtc_time(unsigned long nowtime)
{
struct rtc_time tm;
- u_char save_control, save_freq_select;
+ u_char save_control, save_freq_select = 0;
spin_lock(&rtc_lock);
to_tm(nowtime, &tm);
@@ -416,7 +416,7 @@
*/
static unsigned char __init todc_read_timereg(int addr)
{
- unsigned char save_control, val;
+ unsigned char save_control = 0, val;
switch (todc_info->rtc_type) {
case TODC_TYPE_DS1557:
reply other threads:[~2004-10-04 23:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20041004165508.E13777@home.com \
--to=mporter@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).