Commit 77524d11 authored by Alistair Francis's avatar Alistair Francis Committed by Peter Maydell
Browse files

cadence_gem: Correct indentation



Fix up the indentation inside the for loop that was introduced in the previous
patch. This commit is almost empty if viewed using 'git show -w', except for a
few changes that were required to avoid the 80 charecter line limit.

Signed-off-by: default avatarAlistair Francis <alistair.francis@xilinx.com>
Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Message-id: b40d1b12d24be9f0ac5d72f86249103e0c1c720a.1469727764.git.alistair.francis@xilinx.com
Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parent 67101725
Loading
Loading
Loading
Loading
+101 −96
Original line number Diff line number Diff line
@@ -1079,16 +1079,17 @@ static void gem_transmit(CadenceGEMState *s)
                break;
            }

        if (tx_desc_get_length(desc) > sizeof(tx_packet) - (p - tx_packet)) {
            DB_PRINT("TX descriptor @ 0x%x too large: size 0x%x space 0x%x\n",
                     (unsigned)packet_desc_addr,
            if (tx_desc_get_length(desc) > sizeof(tx_packet) -
                                               (p - tx_packet)) {
                DB_PRINT("TX descriptor @ 0x%x too large: size 0x%x space " \
                         "0x%x\n", (unsigned)packet_desc_addr,
                         (unsigned)tx_desc_get_length(desc),
                         sizeof(tx_packet) - (p - tx_packet));
                break;
            }

        /* Gather this fragment of the packet from "dma memory" to our contig.
         * buffer.
            /* Gather this fragment of the packet from "dma memory" to our
             * contig buffer.
             */
            cpu_physical_memory_read(tx_desc_get_buffer(desc), p,
                                     tx_desc_get_length(desc));
@@ -1102,10 +1103,12 @@ static void gem_transmit(CadenceGEMState *s)
                /* Modify the 1st descriptor of this packet to be owned by
                 * the processor.
                 */
            cpu_physical_memory_read(s->tx_desc_addr[q], (uint8_t *)desc_first,
                cpu_physical_memory_read(s->tx_desc_addr[q],
                                         (uint8_t *)desc_first,
                                         sizeof(desc_first));
                tx_desc_set_used(desc_first);
            cpu_physical_memory_write(s->tx_desc_addr[q], (uint8_t *)desc_first,
                cpu_physical_memory_write(s->tx_desc_addr[q],
                                          (uint8_t *)desc_first,
                                          sizeof(desc_first));
                /* Advance the hardware current descriptor past this packet */
                if (tx_desc_get_wrap(desc)) {
@@ -1136,8 +1139,10 @@ static void gem_transmit(CadenceGEMState *s)
                gem_transmit_updatestats(s, tx_packet, total_bytes);

                /* Send the packet somewhere */
            if (s->phy_loop || (s->regs[GEM_NWCTRL] & GEM_NWCTRL_LOCALLOOP)) {
                gem_receive(qemu_get_queue(s->nic), tx_packet, total_bytes);
                if (s->phy_loop || (s->regs[GEM_NWCTRL] &
                                    GEM_NWCTRL_LOCALLOOP)) {
                    gem_receive(qemu_get_queue(s->nic), tx_packet,
                                total_bytes);
                } else {
                    qemu_send_packet(qemu_get_queue(s->nic), tx_packet,
                                     total_bytes);