All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gargi Sharma <gs051095@gmail.com>
To: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Cc: outreachy-kernel <outreachy-kernel@googlegroups.com>
Subject: Re: [Outreachy kernel] [PATCH] h [Patch] Fixed unnecessary typecasting to int. Error found with checkpatch. Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in>
Date: Mon, 26 Feb 2018 18:55:43 +0000	[thread overview]
Message-ID: <CAOCi2DFEG2FRaZ2HE5g4uNHmztSvPFC=COEnZ6ucuAYhxDz6Wg@mail.gmail.com> (raw)
In-Reply-To: <1519669095-31351-1-git-send-email-nishka.dasgupta_ug18@ashoka.edu.in>

Hi Nishka,

Thanks for your patch. A few things you would want to take care of:
1) Subject line: Has two [Patch]. There should be only one. Also, if
you see the other patches in the mailing list, you can see the subject
line should be {driver}: {filename}.

On Mon, Feb 26, 2018 at 6:18 PM, Nishka Dasgupta
<nishka.dasgupta_ug18@ashoka.edu.in> wrote:

2) Here you would want to mention what changes you made and why you
made them. Also mention if you used any tools. The signed off by would
also go here and not the subject line.
3) You would also want to add the maintainer of this driver to the
patch you submit.

> ---
>  drivers/staging/ks7010/ks_wlan_net.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
> index e48c557..69cd8347 100644
> --- a/drivers/staging/ks7010/ks_wlan_net.c
> +++ b/drivers/staging/ks7010/ks_wlan_net.c
> @@ -201,6 +201,8 @@ static int ks_wlan_set_freq(struct net_device *dev,
>  {
>         struct ks_wlan_private *priv = netdev_priv(dev);
>         int channel;
> +       int a2412 = 2.412e8;
> +       int b2487 = 2.487e8;
>
>         if (priv->sleep_mode == SLP_SLEEP)
>                 return -EPERM;
> @@ -208,7 +210,7 @@ static int ks_wlan_set_freq(struct net_device *dev,
>         /* for SLEEP MODE */
>         /* If setting by frequency, convert to a channel */
>         if ((fwrq->e == 1) &&
> -           (fwrq->m >= (int)2.412e8) && (fwrq->m <= (int)2.487e8)) {
> +           (fwrq->m >= a2412) && (fwrq->m <= b2487)) {

4) I don't think this is right. Why do you have an a and a b prepended?
5) Lastly did you compile the kernel before sending in your changes?
If not, please do.

Thanks!
Gargi

>                 int f = fwrq->m / 100000;
>                 int c = 0;
>
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1519669095-31351-1-git-send-email-nishka.dasgupta_ug18%40ashoka.edu.in.
> For more options, visit https://groups.google.com/d/optout.


  reply	other threads:[~2018-02-26 18:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-26 18:18 [PATCH] h [Patch] Fixed unnecessary typecasting to int. Error found with checkpatch. Signed-off-by: Nishka Dasgupta <nishka.dasgupta_ug18@ashoka.edu.in> Nishka Dasgupta
2018-02-26 18:55 ` Gargi Sharma [this message]
2018-02-27 13:23   ` Re: [PATCH] h [Patch] Fixed unnecessary typecasting to in. " Nishka Dasgupta
2018-02-27 13:39     ` [Outreachy kernel] " Julia Lawall
2018-02-27 13:53       ` Nishka Dasgupta
2018-02-27 13:58         ` [Outreachy kernel] Re: Julia Lawall
2018-02-27 14:07           ` Re: Nishka Dasgupta

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='CAOCi2DFEG2FRaZ2HE5g4uNHmztSvPFC=COEnZ6ucuAYhxDz6Wg@mail.gmail.com' \
    --to=gs051095@gmail.com \
    --cc=nishka.dasgupta_ug18@ashoka.edu.in \
    --cc=outreachy-kernel@googlegroups.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.