Message ID | 20190501061827.23080-1-joel@jms.id.au |
---|---|
State | Superseded |
Headers | show |
Series | arm: aspeed: Set SDRAM size | expand |
Patchew URL: https://patchew.org/QEMU/20190501061827.23080-1-joel@jms.id.au/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190501061827.23080-1-joel@jms.id.au Subject: [Qemu-devel] [PATCH] arm: aspeed: Set SDRAM size === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu * [new tag] patchew/20190501061827.23080-1-joel@jms.id.au -> patchew/20190501061827.23080-1-joel@jms.id.au Switched to a new branch 'test' 32e0f59c5d arm: aspeed: Set SDRAM size === OUTPUT BEGIN === ERROR: braces {} are necessary for all arms of this statement #23: FILE: hw/arm/aspeed.c:334: + if (board->ram) [...] total: 1 errors, 0 warnings, 43 lines checked Commit 32e0f59c5d90 (arm: aspeed: Set SDRAM size) has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20190501061827.23080-1-joel@jms.id.au/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On Wed, 1 May 2019, at 15:48, Joel Stanley wrote: > We currently use Qemu's default of 128MB. As we know how much ram each > machine ships with, make it easier on users by setting a default. > > It can still be overridden with -m on the command line. > > Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Andrew Jeffery <andrew@aj.id.au> > --- > hw/arm/aspeed.c | 6 ++++++ > include/hw/arm/aspeed.h | 1 + > 2 files changed, 7 insertions(+) > > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c > index 1c23ebd99252..3f3d4162b3c5 100644 > --- a/hw/arm/aspeed.c > +++ b/hw/arm/aspeed.c > @@ -331,6 +331,8 @@ static void aspeed_machine_class_init(ObjectClass > *oc, void *data) > mc->no_floppy = 1; > mc->no_cdrom = 1; > mc->no_parallel = 1; > + if (board->ram) > + mc->default_ram_size = board->ram; > amc->board = board; > } > > @@ -352,6 +354,7 @@ static const AspeedBoardConfig aspeed_boards[] = { > .spi_model = "mx25l25635e", > .num_cs = 1, > .i2c_init = palmetto_bmc_i2c_init, > + .ram = 256 << 20, > }, { > .name = MACHINE_TYPE_NAME("ast2500-evb"), > .desc = "Aspeed AST2500 EVB (ARM1176)", > @@ -361,6 +364,7 @@ static const AspeedBoardConfig aspeed_boards[] = { > .spi_model = "mx25l25635e", > .num_cs = 1, > .i2c_init = ast2500_evb_i2c_init, > + .ram = 512 << 20, > }, { > .name = MACHINE_TYPE_NAME("romulus-bmc"), > .desc = "OpenPOWER Romulus BMC (ARM1176)", > @@ -370,6 +374,7 @@ static const AspeedBoardConfig aspeed_boards[] = { > .spi_model = "mx66l1g45g", > .num_cs = 2, > .i2c_init = romulus_bmc_i2c_init, > + .ram = 512 << 20, > }, { > .name = MACHINE_TYPE_NAME("witherspoon-bmc"), > .desc = "OpenPOWER Witherspoon BMC (ARM1176)", > @@ -379,6 +384,7 @@ static const AspeedBoardConfig aspeed_boards[] = { > .spi_model = "mx66l1g45g", > .num_cs = 2, > .i2c_init = witherspoon_bmc_i2c_init, > + .ram = 512 << 20, > }, > }; > > diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h > index 325c091d09e4..02073a6b4d61 100644 > --- a/include/hw/arm/aspeed.h > +++ b/include/hw/arm/aspeed.h > @@ -22,6 +22,7 @@ typedef struct AspeedBoardConfig { > const char *spi_model; > uint32_t num_cs; > void (*i2c_init)(AspeedBoardState *bmc); > + uint32_t ram; > } AspeedBoardConfig; > > #define TYPE_ASPEED_MACHINE MACHINE_TYPE_NAME("aspeed") > -- > 2.20.1 > >
Patchew URL: https://patchew.org/QEMU/20190501061827.23080-1-joel@jms.id.au/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190501061827.23080-1-joel@jms.id.au Subject: [Qemu-devel] [PATCH] arm: aspeed: Set SDRAM size === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu t [tag update] patchew/20190501061827.23080-1-joel@jms.id.au -> patchew/20190501061827.23080-1-joel@jms.id.au Switched to a new branch 'test' a98b29e581 arm: aspeed: Set SDRAM size === OUTPUT BEGIN === ERROR: braces {} are necessary for all arms of this statement #24: FILE: hw/arm/aspeed.c:334: + if (board->ram) [...] total: 1 errors, 0 warnings, 43 lines checked Commit a98b29e58144 (arm: aspeed: Set SDRAM size) has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20190501061827.23080-1-joel@jms.id.au/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On 4/30/19 11:18 PM, Joel Stanley wrote: > mc->no_parallel = 1; > + if (board->ram) > + mc->default_ram_size = board->ram; In addition to the braces, for which patchew will have sent you nag mail... > + .ram = 256 << 20, In <qemu/units.h> there are some defines to make this more readable as .ram = 256 * MiB, Otherwise, Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
Patchew URL: https://patchew.org/QEMU/20190501061827.23080-1-joel@jms.id.au/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190501061827.23080-1-joel@jms.id.au Subject: [Qemu-devel] [PATCH] arm: aspeed: Set SDRAM size === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu t [tag update] patchew/20190501061827.23080-1-joel@jms.id.au -> patchew/20190501061827.23080-1-joel@jms.id.au Switched to a new branch 'test' 5788c65fda arm: aspeed: Set SDRAM size === OUTPUT BEGIN === ERROR: braces {} are necessary for all arms of this statement #25: FILE: hw/arm/aspeed.c:334: + if (board->ram) [...] total: 1 errors, 0 warnings, 43 lines checked Commit 5788c65fda2a (arm: aspeed: Set SDRAM size) has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20190501061827.23080-1-joel@jms.id.au/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
On 5/1/19 8:18 AM, Joel Stanley wrote: > We currently use Qemu's default of 128MB. As we know how much ram each > machine ships with, make it easier on users by setting a default. > > It can still be overridden with -m on the command line. > > Signed-off-by: Joel Stanley <joel@jms.id.au> > --- > hw/arm/aspeed.c | 6 ++++++ > include/hw/arm/aspeed.h | 1 + > 2 files changed, 7 insertions(+) > > diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c > index 1c23ebd99252..3f3d4162b3c5 100644 > --- a/hw/arm/aspeed.c > +++ b/hw/arm/aspeed.c > @@ -331,6 +331,8 @@ static void aspeed_machine_class_init(ObjectClass *oc, void *data) > mc->no_floppy = 1; > mc->no_cdrom = 1; > mc->no_parallel = 1; > + if (board->ram) > + mc->default_ram_size = board->ram; > amc->board = board; > } > > @@ -352,6 +354,7 @@ static const AspeedBoardConfig aspeed_boards[] = { > .spi_model = "mx25l25635e", > .num_cs = 1, > .i2c_init = palmetto_bmc_i2c_init, > + .ram = 256 << 20, > }, { > .name = MACHINE_TYPE_NAME("ast2500-evb"), > .desc = "Aspeed AST2500 EVB (ARM1176)", > @@ -361,6 +364,7 @@ static const AspeedBoardConfig aspeed_boards[] = { > .spi_model = "mx25l25635e", > .num_cs = 1, > .i2c_init = ast2500_evb_i2c_init, > + .ram = 512 << 20, > }, { > .name = MACHINE_TYPE_NAME("romulus-bmc"), > .desc = "OpenPOWER Romulus BMC (ARM1176)", > @@ -370,6 +374,7 @@ static const AspeedBoardConfig aspeed_boards[] = { > .spi_model = "mx66l1g45g", > .num_cs = 2, > .i2c_init = romulus_bmc_i2c_init, > + .ram = 512 << 20, > }, { > .name = MACHINE_TYPE_NAME("witherspoon-bmc"), > .desc = "OpenPOWER Witherspoon BMC (ARM1176)", > @@ -379,6 +384,7 @@ static const AspeedBoardConfig aspeed_boards[] = { > .spi_model = "mx66l1g45g", > .num_cs = 2, > .i2c_init = witherspoon_bmc_i2c_init, > + .ram = 512 << 20, > }, > }; > > diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h > index 325c091d09e4..02073a6b4d61 100644 > --- a/include/hw/arm/aspeed.h > +++ b/include/hw/arm/aspeed.h > @@ -22,6 +22,7 @@ typedef struct AspeedBoardConfig { > const char *spi_model; > uint32_t num_cs; > void (*i2c_init)(AspeedBoardState *bmc); > + uint32_t ram; default_ram_size is of type 'const ram_addr_t', can you use the same type here? > } AspeedBoardConfig; > > #define TYPE_ASPEED_MACHINE MACHINE_TYPE_NAME("aspeed") > Using macros from "qemu/units.h" as suggested by Richard: Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Patchew URL: https://patchew.org/QEMU/20190501061827.23080-1-joel@jms.id.au/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20190501061827.23080-1-joel@jms.id.au Subject: [Qemu-devel] [PATCH] arm: aspeed: Set SDRAM size === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 From https://github.com/patchew-project/qemu t [tag update] patchew/20190501061827.23080-1-joel@jms.id.au -> patchew/20190501061827.23080-1-joel@jms.id.au Switched to a new branch 'test' e5bcc1ef55 arm: aspeed: Set SDRAM size === OUTPUT BEGIN === ERROR: braces {} are necessary for all arms of this statement #26: FILE: hw/arm/aspeed.c:334: + if (board->ram) [...] total: 1 errors, 0 warnings, 43 lines checked Commit e5bcc1ef551e (arm: aspeed: Set SDRAM size) has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/20190501061827.23080-1-joel@jms.id.au/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 1c23ebd99252..3f3d4162b3c5 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -331,6 +331,8 @@ static void aspeed_machine_class_init(ObjectClass *oc, void *data) mc->no_floppy = 1; mc->no_cdrom = 1; mc->no_parallel = 1; + if (board->ram) + mc->default_ram_size = board->ram; amc->board = board; } @@ -352,6 +354,7 @@ static const AspeedBoardConfig aspeed_boards[] = { .spi_model = "mx25l25635e", .num_cs = 1, .i2c_init = palmetto_bmc_i2c_init, + .ram = 256 << 20, }, { .name = MACHINE_TYPE_NAME("ast2500-evb"), .desc = "Aspeed AST2500 EVB (ARM1176)", @@ -361,6 +364,7 @@ static const AspeedBoardConfig aspeed_boards[] = { .spi_model = "mx25l25635e", .num_cs = 1, .i2c_init = ast2500_evb_i2c_init, + .ram = 512 << 20, }, { .name = MACHINE_TYPE_NAME("romulus-bmc"), .desc = "OpenPOWER Romulus BMC (ARM1176)", @@ -370,6 +374,7 @@ static const AspeedBoardConfig aspeed_boards[] = { .spi_model = "mx66l1g45g", .num_cs = 2, .i2c_init = romulus_bmc_i2c_init, + .ram = 512 << 20, }, { .name = MACHINE_TYPE_NAME("witherspoon-bmc"), .desc = "OpenPOWER Witherspoon BMC (ARM1176)", @@ -379,6 +384,7 @@ static const AspeedBoardConfig aspeed_boards[] = { .spi_model = "mx66l1g45g", .num_cs = 2, .i2c_init = witherspoon_bmc_i2c_init, + .ram = 512 << 20, }, }; diff --git a/include/hw/arm/aspeed.h b/include/hw/arm/aspeed.h index 325c091d09e4..02073a6b4d61 100644 --- a/include/hw/arm/aspeed.h +++ b/include/hw/arm/aspeed.h @@ -22,6 +22,7 @@ typedef struct AspeedBoardConfig { const char *spi_model; uint32_t num_cs; void (*i2c_init)(AspeedBoardState *bmc); + uint32_t ram; } AspeedBoardConfig; #define TYPE_ASPEED_MACHINE MACHINE_TYPE_NAME("aspeed")
We currently use Qemu's default of 128MB. As we know how much ram each machine ships with, make it easier on users by setting a default. It can still be overridden with -m on the command line. Signed-off-by: Joel Stanley <joel@jms.id.au> --- hw/arm/aspeed.c | 6 ++++++ include/hw/arm/aspeed.h | 1 + 2 files changed, 7 insertions(+) -- 2.20.1