mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: chensong <chensong_2000@189.cn>
Cc: linux-kernel@vger.kernel.org, abbotti@mev.co.uk,
	hsweeten@visionengravers.com, chensong@tj.kylinos.cn
Subject: Re: [PATCH] staging: comedi: remove warnings of comedi_lrange
Date: Wed, 23 Dec 2020 09:06:03 +0100	[thread overview]
Message-ID: <X+L6a+8C7xE39vJj@kroah.com> (raw)
In-Reply-To: <1608690263-29411-1-git-send-email-chensong_2000@189.cn>

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@189.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

  reply	other threads:[~2020-12-23  8:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-23  2:24 chensong
2020-12-23  8:06 ` Greg KH [this message]
2020-12-29  3:50 ` kernel test robot
2020-12-29  3:56 ` kernel test robot
2020-12-29  4:00 ` kernel test robot
2020-12-24  0:58 Song Chen
2020-12-28 14:04 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=X+L6a+8C7xE39vJj@kroah.com \
    --to=greg@kroah.com \
    --cc=abbotti@mev.co.uk \
    --cc=chensong@tj.kylinos.cn \
    --cc=chensong_2000@189.cn \
    --cc=hsweeten@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome