From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7p7C-00050M-F6 for qemu-devel@nongnu.org; Wed, 24 Jun 2015 14:09:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z7p78-0001Y7-IB for qemu-devel@nongnu.org; Wed, 24 Jun 2015 14:09:38 -0400 Received: from cantor2.suse.de ([195.135.220.15]:49269 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z7p78-0001Xm-Bp for qemu-devel@nongnu.org; Wed, 24 Jun 2015 14:09:34 -0400 Message-ID: <558AF25D.4070106@suse.de> Date: Wed, 24 Jun 2015 20:09:33 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <06c2a347f5ae9b1189cdfceeca8f885bc992c1e7.1435115710.git.crosthwaite.peter@gmail.com> In-Reply-To: <06c2a347f5ae9b1189cdfceeca8f885bc992c1e7.1435115710.git.crosthwaite.peter@gmail.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH qom v3 1/4] cpu: Add wrapper to the set-pc() hook List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, edgar.iglesias@gmail.com, Peter Crosthwaite s/set-pc/set_pc/ Am 24.06.2015 um 05:19 schrieb Peter Crosthwaite: > Add a wrapper around the CPUClass::set_pc() hook. >=20 > Signed-off-by: Peter Crosthwaite > --- > changed since v2: > drop "qom" from commit message subject. > Add () to functions in commit messages. > Drop error argument > --- > include/qom/cpu.h | 17 +++++++++++++++++ > 1 file changed, 17 insertions(+) Queuing on qom-cpu-next with the following change: --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -604,16 +604,14 @@ static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr, * @cpu: The CPU to set the program counter for. * @addr: Program counter value. * - * Set the program counter for a CPU. If there is no available implementation - * no action occurs. + * Sets the program counter for a CPU. */ static inline void cpu_set_pc(CPUState *cpu, vaddr addr) { CPUClass *cc =3D CPU_GET_CLASS(cpu); - if (cc->set_pc) { - cc->set_pc(cpu, addr); - } + g_assert(cc->set_pc !=3D NULL); + cc->set_pc(cpu, addr); } /** Regards, Andreas --=20 SUSE Linux GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Felix Imend=F6rffer, Jane Smithard, Dilip Upmanyu, Graham Norton; HRB 21284 (AG N=FCrnberg)