[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <X+L6a+8C7xE39vJj@kroah.com>
Date: Wed, 23 Dec 2020 09:06:03 +0100
From: Greg KH <greg@...ah.com>
To: chensong <chensong_2000@....cn>
Cc: linux-kernel@...r.kernel.org, abbotti@....co.uk,
hsweeten@...ionengravers.com, chensong@...kylinos.cn
Subject: Re: [PATCH] staging: comedi: remove warnings of comedi_lrange
On Wed, Dec 23, 2020 at 10:24:23AM +0800, chensong wrote:
> Checkpatch.pl reports "warning: struct comedi_lrange should
> normally be const" in some places, which are supposed to
> be removed.
>
> Signed-off-by: chensong <chensong_2000@....cn>
> ---
> drivers/staging/comedi/drivers/das16.c | 4 ++--
> drivers/staging/comedi/drivers/jr3_pci.c | 4 ++--
> drivers/staging/comedi/drivers/ni_670x.c | 2 +-
> 3 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c
> index 4ac2622..40bfd84 100644
> --- a/drivers/staging/comedi/drivers/das16.c
> +++ b/drivers/staging/comedi/drivers/das16.c
> @@ -958,7 +958,7 @@ static const struct comedi_lrange *das16_ai_range(struct comedi_device *dev,
>
> /* get any user-defined input range */
> if (pg_type == das16_pg_none && (min || max)) {
> - struct comedi_lrange *lrange;
> + const struct comedi_lrange *lrange;
> struct comedi_krange *krange;
>
> /* allocate single-range range table */
> @@ -992,7 +992,7 @@ static const struct comedi_lrange *das16_ao_range(struct comedi_device *dev,
>
> /* get any user-defined output range */
> if (min || max) {
> - struct comedi_lrange *lrange;
> + const struct comedi_lrange *lrange;
> struct comedi_krange *krange;
>
> /* allocate single-range range table */
> diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
> index 7a02c4f..c35db0b 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 struct comedi_lrange l;
> + char _reserved[offsetof(const struct comedi_lrange, range[1])];
> };
>
> enum jr3_pci_poll_state {
> diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c
> index c197e47..66485ec 100644
> --- a/drivers/staging/comedi/drivers/ni_670x.c
> +++ b/drivers/staging/comedi/drivers/ni_670x.c
> @@ -200,7 +200,7 @@ static int ni_670x_auto_attach(struct comedi_device *dev,
> const struct comedi_lrange **range_table_list;
>
> range_table_list = kmalloc_array(32,
> - sizeof(struct comedi_lrange *),
> + sizeof(const struct comedi_lrange *),
> GFP_KERNEL);
> if (!range_table_list)
> return -ENOMEM;
> --
> 2.7.4
>
Hi,
This is the friendly patch-bot of Greg Kroah-Hartman. You have sent him
a patch that has triggered this response. He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created. Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.
You are receiving this message because of the following common error(s)
as indicated below:
- It looks like you did not use your "real" name for the patch on either
the Signed-off-by: line, or the From: line (both of which have to
match). Please read the kernel file, Documentation/SubmittingPatches
for how to do this correctly.
If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.
thanks,
greg k-h's patch email bot
Powered by blists - more mailing lists