Re: [PATCH v2 2/2] staging: pi433: add debugfs interface

From: Greg KH
Date: Wed Jan 26 2022 - 07:03:11 EST


On Mon, Jan 24, 2022 at 05:27:21PM +1300, Paulo Miguel Almeida wrote:
> This adds debugfs interface that can be used for debugging possible
> hardware/software issues.
>
> It currently exposes the following debugfs entries for each SPI device
> probed:
>
> /sys/kernel/debug/pi433/<DEVICE>/regs
> ...
>
> The 'regs' file contains all rf69 uC registers values that are useful
> for troubleshooting misconfigurations between 2 devices. It contains one
> register per line so it should be easy to use normal filtering tools to
> find the registers of interest if needed.
>
> Signed-off-by: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@xxxxxxxxx>
> ---
> drivers/staging/pi433/pi433_if.c | 80 ++++++++++++++++++++++++++++++++
> drivers/staging/pi433/rf69.c | 2 +-
> drivers/staging/pi433/rf69.h | 1 +
> 3 files changed, 82 insertions(+), 1 deletion(-)

Breaks the build:

drivers/staging/pi433/pi433_if.c:1166:25: error: initialization of ‘int (*)(struct inode *, struct file *)’ from incompatible pointer type ‘ssize_t (*)(struct inode *, struct file *)’ {aka ‘long int (*)(struct inode *, struct file *)’} [-Werror=incompatible-pointer-types]
1166 | .open = pi433_debugfs_regs_open,
| ^~~~~~~~~~~~~~~~~~~~~~~