coresight: etb10: Remove useless conversion to LE
authorMathieu Poirier <mathieu.poirier@linaro.org>
Wed, 2 Aug 2017 16:21:56 +0000 (10:21 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 14:05:47 +0000 (16:05 +0200)
Internal CoreSight components are rendering trace data in little-endian
format.  As such there is no need to convert the data once more, hence
removing the extra step.

Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etb10.c

index d9c233135d6d3659d2a45d609907bbdbab6a552d..50f4846e627126db69128bca456a5ce4820ff96a 100644 (file)
@@ -233,10 +233,8 @@ static void etb_dump_hw(struct etb_drvdata *drvdata)
        for (i = 0; i < depth; i++) {
                read_data = readl_relaxed(drvdata->base +
                                          ETB_RAM_READ_DATA_REG);
-               *buf_ptr++ = read_data >> 0;
-               *buf_ptr++ = read_data >> 8;
-               *buf_ptr++ = read_data >> 16;
-               *buf_ptr++ = read_data >> 24;
+               *(u32 *)buf_ptr = read_data;
+               buf_ptr += 4;
        }
 
        if (frame_off) {
@@ -444,10 +442,8 @@ static void etb_update_buffer(struct coresight_device *csdev,
                buf_ptr = buf->data_pages[cur] + offset;
                read_data = readl_relaxed(drvdata->base +
                                          ETB_RAM_READ_DATA_REG);
-               *buf_ptr++ = read_data >> 0;
-               *buf_ptr++ = read_data >> 8;
-               *buf_ptr++ = read_data >> 16;
-               *buf_ptr++ = read_data >> 24;
+               *(u32 *)buf_ptr = read_data;
+               buf_ptr += 4;
 
                offset += 4;
                if (offset >= PAGE_SIZE) {