mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Oscar Gomez Fuente <oscargomezf@gmail.com>
Cc: gregkh@linuxfoundation.org, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: rtl8192e: Fix space and suspect issue
Date: Thu, 28 Feb 2019 12:27:20 -0800	[thread overview]
Message-ID: <d169efc03143e1cec2f4d20f66381517c6c6bc55.camel@perches.com> (raw)
In-Reply-To: <1551377249-12142-1-git-send-email-oscargomezf@gmail.com>

On Thu, 2019-02-28 at 19:07 +0100, Oscar Gomez Fuente wrote:
> These changes fixed a checkpatch error for space required before the
> open brace '{' as well as a warning for suspect code indent for
> conditional statements.

Simple enough, thanks.

> diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
[]
> @@ -541,8 +541,8 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
>  		if (idx < 1 || idx > NUM_WEP_KEYS)

trivia:

the idx < 1 here test is superfluous as idx
is an int masked with 0xff and can't be < 1
if also non-zero

Original code:

	idx = encoding->flags & IW_ENCODE_INDEX;
	if (idx) {
		if (idx < 1 || idx > NUM_WEP_KEYS)
			return -EINVAL;
		idx--;
	}



      reply	other threads:[~2019-02-28 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 18:07 Oscar Gomez Fuente
2019-02-28 20:27 ` Joe Perches [this message]

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=d169efc03143e1cec2f4d20f66381517c6c6bc55.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oscargomezf@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®