mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Colin Ian King <colin.king@canonical.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: staging: Add rtl8723bs sdio wifi driver
Date: Tue, 21 May 2019 18:57:12 +0200	[thread overview]
Message-ID: <4ef8b4e0-9e70-d800-2a68-cb539995d41f@redhat.com> (raw)
In-Reply-To: <9c766350-db9b-7a88-5655-54d03c8d2703@canonical.com>

Hi,

On 5/21/19 3:49 PM, Colin Ian King wrote:
> Hi,
> 
> static analysis with Coverity has detected an issues in the rtl8723bs
> wifi driver:
> 
> File: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c in function
> rtw_dbg_port():
> 
> CID 18480: Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
> dead_error_condition: The condition (extra_arg & 7U) > 7U cannot be true.
> 
>          if ((extra_arg & 0x07) > 0x07)
>                  padapter->driver_ampdu_spacing = 0xFF;
>          else
>                  padapter->driver_ampdu_spacing = extra_arg;
> 
> 
> I'm not sure if the mask is (in)correct or the value it is being
> compared to 0x07 is (in)correct (or both!)

Hmm, after looking at the rest of the code, it is clear that valid
values for driver_ampdu_spacing or 0 - 7, otherwise it should
be set to 0xff which means use the driver default.

I will send a patch fixing this.

Regards,

Hans


      reply	other threads:[~2019-05-21 16:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-21 13:49 Colin Ian King
2019-05-21 16:57 ` Hans de Goede [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=4ef8b4e0-9e70-d800-2a68-cb539995d41f@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=colin.king@canonical.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --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

all inboxes | Powered by JetHome®