From: Steven Rostedt <rostedt@goodmis.org>
To: Michael Ellerman <michael@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Frederic Weisbecker <fweisbec@gmail.com>,
Geoff Levand <geoffrey.levand@am.sony.com>,
Steven Rostedt <srostedt@redhat.com>
Subject: Re: [PATCH 2/2] powerpc, ftrace: use create_branch lib function
Date: Sat, 14 Feb 2009 10:20:39 -0500 (EST) [thread overview]
Message-ID: <alpine.DEB.1.10.0902141019200.27713@gandalf.stny.rr.com> (raw)
In-Reply-To: <1234619366.10265.3.camel@localhost>
On Sun, 15 Feb 2009, Michael Ellerman wrote:
> >
> > /* if (link) set op to 'bl' else 'b' */
> > - op = 0x48000000 | (link ? 1 : 0);
> > - op |= (ftrace_calc_offset(ip, addr) & 0x03fffffc);
> > + op = create_branch((unsigned int *)ip, addr, link ? 1 : 0);
>
> If I was feeling nit-picky I'd say you should use:
>
> op = create_branch((unsigned int *)ip, addr, link ? BRANCH_SET_LINK : 0);
>
>
> But admittedly we're unlikely to ever change the flag handling, so it's
> probably not worth the effort of a respin (or this email :).
Not worth the effort of a respin, I agree.
But it would be worth the effort of a clean up patch ;-)
Not for "oh this flag might change", but for reviewers looking at the
code and knowing exactly what that '1' means.
-- Steve
prev parent reply other threads:[~2009-02-14 15:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-13 15:00 [PATCH 0/2] [git-pull] powerpc, ftrace clean ups Steven Rostedt
2009-02-13 15:00 ` [PATCH 1/2] powerpc, ftrace: use unsigned int for instruction manipulation Steven Rostedt
2009-02-13 15:00 ` [PATCH 2/2] powerpc, ftrace: use create_branch lib function Steven Rostedt
2009-02-14 13:49 ` Michael Ellerman
2009-02-14 15:20 ` Steven Rostedt [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=alpine.DEB.1.10.0902141019200.27713@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=benh@kernel.crashing.org \
--cc=fweisbec@gmail.com \
--cc=geoffrey.levand@am.sony.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=michael@ellerman.id.au \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=srostedt@redhat.com \
/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®