All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/1] register: Remove unnecessary NULL check
@ 2020-10-02 15:53 Alistair Francis
  2020-10-13 15:40 ` Alistair Francis
  2020-11-12 15:51 ` Peter Maydell
  0 siblings, 2 replies; 4+ messages in thread
From: Alistair Francis @ 2020-10-02 15:53 UTC (permalink / raw)
  To: qemu-devel, ehabkost; +Cc: peter.maydell, alistair.francis, f4bug, alistair23

This patch fixes CID 1432800 by removing an unnecessary check.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
---
 hw/core/register.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/hw/core/register.c b/hw/core/register.c
index 31038bd7cc..3600ef5bde 100644
--- a/hw/core/register.c
+++ b/hw/core/register.c
@@ -258,10 +258,6 @@ static RegisterInfoArray *register_init_block(DeviceState *owner,
         int index = rae[i].addr / data_size;
         RegisterInfo *r = &ri[index];
 
-        if (data + data_size * index == 0 || !&rae[i]) {
-            continue;
-        }
-
         /* Init the register, this will zero it. */
         object_initialize((void *)r, sizeof(*r), TYPE_REGISTER);
 
-- 
2.28.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] register: Remove unnecessary NULL check
  2020-10-02 15:53 [PATCH v2 1/1] register: Remove unnecessary NULL check Alistair Francis
@ 2020-10-13 15:40 ` Alistair Francis
  2020-11-12 15:51 ` Peter Maydell
  1 sibling, 0 replies; 4+ messages in thread
From: Alistair Francis @ 2020-10-13 15:40 UTC (permalink / raw)
  To: Alistair Francis
  Cc: Peter Maydell, Philippe Mathieu-Daudé,
	qemu-devel@nongnu.org Developers, Eduardo Habkost

On Fri, Oct 2, 2020 at 9:04 AM Alistair Francis
<alistair.francis@wdc.com> wrote:
>
> This patch fixes CID 1432800 by removing an unnecessary check.
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>

Ping!

Alistair

> ---
>  hw/core/register.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/hw/core/register.c b/hw/core/register.c
> index 31038bd7cc..3600ef5bde 100644
> --- a/hw/core/register.c
> +++ b/hw/core/register.c
> @@ -258,10 +258,6 @@ static RegisterInfoArray *register_init_block(DeviceState *owner,
>          int index = rae[i].addr / data_size;
>          RegisterInfo *r = &ri[index];
>
> -        if (data + data_size * index == 0 || !&rae[i]) {
> -            continue;
> -        }
> -
>          /* Init the register, this will zero it. */
>          object_initialize((void *)r, sizeof(*r), TYPE_REGISTER);
>
> --
> 2.28.0
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] register: Remove unnecessary NULL check
  2020-10-02 15:53 [PATCH v2 1/1] register: Remove unnecessary NULL check Alistair Francis
  2020-10-13 15:40 ` Alistair Francis
@ 2020-11-12 15:51 ` Peter Maydell
  2020-11-13  0:32   ` Alistair Francis
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2020-11-12 15:51 UTC (permalink / raw)
  To: Alistair Francis
  Cc: Alistair Francis, Philippe Mathieu-Daudé,
	QEMU Developers, Eduardo Habkost

On Fri, 2 Oct 2020 at 17:04, Alistair Francis <alistair.francis@wdc.com> wrote:
>
> This patch fixes CID 1432800 by removing an unnecessary check.
>
> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> ---
>  hw/core/register.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/hw/core/register.c b/hw/core/register.c
> index 31038bd7cc..3600ef5bde 100644
> --- a/hw/core/register.c
> +++ b/hw/core/register.c
> @@ -258,10 +258,6 @@ static RegisterInfoArray *register_init_block(DeviceState *owner,
>          int index = rae[i].addr / data_size;
>          RegisterInfo *r = &ri[index];
>
> -        if (data + data_size * index == 0 || !&rae[i]) {
> -            continue;
> -        }
> -
>          /* Init the register, this will zero it. */
>          object_initialize((void *)r, sizeof(*r), TYPE_REGISTER);
>
> --
> 2.28.0

Applied to target-arm.next, thanks.

-- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/1] register: Remove unnecessary NULL check
  2020-11-12 15:51 ` Peter Maydell
@ 2020-11-13  0:32   ` Alistair Francis
  0 siblings, 0 replies; 4+ messages in thread
From: Alistair Francis @ 2020-11-13  0:32 UTC (permalink / raw)
  To: Peter Maydell
  Cc: Philippe Mathieu-Daudé,
	Alistair Francis, QEMU Developers, Eduardo Habkost

On Thu, Nov 12, 2020 at 7:51 AM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Fri, 2 Oct 2020 at 17:04, Alistair Francis <alistair.francis@wdc.com> wrote:
> >
> > This patch fixes CID 1432800 by removing an unnecessary check.
> >
> > Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
> > ---
> >  hw/core/register.c | 4 ----
> >  1 file changed, 4 deletions(-)
> >
> > diff --git a/hw/core/register.c b/hw/core/register.c
> > index 31038bd7cc..3600ef5bde 100644
> > --- a/hw/core/register.c
> > +++ b/hw/core/register.c
> > @@ -258,10 +258,6 @@ static RegisterInfoArray *register_init_block(DeviceState *owner,
> >          int index = rae[i].addr / data_size;
> >          RegisterInfo *r = &ri[index];
> >
> > -        if (data + data_size * index == 0 || !&rae[i]) {
> > -            continue;
> > -        }
> > -
> >          /* Init the register, this will zero it. */
> >          object_initialize((void *)r, sizeof(*r), TYPE_REGISTER);
> >
> > --
> > 2.28.0
>
> Applied to target-arm.next, thanks.

Thanks Peter

Alistair

>
> -- PMM


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-13  0:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-02 15:53 [PATCH v2 1/1] register: Remove unnecessary NULL check Alistair Francis
2020-10-13 15:40 ` Alistair Francis
2020-11-12 15:51 ` Peter Maydell
2020-11-13  0:32   ` Alistair Francis

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.