From: Tim Nordell <tim.nordell@logicpd.com>
To: Tim Nordell <tim.nordell@logicpd.com>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ARM: OMAP: Modified omap_mux_init_signal() to take in const char *
Date: Thu, 21 Oct 2010 14:10:58 -0500 [thread overview]
Message-ID: <4CC09042.3000201@logicpd.com> (raw)
In-Reply-To: <1287687041-22377-1-git-send-email-tim.nordell@logicpd.com>
On 10/21/10 13:50, Tim Nordell wrote:
> If one does the following line twice with the old code:
>
> omap_mux_init_signal("uart3_rts_sd.gpio_164", OMAP_PIN_INPUT);
> omap_mux_init_signal("uart3_rts_sd.gpio_164", OMAP_PIN_INPUT);
>
> the compiler optimizes the two const strings into one string
> internally in the compiler. The old code would modify the string
> by inserting a NULL effectively making the second call become:
>
> omap_mux_init_signal("uart3_rts_sd", OMAP_PIN_INPUT);
>
> Since the code changes _all_ uart3_rts_sd signals over to this,
> it'll cause unknown behavior, as well as making it more
> difficult to track down the reason since the string
> "uart3_rts_sd" by itself may not actually exist in your
> normal mux initialization sequence.
>
Gah. I just realized there was a patch in the linux-omap tree to do the
same thing.
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commitdiff;h=5a3b2f7a5a79082dd3a5f2294cbd85fc3b173d98;hp=7ad0e386d46e9edff64705ab25337ad9130baf63
It looks like by inspection that there could be a couple of things wrong
with that patch however. Namely, on the comparison of muxname to
m0_entry, if they have the same string up to mode0_len, such as
"dss_data1" and "dss_data12" it'd match there prematurely as it'd stop
comparing. Also, a minor display issue on the printk of the new muxname.
- Tim
WARNING: multiple messages have this Message-ID (diff)
From: tim.nordell@logicpd.com (Tim Nordell)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: OMAP: Modified omap_mux_init_signal() to take in const char *
Date: Thu, 21 Oct 2010 14:10:58 -0500 [thread overview]
Message-ID: <4CC09042.3000201@logicpd.com> (raw)
In-Reply-To: <1287687041-22377-1-git-send-email-tim.nordell@logicpd.com>
On 10/21/10 13:50, Tim Nordell wrote:
> If one does the following line twice with the old code:
>
> omap_mux_init_signal("uart3_rts_sd.gpio_164", OMAP_PIN_INPUT);
> omap_mux_init_signal("uart3_rts_sd.gpio_164", OMAP_PIN_INPUT);
>
> the compiler optimizes the two const strings into one string
> internally in the compiler. The old code would modify the string
> by inserting a NULL effectively making the second call become:
>
> omap_mux_init_signal("uart3_rts_sd", OMAP_PIN_INPUT);
>
> Since the code changes _all_ uart3_rts_sd signals over to this,
> it'll cause unknown behavior, as well as making it more
> difficult to track down the reason since the string
> "uart3_rts_sd" by itself may not actually exist in your
> normal mux initialization sequence.
>
Gah. I just realized there was a patch in the linux-omap tree to do the
same thing.
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commitdiff;h=5a3b2f7a5a79082dd3a5f2294cbd85fc3b173d98;hp=7ad0e386d46e9edff64705ab25337ad9130baf63
It looks like by inspection that there could be a couple of things wrong
with that patch however. Namely, on the comparison of muxname to
m0_entry, if they have the same string up to mode0_len, such as
"dss_data1" and "dss_data12" it'd match there prematurely as it'd stop
comparing. Also, a minor display issue on the printk of the new muxname.
- Tim
next prev parent reply other threads:[~2010-10-21 19:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-21 18:50 [PATCH] ARM: OMAP: Modified omap_mux_init_signal() to take in const char * Tim Nordell
2010-10-21 18:50 ` Tim Nordell
2010-10-21 18:50 ` Tim Nordell
2010-10-21 19:10 ` Tim Nordell [this message]
2010-10-21 19:10 ` Tim Nordell
2010-10-22 17:21 ` Tony Lindgren
2010-10-22 17:21 ` Tony Lindgren
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=4CC09042.3000201@logicpd.com \
--to=tim.nordell@logicpd.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@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.