[PATCH 06/17] cmd: sdp: Reorder variable declaration
Mattijs Korpershoek
mkorpershoek at baylibre.com
Tue Aug 22 18:24:39 CEST 2023
On sam., août 19, 2023 at 16:23, Marek Vasut <marex at denx.de> wrote:
> Move the variable declaration around to improve code readability.
> No functional change.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> ---
> Cc: Angus Ainslie <angus at akkea.ca>
> Cc: Dmitrii Merkurev <dimorinny at google.com>
> Cc: Eddie Cai <eddie.cai.linux at gmail.com>
> Cc: Kever Yang <kever.yang at rock-chips.com>
> Cc: Lukasz Majewski <lukma at denx.de>
> Cc: Miquel Raynal <miquel.raynal at bootlin.com>
> Cc: Mattijs Korpershoek <mkorpershoek at baylibre.com>
> Cc: Nishanth Menon <nm at ti.com>
> Cc: Patrice Chotard <patrice.chotard at foss.st.com>
> Cc: Patrick Delaunay <patrick.delaunay at foss.st.com>
> Cc: Philipp Tomsich <philipp.tomsich at vrull.eu>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Stefan Roese <sr at denx.de>
> Cc: kernel at puri.sm
> ---
> cmd/usb_gadget_sdp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>
>
> diff --git a/cmd/usb_gadget_sdp.c b/cmd/usb_gadget_sdp.c
> index 1af82e11366..784d1b49768 100644
> --- a/cmd/usb_gadget_sdp.c
> +++ b/cmd/usb_gadget_sdp.c
> @@ -14,13 +14,13 @@
>
> static int do_sdp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
> {
> + int controller_index;
> int ret;
>
> if (argc < 2)
> return CMD_RET_USAGE;
>
> - char *usb_controller = argv[1];
> - int controller_index = simple_strtoul(usb_controller, NULL, 0);
> + controller_index = simple_strtoul(argv[1], NULL, 0);
> usb_gadget_initialize(controller_index);
>
> g_dnl_clear_detach();
> --
> 2.40.1
More information about the U-Boot
mailing list