qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
To: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Finn Thain" <fthain@linux-m68k.org>
Subject: Re: [PATCH v3 2/8] dp8393x: Replace 0x40 magic value by SONIC_REG16_COUNT definition
Date: Sat, 10 Jul 2021 19:53:02 +0200	[thread overview]
Message-ID: <CAAdtpL41OJ6wE_eBHNBqaS-WzZbxH5DMJsZAWnxwTHtDt37dMQ@mail.gmail.com> (raw)
In-Reply-To: <20210710174954.2577195-3-f4bug@amsat.org>

Typo 'SONIC_REG_COUNT' in subject.

On Sat, Jul 10, 2021 at 7:50 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/net/dp8393x.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c
> index 9118364aa33..d1e147a82a6 100644
> --- a/hw/net/dp8393x.c
> +++ b/hw/net/dp8393x.c
> @@ -85,6 +85,7 @@ static const char *reg_names[] = {
>  #define SONIC_MPT    0x2e
>  #define SONIC_MDT    0x2f
>  #define SONIC_DCR2   0x3f
> +#define SONIC_REG_COUNT  0x40
>
>  #define SONIC_CR_HTX     0x0001
>  #define SONIC_CR_TXP     0x0002
> @@ -158,7 +159,7 @@ struct dp8393xState {
>
>      /* Registers */
>      uint8_t cam[16][6];
> -    uint16_t regs[0x40];
> +    uint16_t regs[SONIC_REG_COUNT];
>
>      /* Temporaries */
>      uint8_t tx_buffer[0x10000];
> @@ -972,7 +973,7 @@ static void dp8393x_realize(DeviceState *dev, Error **errp)
>
>      address_space_init(&s->as, s->dma_mr, "dp8393x");
>      memory_region_init_io(&s->mmio, OBJECT(dev), &dp8393x_ops, s,
> -                          "dp8393x-regs", 0x40 << s->it_shift);
> +                          "dp8393x-regs", SONIC_REG_COUNT << s->it_shift);
>
>      s->nic = qemu_new_nic(&net_dp83932_info, &s->conf,
>                            object_get_typename(OBJECT(dev)), dev->id, s);
> @@ -987,7 +988,7 @@ static const VMStateDescription vmstate_dp8393x = {
>      .minimum_version_id = 0,
>      .fields = (VMStateField []) {
>          VMSTATE_BUFFER_UNSAFE(cam, dp8393xState, 0, 16 * 6),
> -        VMSTATE_UINT16_ARRAY(regs, dp8393xState, 0x40),
> +        VMSTATE_UINT16_ARRAY(regs, dp8393xState, SONIC_REG_COUNT),
>          VMSTATE_END_OF_LIST()
>      }
>  };
> --
> 2.31.1
>


  reply	other threads:[~2021-07-10 17:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10 17:49 [PATCH v3 0/8] dp8393x: fixes and improvements Philippe Mathieu-Daudé
2021-07-10 17:49 ` [PATCH v3 1/8] dp8393x: Replace address_space_rw(is_write=1) by address_space_write() Philippe Mathieu-Daudé
2021-07-10 21:16   ` Mark Cave-Ayland
2021-07-10 17:49 ` [PATCH v3 2/8] dp8393x: Replace 0x40 magic value by SONIC_REG16_COUNT definition Philippe Mathieu-Daudé
2021-07-10 17:53   ` Philippe Mathieu-Daudé [this message]
2021-07-10 21:17   ` Mark Cave-Ayland
2021-07-10 17:49 ` [PATCH v3 3/8] dp8393x: Only shift the device registers mapping by 1 bit Philippe Mathieu-Daudé
2021-07-10 21:23   ` Mark Cave-Ayland
2021-07-10 17:49 ` [PATCH v3 4/8] dp8393x: Store CAM registers as 16-bit Philippe Mathieu-Daudé
2021-07-10 21:24   ` Mark Cave-Ayland
2021-07-10 17:49 ` [PATCH v3 5/8] dp8393x: Migrate registers as array of uint16 Philippe Mathieu-Daudé
2021-07-10 21:25   ` Mark Cave-Ayland
2021-07-10 17:49 ` [PATCH v3 6/8] dp8393x: Store CRC using device configured endianess Philippe Mathieu-Daudé
2021-07-10 21:28   ` Mark Cave-Ayland
2021-07-10 17:49 ` [NOTFORMERGE PATCH v3 7/8] dp8393x: Rewrite dp8393x_get() / dp8393x_put() Philippe Mathieu-Daudé
2021-07-10 21:31   ` Mark Cave-Ayland
2021-07-10 17:49 ` [NOTFORMERGE PATCH v3 8/8] dp8393x: don't force 32-bit register access Philippe Mathieu-Daudé
2021-07-10 21:48   ` Mark Cave-Ayland
2021-07-11  2:08 ` [PATCH v3 0/8] dp8393x: fixes and improvements Finn Thain
2021-07-11 10:33   ` Philippe Mathieu-Daudé
2021-07-12  7:09     ` Finn Thain
2021-07-13  7:08       ` Finn Thain

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=CAAdtpL41OJ6wE_eBHNBqaS-WzZbxH5DMJsZAWnxwTHtDt37dMQ@mail.gmail.com \
    --to=f4bug@amsat.org \
    --cc=fthain@linux-m68k.org \
    --cc=hpoussin@reactos.org \
    --cc=laurent@vivier.eu \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=qemu-devel@nongnu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).