SPDX cleanups and line over 80 characters fix
cover SPDX cleanups and line over 80 characters fix
This v1 series clean up SPDX and fix line over 80 characters.
Jules Irenge (3):
staging: rtl8192e: add SPDX GPL-2.0+ license identifier
staging: rtl8192e: remove license boilerplate text
staging: rtl8192e: fix line over 80 characters warning
drivers/staging/rtl8192e/dot11d.c | 57 ++++++++++++++----------------- 1 file changed, 25 insertions(+), 32 deletions(-)
Signature · 1 line
2.20.1
PATCH 1/3 staging: rtl8192e: add SPDX GPL-2.0+ license identifier
Add the SPDX GPL-2.0+ license identifier to fix checkpatch.pl warning Issue found by checkpatch.pl warning:
"WARNING: Missing or malformed SPDX-License-Identifier tag in line 1"
--- drivers/staging/rtl8192e/dot11d.c | 1 + 1 file changed, 1 insertion(+)
drivers/staging/rtl8192e/dot11d.c +1 -0
@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /****************************************************************************** * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved. *
Signature · 1 line
2.20.1
Greg KH
maintainerRe: [PATCH v1 1/3] staging: rtl8192e: add SPDX GPL-2.0+ license identifier
Quoted 14 lines · Jules Irenge
Add the SPDX GPL-2.0+ license identifier to fix checkpatch.pl warning Issue found by checkpatch.pl warning:
"WARNING: Missing or malformed SPDX-License-Identifier tag in line 1"Signed-off-by Jules Irenge <[email protected]>--- drivers/staging/rtl8192e/dot11d.c | 1 + 1 file changed, 1 insertion(+)drivers/staging/rtl8192e/dot11d.c +0
-0
drivers/staging/rtl8192e/dot11d.c line 1
Quoted 1 line
drivers/staging/rtl8192e/dot11d.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+
Why did you pick this specific license? It does not seem to match the license text in this file at all.
Be _VERY_ careful when doing stuff like this. If you get the license wrong, lawyers can get mad at you :(
Also, the file name "dot11d.c" should be in the subject line, as you are not adding the identifer to the whole driver, only one file.
Please fix this up and resend the whole series.
thanks,
greg k-h
Re: [PATCH v1 1/3] staging: rtl8192e: add SPDX GPL-2.0+ license identifier
Quoted 6 lines
Why did you pick this specific license? It does not seem to match the license text in this file at all.
Be _VERY_ careful when doing stuff like this. If you get the license wrong, lawyers can get mad at you :(
Quoted 6 lines
Also, the file name "
dot11d.c" should be in the subject line, as you are not adding the identifer to the whole driver, only one file.Please fix this up and resend the whole series.
thanks,
I read online that the default license is GPL-2.0+ as it is not indicated in the file. I think I was wrong. I would have asked the maintainer first. Okay, I will just reset it and try to think how to deal with it . I have in mind a GPL 1.0+ as it covers from 1 and above, I don t know if it can be fine. I have to ask the maintainer. I am sorry.
*Kind regards*
*Jules*
*..*
BCS West Yorkshire Secretary
Positive action combined with positive thinking results in success - Shiv Khera
Quoted 33 lines · Greg KH
Review
Quoted 10 lines · Jules Irenge
Add the SPDX GPL-2.0+ license identifier to fix checkpatch.pl warning Issue found by checkpatch.pl warning:
"WARNING: Missing or malformed SPDX-License-Identifier tag in line 1"Signed-off-by Jules Irenge <[email protected]>--- drivers/staging/rtl8192e/dot11d.c | 1 + 1 file changed, 1 insertion(+)(quoted diff) +0
-0
b/drivers/staging/rtl8192e/dot11d.cdrivers/staging/rtl8192e/dot11d.c line 1
Quoted 5 lines
index
68f53013cb95..74adb45efe73100644drivers/staging/rtl8192e/dot11d.c +1
-0@@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ Why did you pick this specific license? It does not seem to match the license text in this file at all.
Be _VERY_ careful when doing stuff like this. If you get the license wrong, lawyers can get mad at you :(
Also, the file name "
dot11d.c" should be in the subject line, as you are not adding the identifer to the whole driver, only one file.Please fix this up and resend the whole series.
thanks,
greg k-h
Greg KH
maintainerRe: [PATCH v1 1/3] staging: rtl8192e: add SPDX GPL-2.0+ license identifier
Quoted 9 lines · Jules Octave
Quoted 8 lines
Why did you pick this specific license? It does not seem to match the license text in this file at all.
Be _VERY_ careful when doing stuff like this. If you get the license wrong, lawyers can get mad at you :(
Also, the file name "
dot11d.c" should be in the subject line, as you are not adding the identifer to the whole driver, only one file.
Quoted 6 lines
Quoted 3 lines
Please fix this up and resend the whole series.
thanks,
I read online that the default license is GPL-2.0+ as it is not indicated in the file. I think I was wrong. I would have asked the maintainer first.
Where did you read that? The default license for the Linux kernel is "GPL-2.0" no "+" at all.
Quoted 3 lines
Okay, I will just reset it and try to think how to deal with it . I have in mind a GPL 1.0+ as it covers from 1 and above, I don t know if it can be fine. I have to ask the maintainer. I am sorry.
As the wording of the text says to refer to the LICENSE file, and that is GPLv2, that should be the license for this file as well.
But if you do not understand license issues, I would stay away from this and work on other tasks. It's tricky and people get upset if you get it wrong :)
thanks,
greg k-h
Re: [PATCH v1 1/3] staging: rtl8192e: add SPDX GPL-2.0+ license identifier
Quoted 10 lines
As the wording of the text says to refer to the LICENSE file, and that is GPLv2, that should be the license for this file as well.
But if you do not understand license issues, I would stay away from this and work on other tasks. It's tricky and people get upset if you get it wrong :)
thanks,
greg k-h
I am sorry about that , I will not guess next time. I will be more careful. I will update it to v2. I have also seen in the header it's GPL-2.0 🙈
*Jules*
*..*
BCS West Yorkshire Secretary
Positive action combined with positive thinking results in success - Shiv Khera
Quoted 38 lines · Greg KH
Quoted 6 lines · Jules Octave
Quoted 5 lines
Why did you pick this specific license? It does not seem to match the license text in this file at all.
Be _VERY_ careful when doing stuff like this. If you get the license wrong, lawyers can get mad at you :(
Quoted 8 lines
Quoted 6 lines
Also, the file name "
dot11d.c" should be in the subject line, as you are not adding the identifer to the whole driver, only one file.Please fix this up and resend the whole series.
thanks,
I read online that the default license is GPL-2.0+ as it is not
indicated
Quoted 1 line
in the file. I think I was wrong. I would have asked the maintainer
first.
Where did you read that? The default license for the Linux kernel is "GPL-2.0" no "+" at all.
Quoted 1 line
Okay, I will just reset it and try to think how to deal with it . I have
in
Quoted 2 lines
mind a GPL 1.0+ as it covers from 1 and above, I don t know if it can be fine. I have to ask the maintainer. I am sorry.
As the wording of the text says to refer to the LICENSE file, and that is GPLv2, that should be the license for this file as well.
But if you do not understand license issues, I would stay away from this and work on other tasks. It's tricky and people get upset if you get it wrong :)
thanks,
greg k-h
PATCH 2/3 staging: rtl8192e: remove license boilerplate text
In reply to Jules IrengeRemove license boilerplate text.
--- drivers/staging/rtl8192e/dot11d.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/staging/rtl8192e/dot11d.c +0 -8
@@ -2,14 +2,6 @@/****************************************************************************** * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved. * -* This program is distributed in the hope that it will be useful, but WITHOUT -* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -* more details. -* -* The full GNU General Public License is included in this distribution in the -* file called LICENSE. -* * Contact Information: * wlanfae <[email protected]> ******************************************************************************/
Signature · 1 line
2.20.1
PATCH 3/3 staging: rtl8192e: fix line over 80 characters warning
In reply to Jules IrengeReplace dot11d_info with dt1d_inf to fix checkpatch.pl warning
Issue found by checkpatch.pl:
"WARNING: line over 80 characters"
--- drivers/staging/rtl8192e/dot11d.c | 48 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-)
drivers/staging/rtl8192e/dot11d.c +24 -24
@@ -37,14 +37,14 @@ static struct channel_list channel_array[] = {void dot11d_init (struct rtllib_device *ieee) { -struct rt_dot11d_info *dot11d_info =GET_DOT11D_INFO (ieee); +struct rt_dot11d_info *dt1d_inf =GET_DOT11D_INFO (ieee); - dot11d_info->enabled = false; + dt1d_inf->enabled = false; - dot11d_info->state =DOT11D_STATE_NONE ; - dot11d_info->country_len =0 ; -memset (dot11d_info->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); -memset (dot11d_info->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 ); + dt1d_inf->state =DOT11D_STATE_NONE ; + dt1d_inf->country_len =0 ; +memset (dt1d_inf->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 );RESET_CIE_WATCHDOG (ieee); }EXPORT_SYMBOL (dot11d_init);
@@ -93,29 +93,29 @@ EXPORT_SYMBOL(dot11d_channel_map);void dot11d_reset (struct rtllib_device *ieee) { -struct rt_dot11d_info *dot11d_info =GET_DOT11D_INFO (ieee); +struct rt_dot11d_info *dt1d_inf =GET_DOT11D_INFO (ieee);u32 i; -memset (dot11d_info->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); -memset (dot11d_info->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 );for (i =1 ; i <=11 ; i++) - (dot11d_info->channel_map)[i] =1 ; + (dt1d_inf->channel_map)[i] =1 ;for (i =12 ; i <=14 ; i++) - (dot11d_info->channel_map)[i] =2 ; - dot11d_info->state =DOT11D_STATE_NONE ; - dot11d_info->country_len =0 ; + (dt1d_inf->channel_map)[i] =2 ; + dt1d_inf->state =DOT11D_STATE_NONE ; + dt1d_inf->country_len =0 ;RESET_CIE_WATCHDOG (ieee); }void dot11d_update_country (struct rtllib_device *dev,u8 *address,u16 country_len,u8 *country) { -struct rt_dot11d_info *dot11d_info =GET_DOT11D_INFO (dev); +struct rt_dot11d_info *dt1d_inf =GET_DOT11D_INFO (dev);u8 i, j, number_of_triples, max_channel_number;struct chnl_txpow_triple *triple; -memset (dot11d_info->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); -memset (dot11d_info->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 ); max_channel_number =0 ; number_of_triples = (country_len -3 ) /3 ; triple = (struct chnl_txpow_triple *)(country +3 );
@@ -135,8 +135,8 @@ void dot11d_update_country(struct rtllib_device *dev, u8 *address, }for (j =0 ; j < triple->num_channels; j++) { - dot11d_info->channel_map[triple->first_channel + j] =1 ; - dot11d_info->max_tx_power_list[triple->first_channel + j] = + dt1d_inf->channel_map[triple->first_channel + j] =1 ; + dt1d_inf->max_tx_power_list[triple->first_channel + j] = triple->max_tx_power; max_channel_number = triple->first_channel + j; }
@@ -146,18 +146,18 @@ void dot11d_update_country(struct rtllib_device *dev, u8 *address,UPDATE_CIE_SRC (dev, address); - dot11d_info->country_len = country_len; -memcpy (dot11d_info->country_buffer, country, country_len); - dot11d_info->state =DOT11D_STATE_LEARNED ; + dt1d_inf->country_len = country_len; +memcpy (dt1d_inf->country_buffer, country, country_len); + dt1d_inf->state =DOT11D_STATE_LEARNED ; }void dot11d_scan_complete (struct rtllib_device *dev) { -struct rt_dot11d_info *dot11d_info =GET_DOT11D_INFO (dev); +struct rt_dot11d_info *dt1d_inf =GET_DOT11D_INFO (dev); -switch (dot11d_info->state) { +switch (dt1d_inf->state) {case DOT11D_STATE_LEARNED : - dot11d_info->state =DOT11D_STATE_DONE ; + dt1d_inf->state =DOT11D_STATE_DONE ;break ;case DOT11D_STATE_DONE :dot11d_reset (dev);
Signature · 1 line
2.20.1
Greg KH
maintainerRe: [PATCH v1 3/3] staging: rtl8192e: fix line over 80 characters warning
Quoted 14 lines · Jules Irenge
Replace
dot11d_infowithdt1d_infto fix checkpatch.pl warning
Issue found by checkpatch.pl:
"WARNING: line over 80 characters"Signed-off-by Jules Irenge <[email protected]>--- drivers/staging/rtl8192e/dot11d.c | 48 +++++++++++++++---------------- 1 file changed, 24 insertions(+), 24 deletions(-)drivers/staging/rtl8192e/dot11d.c +0
-0
drivers/staging/rtl8192e/dot11d.c static struct channel_list channel_array[] = { · line 40
Quoted 5 lines
drivers/staging/rtl8192e/dot11d.c +1
-1@@ -37,14 +37,14 @@ static struct channel_list channel_array[] = {void dot11d_init (struct rtllib_device *ieee) { -struct rt_dot11d_info *dot11d_info =GET_DOT11D_INFO (ieee); +struct rt_dot11d_info *dt1d_inf =GET_DOT11D_INFO (ieee);
No, the original variable name is fine, don't shorten things for no good reason.
Quoted 5 lines
drivers/staging/rtl8192e/dot11d.c +1
-2- dot11d_info->enabled = false; + dt1d_inf->enabled = false; - dot11d_info->state =DOT11D_STATE_NONE ;
drivers/staging/rtl8192e/dot11d.c static struct channel_list channel_array[] = { · line 50
Quoted 10 lines
drivers/staging/rtl8192e/dot11d.c +4
-3- dot11d_info->country_len =0 ; -memset (dot11d_info->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); -memset (dot11d_info->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 ); + dt1d_inf->state =DOT11D_STATE_NONE ; + dt1d_inf->country_len =0 ; +memset (dt1d_inf->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 );RESET_CIE_WATCHDOG (ieee); }EXPORT_SYMBOL (dot11d_init);
None of those lines were over 80 characters, so why did you change anything here?
Quoted 14 lines
drivers/staging/rtl8192e/dot11d.c +3
-4@@ -93,29 +93,29 @@ EXPORT_SYMBOL(dot11d_channel_map);void dot11d_reset (struct rtllib_device *ieee) { -struct rt_dot11d_info *dot11d_info =GET_DOT11D_INFO (ieee); +struct rt_dot11d_info *dt1d_inf =GET_DOT11D_INFO (ieee);u32 i; -memset (dot11d_info->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); -memset (dot11d_info->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 );for (i =1 ; i <=11 ; i++) - (dot11d_info->channel_map)[i] =1 ;
drivers/staging/rtl8192e/dot11d.c EXPORT_SYMBOL(dot11d_channel_map); · line 108
Quoted 10 lines
drivers/staging/rtl8192e/dot11d.c +4
-3+ (dt1d_inf->channel_map)[i] =1 ;for (i =12 ; i <=14 ; i++) - (dot11d_info->channel_map)[i] =2 ; - dot11d_info->state =DOT11D_STATE_NONE ; - dot11d_info->country_len =0 ; + (dt1d_inf->channel_map)[i] =2 ; + dt1d_inf->state =DOT11D_STATE_NONE ; + dt1d_inf->country_len =0 ;RESET_CIE_WATCHDOG (ieee); }
Same with this function, what is wrong with it as-is?
Quoted 6 lines
drivers/staging/rtl8192e/dot11d.c +1
-1void dot11d_update_country (struct rtllib_device *dev,u8 *address,u16 country_len,u8 *country) { -struct rt_dot11d_info *dot11d_info =GET_DOT11D_INFO (dev); +struct rt_dot11d_info *dt1d_inf =GET_DOT11D_INFO (dev);
drivers/staging/rtl8192e/dot11d.c EXPORT_SYMBOL(dot11d_channel_map); · line 121
Quoted 10 lines
drivers/staging/rtl8192e/dot11d.c +2
-2u8 i, j, number_of_triples, max_channel_number;struct chnl_txpow_triple *triple; -memset (dot11d_info->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); -memset (dot11d_info->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->channel_map,0 ,MAX_CHANNEL_NUMBER +1 ); +memset (dt1d_inf->max_tx_power_list,0xFF ,MAX_CHANNEL_NUMBER +1 ); max_channel_number =0 ; number_of_triples = (country_len -3 ) /3 ; triple = (struct chnl_txpow_triple *)(country +3 );
Same here.
drivers/staging/rtl8192e/dot11d.c void dot11d_update_country(struct rtllib_device *dev, u8 *address, · line 142
Quoted 11 lines
drivers/staging/rtl8192e/dot11d.c +2
-2@@ -135,8 +135,8 @@ void dot11d_update_country(struct rtllib_device *dev, u8 *address, }for (j =0 ; j < triple->num_channels; j++) { - dot11d_info->channel_map[triple->first_channel + j] =1 ; - dot11d_info->max_tx_power_list[triple->first_channel + j] = + dt1d_inf->channel_map[triple->first_channel + j] =1 ; + dt1d_inf->max_tx_power_list[triple->first_channel + j] = triple->max_tx_power; max_channel_number = triple->first_channel + j; }
Ok, that one line is "too long", but really, it is fine as-is, no need to change it.
Quoted 15 lines
drivers/staging/rtl8192e/dot11d.c +3
-4@@ -146,18 +146,18 @@ void dot11d_update_country(struct rtllib_device *dev, u8 *address,UPDATE_CIE_SRC (dev, address); - dot11d_info->country_len = country_len; -memcpy (dot11d_info->country_buffer, country, country_len); - dot11d_info->state =DOT11D_STATE_LEARNED ; + dt1d_inf->country_len = country_len; +memcpy (dt1d_inf->country_buffer, country, country_len); + dt1d_inf->state =DOT11D_STATE_LEARNED ; }void dot11d_scan_complete (struct rtllib_device *dev) { -struct rt_dot11d_info *dot11d_info =GET_DOT11D_INFO (dev);
drivers/staging/rtl8192e/dot11d.c void dot11d_update_country(struct rtllib_device *dev, u8 *address, · line 163
Quoted 10 lines
drivers/staging/rtl8192e/dot11d.c +3
-2+struct rt_dot11d_info *dt1d_inf =GET_DOT11D_INFO (dev); -switch (dot11d_info->state) { +switch (dt1d_inf->state) {case DOT11D_STATE_LEARNED : - dot11d_info->state =DOT11D_STATE_DONE ; + dt1d_inf->state =DOT11D_STATE_DONE ;break ;case DOT11D_STATE_DONE :dot11d_reset (dev);
Why change these lines?
As was said before, checkpatch is a hint, not a hard rule. You always need to think when making changes.
thanks,
greg k-h