[Qemu-commits] [qemu/qemu] cc4a14: mac_newworld: Drop some variables
Branch: refs/heads/master Home: https://github.com/qemu/qemu Commit: cc4a140a755e775f15fbc6339487b55b86b0ed1e https://github.com/qemu/qemu/commit/cc4a140a755e775f15fbc6339487b55b86b0ed1e Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c Log Message: --- mac_newworld: Drop some variables Values not used frequently enough may not worth putting in a local variable, especially with names almost as long as the original value because that does not improve readability, to the contrary it makes it harder to see what value is used. Drop a few such variables. This is the same clean up that was done for mac_oldworld in commit b8df32555ce5. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: Signed-off-by: Mark Cave-Ayland Commit: 94c92e1a863b704df5b6c5160e88fd682efc4fe4 https://github.com/qemu/qemu/commit/94c92e1a863b704df5b6c5160e88fd682efc4fe4 Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_oldworld.c Log Message: --- mac_oldworld: Drop some more variables Drop some more local variables additionally to commit b8df32555ce5 to match clean ups done to mac_newwold in previous patch. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: <1b9a448431d9b1198432151af0511316cfc20d21.1666957578.git.bala...@eik.bme.hu> Signed-off-by: Mark Cave-Ayland Commit: 6b924abe99902ef4fa5b74a24c251fb38fd1e528 https://github.com/qemu/qemu/commit/6b924abe99902ef4fa5b74a24c251fb38fd1e528 Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c Log Message: --- mac_{old|new}world: Set tbfreq at declaration The tbfreq variable is only set once in an if-else which can be done at the variable declaration saving some lines of code and making it simpler. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Message-Id: <15668da8eb8bad4561428a5f25b02f91e16d9c1b.1666957578.git.bala...@eik.bme.hu> Signed-off-by: Mark Cave-Ayland Commit: 6120dc8d9d7be4285c93f20f8978e820934b6d6f https://github.com/qemu/qemu/commit/6120dc8d9d7be4285c93f20f8978e820934b6d6f Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c Log Message: --- mac_{old|new}world: Avoid else branch by setting default value Several variables are set in if-else branches where the else branch can be removed by setting a default value at the variable declaration which leads to simlpler code that is easier to follow. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Message-Id: <8dac3515b29976a61dacda07752175d7531dca3c.1666957578.git.bala...@eik.bme.hu> Signed-off-by: Mark Cave-Ayland Commit: 50c496d2728b26fa93a99dbdb4c93e619c6afe9d https://github.com/qemu/qemu/commit/50c496d2728b26fa93a99dbdb4c93e619c6afe9d Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c Log Message: --- mac_newworld: Clean up creation of Uninorth devices Map regions in ascending order and reorganise code a bit to avoid some casts and move Uninorth parts together. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Message-Id: Signed-off-by: Mark Cave-Ayland Commit: 18e0383b5c21df348f9d3a1e4bd12747561535f2 https://github.com/qemu/qemu/commit/18e0383b5c21df348f9d3a1e4bd12747561535f2 Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c Log Message: --- mac_{old|new}world: Reduce number of QOM casts By storing the device pointers in a variable with the right type the number of QOM casts can be reduced which also makes the code more readable. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: Signed-off-by: Mark Cave-Ayland Commit: cfb47bfaa107c3bf8d084d7a027741825fac4fbc https://github.com/qemu/qemu/commit/cfb47bfaa107c3bf8d084d7a027741825fac4fbc Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac.h M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c Log Message: --- hw/ppc/mac.h: Move newworld specific parts out from shared header Move the parts specific to and only used by mac99 out from the shared mac.h into mac_newworld.c where they better belong. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Message-Id: Signed-off-by: Mark Cave-Ayland Commit: 55078ea7775f207db5d8bca252151fc85741a8ca https://github.com/qemu/qemu/commit/55078ea7775f207db5d8bca252151fc85741a8ca Author: BALATON Zoltan Date: 2022-10-3
[Qemu-commits] [qemu/qemu] cc4a14: mac_newworld: Drop some variables
Branch: refs/heads/staging Home: https://github.com/qemu/qemu Commit: cc4a140a755e775f15fbc6339487b55b86b0ed1e https://github.com/qemu/qemu/commit/cc4a140a755e775f15fbc6339487b55b86b0ed1e Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c Log Message: --- mac_newworld: Drop some variables Values not used frequently enough may not worth putting in a local variable, especially with names almost as long as the original value because that does not improve readability, to the contrary it makes it harder to see what value is used. Drop a few such variables. This is the same clean up that was done for mac_oldworld in commit b8df32555ce5. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: Signed-off-by: Mark Cave-Ayland Commit: 94c92e1a863b704df5b6c5160e88fd682efc4fe4 https://github.com/qemu/qemu/commit/94c92e1a863b704df5b6c5160e88fd682efc4fe4 Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_oldworld.c Log Message: --- mac_oldworld: Drop some more variables Drop some more local variables additionally to commit b8df32555ce5 to match clean ups done to mac_newwold in previous patch. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: <1b9a448431d9b1198432151af0511316cfc20d21.1666957578.git.bala...@eik.bme.hu> Signed-off-by: Mark Cave-Ayland Commit: 6b924abe99902ef4fa5b74a24c251fb38fd1e528 https://github.com/qemu/qemu/commit/6b924abe99902ef4fa5b74a24c251fb38fd1e528 Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c Log Message: --- mac_{old|new}world: Set tbfreq at declaration The tbfreq variable is only set once in an if-else which can be done at the variable declaration saving some lines of code and making it simpler. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Message-Id: <15668da8eb8bad4561428a5f25b02f91e16d9c1b.1666957578.git.bala...@eik.bme.hu> Signed-off-by: Mark Cave-Ayland Commit: 6120dc8d9d7be4285c93f20f8978e820934b6d6f https://github.com/qemu/qemu/commit/6120dc8d9d7be4285c93f20f8978e820934b6d6f Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c Log Message: --- mac_{old|new}world: Avoid else branch by setting default value Several variables are set in if-else branches where the else branch can be removed by setting a default value at the variable declaration which leads to simlpler code that is easier to follow. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Message-Id: <8dac3515b29976a61dacda07752175d7531dca3c.1666957578.git.bala...@eik.bme.hu> Signed-off-by: Mark Cave-Ayland Commit: 50c496d2728b26fa93a99dbdb4c93e619c6afe9d https://github.com/qemu/qemu/commit/50c496d2728b26fa93a99dbdb4c93e619c6afe9d Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c Log Message: --- mac_newworld: Clean up creation of Uninorth devices Map regions in ascending order and reorganise code a bit to avoid some casts and move Uninorth parts together. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Message-Id: Signed-off-by: Mark Cave-Ayland Commit: 18e0383b5c21df348f9d3a1e4bd12747561535f2 https://github.com/qemu/qemu/commit/18e0383b5c21df348f9d3a1e4bd12747561535f2 Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c Log Message: --- mac_{old|new}world: Reduce number of QOM casts By storing the device pointers in a variable with the right type the number of QOM casts can be reduced which also makes the code more readable. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Mark Cave-Ayland Message-Id: Signed-off-by: Mark Cave-Ayland Commit: cfb47bfaa107c3bf8d084d7a027741825fac4fbc https://github.com/qemu/qemu/commit/cfb47bfaa107c3bf8d084d7a027741825fac4fbc Author: BALATON Zoltan Date: 2022-10-31 (Mon, 31 Oct 2022) Changed paths: M hw/ppc/mac.h M hw/ppc/mac_newworld.c M hw/ppc/mac_oldworld.c Log Message: --- hw/ppc/mac.h: Move newworld specific parts out from shared header Move the parts specific to and only used by mac99 out from the shared mac.h into mac_newworld.c where they better belong. Signed-off-by: BALATON Zoltan Reviewed-by: Mark Cave-Ayland Message-Id: Signed-off-by: Mark Cave-Ayland Commit: 55078ea7775f207db5d8bca252151fc85741a8ca https://github.com/qemu/qemu/commit/55078ea7775f207db5d8bca252151fc85741a8ca Author: BALATON Zoltan Date: 2022-10-