From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: staging: goldfish: Fix pointer cast for 32 bits
Date: Wed, 13 Apr 2016 06:40:17 +0000 [thread overview]
Message-ID: <20160413064017.GA8092@mwanda> (raw)
Hello Peter Senna Tschudin,
The patch 07d783fd830a: "staging: goldfish: Fix pointer cast for 32
bits" from May 19, 2015, leads to the following static checker
warning:
drivers/tty/goldfish.c:83 goldfish_tty_interrupt()
error: XXX uninitialized symbol 'buf'.
drivers/tty/goldfish.c
69 static irqreturn_t goldfish_tty_interrupt(int irq, void *dev_id)
70 {
71 struct goldfish_tty *qtty = dev_id;
72 void __iomem *base = qtty->base;
73 unsigned long irq_flags;
74 unsigned char *buf;
75 u32 count;
76
77 count = readl(base + GOLDFISH_TTY_BYTES_READY);
78 if (count = 0)
79 return IRQ_NONE;
80
81 count = tty_prepare_flip_string(&qtty->port, &buf, count);
If tty_prepare_flip_string() returns size zero because there is no space
then "buf" is uninitialized.
82 spin_lock_irqsave(&qtty->lock, irq_flags);
83 gf_write_ptr(buf, base + GOLDFISH_TTY_DATA_PTR,
84 base + GOLDFISH_TTY_DATA_PTR_HIGH);
85 writel(count, base + GOLDFISH_TTY_DATA_LEN);
86 writel(GOLDFISH_TTY_CMD_READ_BUFFER, base + GOLDFISH_TTY_CMD);
87 spin_unlock_irqrestore(&qtty->lock, irq_flags);
88 tty_schedule_flip(&qtty->port);
89 return IRQ_HANDLED;
90 }
regards,
dan carpenter
reply other threads:[~2016-04-13 6:40 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=20160413064017.GA8092@mwanda \
--to=dan.carpenter@oracle.com \
--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.