linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linaro-kernel@lists.linaro.org, gregkh@linuxfoundation.org,
	sboyd@codeaurora.org, Rafael Wysocki <rjw@rjwysocki.net>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] debugfs: don't access 4 bytes for a boolean
Date: Mon, 14 Sep 2015 21:01:02 +0530	[thread overview]
Message-ID: <20150914153102.GE32551@linux> (raw)
In-Reply-To: <1499926.Jx7HlHxHXb@wuerfel>

On 14-09-15, 17:25, Arnd Bergmann wrote:
> I'd say that the argument to debugfs_create_bool() has to match the
> access in the functions you are modifying, as well as whatever
> gets passed into it by callers.
> 
> By accessing only the first byte, you break all drivers that
> call debugfs_create_bool() with a four-byte argument, at least
> on big-endian systems!
> 
> If we change any part of this, we need to audit the existing 31 callers
> of the function and change them all to use a bool type.

Right, so I have already sent a new version of this patch which should
be able to take care of stuff you pointed out.

> In the problem that you saw, what prevented gcc from printing a
> compile-time warning about debugfs_create_bool() being called with
> a bool argument?

A forced cast to u32 * :)

-- 
viresh

      reply	other threads:[~2015-09-14 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11  9:06 [PATCH] debugfs: don't access 4 bytes for a boolean Viresh Kumar
2015-09-11 11:18 ` Rasmus Villemoes
2015-09-11 16:41   ` Greg KH
2015-09-14 15:25 ` Arnd Bergmann
2015-09-14 15:31   ` Viresh Kumar [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=20150914153102.GE32551@linux \
    --to=viresh.kumar@linaro.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@codeaurora.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).