OSDN Git Service

net: ipa: fix an error message in gsi_channel_init_one()
authorAlex Elder <elder@linaro.org>
Thu, 30 Apr 2020 21:35:11 +0000 (16:35 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 May 2020 01:04:58 +0000 (18:04 -0700)
An error message about limiting the number of TREs used prints the
wrong value.  Fix this bug.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/gsi.c

index 845478a..b4206fd 100644 (file)
@@ -1798,9 +1798,9 @@ static int gsi_channel_init_one(struct gsi *gsi,
 
        /* Worst case we need an event for every outstanding TRE */
        if (data->channel.tre_count > data->channel.event_count) {
-               dev_warn(gsi->dev, "channel %u limited to %u TREs\n",
-                       data->channel_id, data->channel.tre_count);
                tre_count = data->channel.event_count;
+               dev_warn(gsi->dev, "channel %u limited to %u TREs\n",
+                        data->channel_id, tre_count);
        } else {
                tre_count = data->channel.tre_count;
        }