On Mon, 24 Sep 2012 23:24:09 +0800, Feng Tang wrote:
[snip]
> +/* Return 0 if matched */
> +int check_perf_magic(u64 magic)
> +{
> +     if (!memcmp(&magic, __perf_magic1, sizeof(magic))
> +             || magic == __perf_magic2
> +             || magic == __perf_magic2_sw)
> +             return 0;
> +
> +     return -1;
> +}

Just an idea.  How about returning version number instead of 0 so that
it can be used elsewhere those check is needed and possibly wants to
know the version number also?

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to