public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: daw@cs.berkeley.edu (David Wagner)
To: linux-kernel@vger.kernel.org
Subject: Re: [S390] cio: kernel stack overflow.
Date: Wed, 30 Aug 2006 18:41:43 +0000 (UTC)	[thread overview]
Message-ID: <ed4m57$gb0$1@taverner.cs.berkeley.edu> (raw)
In-Reply-To: 18d709710608301052u1307139dpf6e3b2da6e7bfcbe@mail.gmail.com

Martin Schwidefsky  wrote:
>-      chp->dev = (struct device) {
>-              .parent  = &css[0]->device,
>-              .release = chp_release,
>-      };
>+      chp->dev.parent = &css[0]->device;
>+      chp->dev.release = chp_release;

>On 8/30/06, David Wagner <daw@cs.berkeley.edu> wrote:
>Unless I'm missing something, it looks to
>me like this diff causes a change in the semantics of the code.

Julio Auto wrote:
>I can't see the semantic change.

Maybe "semantic change" isn't the right term.  I'm not sure how gcc
handles the case where some field (like .bus) is missing from the C99
initializer as the struct device is created -- but it seemed plausible to
me that gcc might guarantee that all missing fields are automatically
initialized to 0 when the struct is constructed.  If this is the
case, then the semantic change is that the original code guarantees
to initialize chp->dev.bus to 0, whereas the proposed replacement code
does not.  I don't know whether gcc actually promises to initialize to
0 all unmentioned fields, or whether the C standard requires that, but
you could imagine some compiler making that promise (it is a reasonable
thing to do).

  parent reply	other threads:[~2006-08-30 18:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 12:40 [S390] cio: kernel stack overflow Martin Schwidefsky
2006-08-30 17:09 ` David Wagner
2006-08-30 17:40   ` Martin Schwidefsky
2006-08-30 17:52   ` Julio Auto
2006-08-30 18:20     ` Julio Auto
2006-08-30 18:41     ` David Wagner [this message]
2006-08-30 19:05 ` David Wagner
2006-08-30 19:19   ` Heiko Carstens
2006-08-31  9:06     ` Martin Schwidefsky
2006-08-30 19:25   ` Julio Auto

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='ed4m57$gb0$1@taverner.cs.berkeley.edu' \
    --to=daw@cs.berkeley.edu \
    --cc=daw-usenet@taverner.cs.berkeley.edu \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox