sys/util.h: helper macro to perform pointer difference
sys/util.h: helper macro to perform pointer difference

Some code casts pointers to ints in order to obtain their difference.
The compiler complains on 64-bit targets as an int is not wide enough
to hold a pointer.

Let's introduce the PTR_DIFF() helper macro to applies the proper cast
to pointers before performing a difference on them, and still return the
result as an int which should be large enough in practice.

Signed-off-by: Nicolas Pitre <76342682d5afc62854e1102d9578521fe1ed6813@baylibre.com>

galak/zephyr,Vudentz/zephyr,nashif/zephyr,nashif/zephyr,nashif/zephyr,finikorg/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,finikorg/zephyr,galak/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,Vudentz/zephyr,nashif/zephyr,Vudentz/zephyr,zephyrproject-rtos/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,Vudentz/zephyr,nashif/zephyr,galak/zephyr,zephyrproject-rtos/zephyr,galak/zephyr,finikorg/zephyr,finikorg/zephyr,finikorg/zephyr