From: Paul Burton <paul.burton@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: <linux-mips@linux-mips.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] MIPS: PCI: ops-emma2rh: drop nonsensical db_assert
Date: Tue, 14 Jul 2015 09:32:48 +0100 [thread overview]
Message-ID: <20150714083248.GE2519@NP-P-BURTON> (raw)
In-Reply-To: <20150714083029.GA25179@linux-mips.org>
On Tue, Jul 14, 2015 at 10:30:30AM +0200, Ralf Baechle wrote:
> On Mon, Jul 13, 2015 at 05:14:21PM +0100, Paul Burton wrote:
>
> > The db_assert call checks whether the bus_num pointer is non-NULL, but
> > does so after said pointer has been dereferenced by the assignment on
> > the previous line. Thus the check is pointless & likely to have been
> > optimised out by the compiler anyway. The check_args function is static
> > & only ever called from the local file with bus_num being a pointer to
> > an on-stack variable, so the check seems somewhat overzealous anyway.
> > Simply remove it.
>
> Thanks, applied.
>
> Your patch btw. leaves the db_verify() macro as the sole caller of
> db_assert() and db_verify() itself is unused and in fact, nothing
> includes <asm/debug.h> anymore. Removing <asm/debug.h> leaves
> CONFIG_RUNTIME_DEBUG unused, so I'm removing that one, too.
>
> Ralf
Hi Ralf,
That's precisely what led me to write this patch, and precisely what the
following patch I submitted (MIPS: drop CONFIG_RUNTIME_DEBUG & debug.h)
does:
http://patchwork.linux-mips.org/patch/10693/
Thanks,
Paul
WARNING: multiple messages have this Message-ID (diff)
From: Paul Burton <paul.burton@imgtec.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] MIPS: PCI: ops-emma2rh: drop nonsensical db_assert
Date: Tue, 14 Jul 2015 09:32:48 +0100 [thread overview]
Message-ID: <20150714083248.GE2519@NP-P-BURTON> (raw)
Message-ID: <20150714083248.0ZfOuYKNJBc0W3TAgXqvom_3EUhZQ5fBxIzvu-3RbYo@z> (raw)
In-Reply-To: <20150714083029.GA25179@linux-mips.org>
On Tue, Jul 14, 2015 at 10:30:30AM +0200, Ralf Baechle wrote:
> On Mon, Jul 13, 2015 at 05:14:21PM +0100, Paul Burton wrote:
>
> > The db_assert call checks whether the bus_num pointer is non-NULL, but
> > does so after said pointer has been dereferenced by the assignment on
> > the previous line. Thus the check is pointless & likely to have been
> > optimised out by the compiler anyway. The check_args function is static
> > & only ever called from the local file with bus_num being a pointer to
> > an on-stack variable, so the check seems somewhat overzealous anyway.
> > Simply remove it.
>
> Thanks, applied.
>
> Your patch btw. leaves the db_verify() macro as the sole caller of
> db_assert() and db_verify() itself is unused and in fact, nothing
> includes <asm/debug.h> anymore. Removing <asm/debug.h> leaves
> CONFIG_RUNTIME_DEBUG unused, so I'm removing that one, too.
>
> Ralf
Hi Ralf,
That's precisely what led me to write this patch, and precisely what the
following patch I submitted (MIPS: drop CONFIG_RUNTIME_DEBUG & debug.h)
does:
http://patchwork.linux-mips.org/patch/10693/
Thanks,
Paul
next prev parent reply other threads:[~2015-07-14 8:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-13 16:14 [PATCH 1/2] MIPS: PCI: ops-emma2rh: drop nonsensical db_assert Paul Burton
2015-07-13 16:14 ` Paul Burton
2015-07-13 16:14 ` [PATCH 2/2] MIPS: drop CONFIG_RUNTIME_DEBUG & debug.h Paul Burton
2015-07-13 16:14 ` Paul Burton
2015-07-14 8:30 ` [PATCH 1/2] MIPS: PCI: ops-emma2rh: drop nonsensical db_assert Ralf Baechle
2015-07-14 8:32 ` Paul Burton [this message]
2015-07-14 8:32 ` Paul Burton
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=20150714083248.GE2519@NP-P-BURTON \
--to=paul.burton@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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.