Re: [PATCH] Staging: comedi: drivers: jr3_pci: fixed two warnings

From: Greg KH
Date: Mon Apr 13 2020 - 08:54:41 EST


On Sun, Apr 12, 2020 at 04:25:08PM +0200, carlosteniswarrior@xxxxxxxxx wrote:
> Fixed two checkpatch warnings.
>
> Signed-off-by: Carlos Guerrero Alvarez <carlosteniswarrior@xxxxxxxxx>
> ---
> drivers/staging/comedi/drivers/jr3_pci.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
> index c3c88e6d298f..6bc87d3c6c3b 100644
> --- a/drivers/staging/comedi/drivers/jr3_pci.c
> +++ b/drivers/staging/comedi/drivers/jr3_pci.c
> @@ -91,8 +91,8 @@ struct jr3_pci_dev_private {
> };
>
> union jr3_pci_single_range {
> - struct comedi_lrange l;
> - char _reserved[offsetof(struct comedi_lrange, range[1])];
> + const comedi_lrange l;
> + char _reserved[offsetof(const comedi_lrange, range[1])];
> };

Please work on your knowledge of C first, before modifying Linux kernel
code. Mistakes like this show you need a bit more work there first.

Good luck!

greg k-h