The same code regardless of the outcome of the if statement. This may of
course be a miss and there should be a difference in the code.
And clean up another duplicate line of code.
This was partly found using a static code analysis program called cppcheck.
Rickard Strandqvist (1):
staging: rtl8712: rtl871x_ioctl_linux.c: Cleaning up useless if statement
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--
1.7.10.4
The same code regardless of the outcome of the if statement.
And clean up another duplicate line of code.
Signed-off-by: Rickard Strandqvist <[email protected]>
---
drivers/staging/rtl8712/rtl871x_ioctl_linux.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 23d539d..bd82bd3 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -1465,17 +1465,12 @@ static int r8711_wx_get_rate(struct net_device *dev,
RTL8712_RF_2T2R == rf_type)
max_rate = (bw_40MHz) ? ((short_GI) ? 300 :
270) : ((short_GI) ? 144 : 130);
- else if (mcs_rate & 0x0080) /* MCS7 */
- max_rate = (bw_40MHz) ? ((short_GI) ? 150 :
- 135) : ((short_GI) ? 72 : 65);
else /* default MCS7 */
max_rate = (bw_40MHz) ? ((short_GI) ? 150 :
135) : ((short_GI) ? 72 : 65);
max_rate *= 2; /* Mbps/2 */
- wrqu->bitrate.value = max_rate * 500000;
- } else {
- wrqu->bitrate.value = max_rate * 500000;
}
+ wrqu->bitrate.value = max_rate * 500000;
} else
return -ENOLINK;
return 0;
--
1.7.10.4
On Sun, Jun 15, 2014 at 07:20:57PM +0200, Rickard Strandqvist wrote:
> The same code regardless of the outcome of the if statement. This may of
> course be a miss and there should be a difference in the code.
> And clean up another duplicate line of code.
>
> This was partly found using a static code analysis program called cppcheck.
>
We don't need a cover letter for a single patch. Just put this stuff in
the patch description next time.
regards,
dan carpenter
Hi
It's a bit confusing with this, I have received a lot of complaints
that I have not had a cover letter.
When should I include it? In an obvious patching. But where there's a
need to explain anything further should have a cover letter.
In this case, I suspected that there is a missed special case, that I
mentioned in the cover letter.
But did my patch that otherwise took away the otherwise unnecessary
code. Thought it was the right use...?
Kind regards
Rickard Strandqvist
2014-06-16 11:05 GMT+02:00 Dan Carpenter <[email protected]>:
> On Sun, Jun 15, 2014 at 07:20:57PM +0200, Rickard Strandqvist wrote:
>> The same code regardless of the outcome of the if statement. This may of
>> course be a miss and there should be a difference in the code.
>> And clean up another duplicate line of code.
>>
>> This was partly found using a static code analysis program called cppcheck.
>>
>
> We don't need a cover letter for a single patch. Just put this stuff in
> the patch description next time.
>
> regards,
> dan carpenter
>
On Fri, Jun 20, 2014 at 12:46:33PM +0200, Rickard Strandqvist wrote:
> Hi
>
> It's a bit confusing with this, I have received a lot of complaints
> that I have not had a cover letter.
> When should I include it? In an obvious patching. But where there's a
> need to explain anything further should have a cover letter.
Cover letters are for if you have a series of patches and they follow a
theme. "Add support for XXX feature in a series of 8 patches". "What
is in my pull request for the new kernel." It's just a shorter summary.
This is just one patch not a series.
I have never sent a cover letter in my life. I don't know who is
complaining to you...
In this case the changelog would have been better and more complete if
all the cover letter information were in the permanent commit log.
regards,
dan carpenter