mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Riyan Dhiman <riyandhiman14@gmail.com>
Cc: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev
Subject: Re: [PATCH] staging: vme_user: added bound check to geoid
Date: Tue, 27 Aug 2024 12:40:08 +0300	[thread overview]
Message-ID: <473fe1f7-33c5-43ca-94c6-b874a1a60f59@stanley.mountain> (raw)
In-Reply-To: <20240827090955.49339-1-riyandhiman14@gmail.com>

You need to put v2 (v3 now) into the subject.

https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/

On Tue, Aug 27, 2024 at 02:39:55PM +0530, Riyan Dhiman wrote:
> Added bound check for geoid in probe function because geoid will
> always be positive and less than VME_MAX_SLOT

Add a period to the end of the sentence.

But also add that "The geoid variable is a module parameter which lets people
hard code the slot number."  It's important to mention that it's a module
parameter so people know that it's root only.  Maybe mention that explicitly.
"The geoid variable is a module parameter so it can only be controlled by the
root user.  Only values between 0 and VME_MAX_SLOT make sense.  Invalid values
don't seem to cause a serious issue except for perhaps some weird error codes."

> 
> Signed-off-by: Riyan Dhiman <riyandhiman14@gmail.com>
> ---
>  drivers/staging/vme_user/vme_fake.c   | 7 +++++++
>  drivers/staging/vme_user/vme_tsi148.c | 7 +++++++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/drivers/staging/vme_user/vme_fake.c b/drivers/staging/vme_user/vme_fake.c
> index 7f84d1c86f29..d8f4ba29da0e 100644
> --- a/drivers/staging/vme_user/vme_fake.c
> +++ b/drivers/staging/vme_user/vme_fake.c
> @@ -1059,6 +1059,13 @@ static int __init fake_init(void)
>  	struct vme_slave_resource *slave_image;
>  	struct vme_lm_resource *lm;
>  
> +	/* If geoid provided, validate it is positive and less than VME_MAX_SLOTS */

This comment is obvoius.  Just leave it out.

regards,
dan carpener


  reply	other threads:[~2024-08-27  9:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27  9:09 Riyan Dhiman
2024-08-27  9:40 ` Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-08-27  5:55 Riyan Dhiman
2024-08-27  8:40 ` Dan Carpenter

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=473fe1f7-33c5-43ca-94c6-b874a1a60f59@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=riyandhiman14@gmail.com \
    /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

all inboxes | Powered by JetHome®