]> git.baikalelectronics.ru Git - kernel.git/commitdiff
coresight: Initialize arg in sparse friendly way
authorStephen Boyd <swboyd@chromium.org>
Mon, 18 May 2020 18:02:37 +0000 (12:02 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 May 2020 14:31:17 +0000 (16:31 +0200)
Sparse gets annoyed when this initializer is 0 but the first struct
member is a pointer. Just use { } to initialize instead so that sparse
is quiet.

Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200518180242.7916-19-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight-etm3x.c
drivers/hwtracing/coresight/coresight-etm4x.c

index e2cb6873c3f219a6d937a182758b630ebc6da305..bf22dcfd33271cc993a0c28b291ed3dc2fa9f0d3 100644 (file)
@@ -504,7 +504,7 @@ static int etm_enable_perf(struct coresight_device *csdev,
 static int etm_enable_sysfs(struct coresight_device *csdev)
 {
        struct etm_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
-       struct etm_enable_arg arg = { };
+       struct etm_enable_arg arg = { };
        int ret;
 
        spin_lock(&drvdata->spinlock);
index 7443a2e4528d4e8a437b3bdc0b6184aa850beed0..fb0f5f4f3a91c7129de9e598f7a60dfc42b6baeb 100644 (file)
@@ -412,7 +412,7 @@ out:
 static int etm4_enable_sysfs(struct coresight_device *csdev)
 {
        struct etmv4_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent);
-       struct etm4_enable_arg arg = { };
+       struct etm4_enable_arg arg = { };
        int ret;
 
        spin_lock(&drvdata->spinlock);