linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Guenter Roeck <linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
Cc: Nick Krause <xerofoiify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"open list:SPI SUBSYSTEM"
	<linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	open list <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] spi: Initialize variable to prevent uninitialized warning
Date: Thu, 7 Aug 2014 10:55:17 +0100	[thread overview]
Message-ID: <20140807095517.GD17528@sirena.org.uk> (raw)
In-Reply-To: <20140807052219.GA21124-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>

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

On Wed, Aug 06, 2014 at 10:22:19PM -0700, Guenter Roeck wrote:

> So if we ever hit that uninitialized case, where bits_per_word is
> neither 8 nor 16, we'll have ops set to NULL and end up wondering
> why the kernel crashes a bit further down in the code. Not really
> sure if that is an improvement.

It's not.  The goal isn't to fix the warning, it's to fix the problem
the compiler is telling you about - initialising to the wrong value is
just as bad as not being initialised at all.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      parent reply	other threads:[~2014-08-07  9:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07  4:51 [PATCH] spi: Initialize variable to prevent uninitialized warning Nick Krause
     [not found] ` <1407387060-28992-1-git-send-email-xerofoiify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-08-07  5:22   ` Guenter Roeck
     [not found]     ` <20140807052219.GA21124-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org>
2014-08-07  9:55       ` Mark Brown [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=20140807095517.GD17528@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=xerofoiify-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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).