Re: [PATCH] coresight: etm4x: Fix BMVAL misuse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 26 Oct 2019 at 14:26, Rikard Falkeborn
<rikard.falkeborn@xxxxxxxxx> wrote:
>
> The second argument should be the lsb and the third argument should be
> the msb.
>
> Fixes: 62ab9bce3bc7 ("coresight: etm4x: Add missing API to set EL match on address filters")
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@xxxxxxxxx>
> ---
> Spotted while trying to get compile time checking that the order of the
> arguments to GENMASK macro is correct (BMVAL uses GENMASK).
>
> I have only compile tested the patch.
>
>  drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> index 3fc12ac44270..ce41482431f9 100644
> --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c
> @@ -1246,7 +1246,7 @@ static ssize_t addr_exlevel_s_ns_show(struct device *dev,
>
>         spin_lock(&drvdata->spinlock);
>         idx = config->addr_idx;
> -       val = BMVAL(config->addr_acc[idx], 14, 8);
> +       val = BMVAL(config->addr_acc[idx], 8, 14);

Good catch - thank you for that,
Mathieu

>         spin_unlock(&drvdata->spinlock);
>         return scnprintf(buf, PAGE_SIZE, "%#lx\n", val);
>  }
> --
> 2.23.0
>



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux