Re: [PATCH 5/5] kernel: tracepoints: add support for relative references

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

 



* Ard Biesheuvel <ard.biesheuvel@xxxxxxxxxx> wrote:

> -static void for_each_tracepoint_range(struct tracepoint * const *begin,
> -		struct tracepoint * const *end,
> +static void for_each_tracepoint_range(const void *begin, const void *end,
>  		void (*fct)(struct tracepoint *tp, void *priv),
>  		void *priv)
>  {
> +#ifdef CONFIG_HAVE_ARCH_PREL32_RELOCATIONS
> +	const signed int *iter;
> +
> +	if (!begin)
> +		return;
> +	for (iter = begin; iter < (signed int *)end; iter++) {
> +		fct((struct tracepoint *)((unsigned long)iter + *iter), priv);
> +	}

I think checkpatch is correct here to complain about the unnecessary curly braces 
here.

Plus why the heavy use of 'signed int' here and elsewhere in the patches - why 
not 'int' ?

Plus #2, the heavy use of type casts looks pretty ugly to begin with - is there no 
way to turn this into more natural code?

Thanks,

	Ingo



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux