From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
To: Martyn Welch <martyn@welchs.me.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Manohar Vanga <manohar.vanga@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] vme: tsi148: silence uninitialized variable warning
Date: Sat, 10 Oct 2015 17:40:08 -0400 [thread overview]
Message-ID: <24E25954-7F91-436E-8656-5D92CA79079B@gmail.com> (raw)
In-Reply-To: <CAEccXec53U7AaYMxN=Rm9N0dtRS7RJVt7wR8bAFfBpxc5Za+CA@mail.gmail.com>
Hi Martyn,
Sorry, your comment is too late. This patch is already in staging-next.
Dmitri
> On 2015/10/10, at 17:35, Martyn Welch <martyn@welchs.me.uk> wrote:
>
> On 5 October 2015 at 04:59, Dmitry Kalinkin <dmitry.kalinkin@gmail.com> wrote:
>> The warning is a false positive.
>>
>
> That seems very likely.
>
> Please could you role this into the original patch (vme: change bus
> error handling scheme)?
>
> Martyn
>
>> drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_write':
>> drivers/vme/bridges/vme_tsi148.c:1358:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> vme_unregister_error_handler(handler);
>> ^
>> drivers/vme/bridges/vme_tsi148.c: In function 'tsi148_master_read':
>> drivers/vme/bridges/vme_tsi148.c:1260:31: warning: 'handler' may be used uninitialized in this function [-Wmaybe-uninitialized]
>> vme_unregister_error_handler(handler);
>> ^
>>
>> Fixes: 0b0496625715 ("vme: change bus error handling scheme")
>> Signed-off-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
>> ---
>> drivers/vme/bridges/vme_tsi148.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/vme/bridges/vme_tsi148.c b/drivers/vme/bridges/vme_tsi148.c
>> index d1e383b..6052483 100644
>> --- a/drivers/vme/bridges/vme_tsi148.c
>> +++ b/drivers/vme/bridges/vme_tsi148.c
>> @@ -1186,7 +1186,7 @@ static ssize_t tsi148_master_read(struct vme_master_resource *image, void *buf,
>> int retval, enabled;
>> unsigned long long vme_base, size;
>> u32 aspace, cycle, dwidth;
>> - struct vme_error_handler *handler;
>> + struct vme_error_handler *handler = NULL;
>> struct vme_bridge *tsi148_bridge;
>> void __iomem *addr = image->kern_base + offset;
>> unsigned int done = 0;
>> @@ -1276,7 +1276,7 @@ static ssize_t tsi148_master_write(struct vme_master_resource *image, void *buf,
>> unsigned int done = 0;
>> unsigned int count32;
>>
>> - struct vme_error_handler *handler;
>> + struct vme_error_handler *handler = NULL;
>> struct vme_bridge *tsi148_bridge;
>> struct tsi148_driver *bridge;
>>
>> --
>> 1.8.3.1
>>
prev parent reply other threads:[~2015-10-10 21:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-05 3:59 Dmitry Kalinkin
2015-10-10 21:35 ` Martyn Welch
2015-10-10 21:40 ` Dmitry Kalinkin [this message]
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=24E25954-7F91-436E-8656-5D92CA79079B@gmail.com \
--to=dmitry.kalinkin@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manohar.vanga@gmail.com \
--cc=martyn@welchs.me.uk \
/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
all inboxes | Powered by JetHome®