[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200520160847.dpvut45zjd5msz6w@holly.lan>
Date: Wed, 20 May 2020 17:08:47 +0100
From: Daniel Thompson <daniel.thompson@...aro.org>
To: Douglas Anderson <dianders@...omium.org>
Cc: Jason Wessel <jason.wessel@...driver.com>, sumit.garg@...aro.org,
Chuhong Yuan <hslester96@...il.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
kgdb-bugreport@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kdb: Cleanup math with KDB_CMD_HISTORY_COUNT
On Thu, May 07, 2020 at 04:11:46PM -0700, Douglas Anderson wrote:
> From code inspection the math in handle_ctrl_cmd() looks super sketchy
> because it subjects -1 from cmdptr and then does a "%
> KDB_CMD_HISTORY_COUNT". It turns out that this code works because
> "cmdptr" is unsigned and KDB_CMD_HISTORY_COUNT is a nice power of 2.
> Let's make this a little less sketchy.
>
> This patch should be a no-op.
>
> Signed-off-by: Douglas Anderson <dianders@...omium.org>
Applied, thanks!
Powered by blists - more mailing lists