* [PATCH v3 0/2] staging: vt6656: Cleanup of the vnt_get_frame_time function @ 2020-04-07 16:39 Oscar Carter 2020-04-07 16:39 ` [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate Oscar Carter 2020-04-07 16:39 ` [PATCH v3 2/2] staging: vt6656: Remove unnecessary local variable initialization Oscar Carter 0 siblings, 2 replies; 7+ messages in thread From: Oscar Carter @ 2020-04-07 16:39 UTC (permalink / raw) To: Forest Bond, Greg Kroah-Hartman Cc: Oscar Carter, Malcolm Priestley, Dan Carpenter, Quentin Deslandes, Amir Mahdi Ghorbanian, devel, linux-kernel This patch series makes a cleanup of the vnt_get_frame_time function. The first patch makes use of the define RATE_11M instead of a magic number. The second patch remove unnecessary local variable initialization. Changelog v1 -> v2 - Not use the ARRAY_SIZE macro to compare against the tx_rate variable. Changelog v2 -> v3 - Use the version number in the subject line of patch 1/2 and 2/2. Oscar Carter (2): staging: vt6656: Use define instead of magic number for tx_rate staging: vt6656: Remove unnecessary local variable initialization drivers/staging/vt6656/baseband.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.20.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate 2020-04-07 16:39 [PATCH v3 0/2] staging: vt6656: Cleanup of the vnt_get_frame_time function Oscar Carter @ 2020-04-07 16:39 ` Oscar Carter 2020-04-13 12:56 ` Greg Kroah-Hartman 2020-04-07 16:39 ` [PATCH v3 2/2] staging: vt6656: Remove unnecessary local variable initialization Oscar Carter 1 sibling, 1 reply; 7+ messages in thread From: Oscar Carter @ 2020-04-07 16:39 UTC (permalink / raw) To: Forest Bond, Greg Kroah-Hartman Cc: Oscar Carter, Malcolm Priestley, Dan Carpenter, Quentin Deslandes, Amir Mahdi Ghorbanian, devel, linux-kernel Use the define RATE_11M present in the file "device.h" instead of the magic number 3. So the code is more clear. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Oscar Carter <oscar.carter@gmx.com> --- drivers/staging/vt6656/baseband.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index a19a563d8bcc..092e56668a09 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -24,6 +24,7 @@ #include <linux/bits.h> #include <linux/kernel.h> +#include "device.h" #include "mac.h" #include "baseband.h" #include "rf.h" @@ -141,7 +142,7 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type, rate = (unsigned int)vnt_frame_time[tx_rate]; - if (tx_rate <= 3) { + if (tx_rate <= RATE_11M) { if (preamble_type == 1) preamble = 96; else -- 2.20.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate 2020-04-07 16:39 ` [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate Oscar Carter @ 2020-04-13 12:56 ` Greg Kroah-Hartman 2020-04-13 14:13 ` Oscar Carter 0 siblings, 1 reply; 7+ messages in thread From: Greg Kroah-Hartman @ 2020-04-13 12:56 UTC (permalink / raw) To: Oscar Carter Cc: Forest Bond, devel, Malcolm Priestley, linux-kernel, Dan Carpenter On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote: > Use the define RATE_11M present in the file "device.h" instead of the > magic number 3. So the code is more clear. > > Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> > Signed-off-by: Oscar Carter <oscar.carter@gmx.com> > --- > drivers/staging/vt6656/baseband.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) This patch did not apply to my tree, please rebase and resend. thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate 2020-04-13 12:56 ` Greg Kroah-Hartman @ 2020-04-13 14:13 ` Oscar Carter 2020-04-13 14:29 ` Greg Kroah-Hartman 0 siblings, 1 reply; 7+ messages in thread From: Oscar Carter @ 2020-04-13 14:13 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Oscar Carter, Forest Bond, devel, Malcolm Priestley, linux-kernel, Dan Carpenter On Mon, Apr 13, 2020 at 02:56:33PM +0200, Greg Kroah-Hartman wrote: > On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote: > > Use the define RATE_11M present in the file "device.h" instead of the > > magic number 3. So the code is more clear. > > > > Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> > > Signed-off-by: Oscar Carter <oscar.carter@gmx.com> > > --- > > drivers/staging/vt6656/baseband.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > This patch did not apply to my tree, please rebase and resend. > I need to rebase only this patch for this serie so, it's necessary to send all the serie or only this patch? If it's only this patch I need to indicate v4 in the subject or a v2 due it's related only with this patch? > thanks, > > greg k-h thanks, oscar carter ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate 2020-04-13 14:13 ` Oscar Carter @ 2020-04-13 14:29 ` Greg Kroah-Hartman 2020-04-13 14:38 ` Oscar Carter 0 siblings, 1 reply; 7+ messages in thread From: Greg Kroah-Hartman @ 2020-04-13 14:29 UTC (permalink / raw) To: Oscar Carter Cc: devel, Malcolm Priestley, linux-kernel, Forest Bond, Dan Carpenter On Mon, Apr 13, 2020 at 04:13:15PM +0200, Oscar Carter wrote: > On Mon, Apr 13, 2020 at 02:56:33PM +0200, Greg Kroah-Hartman wrote: > > On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote: > > > Use the define RATE_11M present in the file "device.h" instead of the > > > magic number 3. So the code is more clear. > > > > > > Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> > > > Signed-off-by: Oscar Carter <oscar.carter@gmx.com> > > > --- > > > drivers/staging/vt6656/baseband.c | 3 ++- > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > This patch did not apply to my tree, please rebase and resend. > > > I need to rebase only this patch for this serie so, it's necessary to send all > the serie or only this patch? If I applied the other one, just this patch. > If it's only this patch I need to indicate v4 in the subject or a v2 due it's > related only with this patch? As so many of your patches were rejected because of this, rebase them all, and resend them all as a single patch series, so that I know what order to apply them in and have a chance to get it right :) thanks, greg k-h ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate 2020-04-13 14:29 ` Greg Kroah-Hartman @ 2020-04-13 14:38 ` Oscar Carter 0 siblings, 0 replies; 7+ messages in thread From: Oscar Carter @ 2020-04-13 14:38 UTC (permalink / raw) To: Greg Kroah-Hartman Cc: Oscar Carter, devel, Malcolm Priestley, linux-kernel, Forest Bond, Dan Carpenter On Mon, Apr 13, 2020 at 04:29:07PM +0200, Greg Kroah-Hartman wrote: > On Mon, Apr 13, 2020 at 04:13:15PM +0200, Oscar Carter wrote: > > On Mon, Apr 13, 2020 at 02:56:33PM +0200, Greg Kroah-Hartman wrote: > > > On Tue, Apr 07, 2020 at 06:39:14PM +0200, Oscar Carter wrote: > > > > Use the define RATE_11M present in the file "device.h" instead of the > > > > magic number 3. So the code is more clear. > > > > > > > > Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> > > > > Signed-off-by: Oscar Carter <oscar.carter@gmx.com> > > > > --- > > > > drivers/staging/vt6656/baseband.c | 3 ++- > > > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > > > This patch did not apply to my tree, please rebase and resend. > > > > > I need to rebase only this patch for this serie so, it's necessary to send all > > the serie or only this patch? > > If I applied the other one, just this patch. > > > If it's only this patch I need to indicate v4 in the subject or a v2 due it's > > related only with this patch? > > As so many of your patches were rejected because of this, rebase them > all, and resend them all as a single patch series, so that I know what > order to apply them in and have a chance to get it right :) Ok, I will create a patch series with all the rejected patches rebased. > > thanks, > > greg k-h thanks, oscar carter ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v3 2/2] staging: vt6656: Remove unnecessary local variable initialization 2020-04-07 16:39 [PATCH v3 0/2] staging: vt6656: Cleanup of the vnt_get_frame_time function Oscar Carter 2020-04-07 16:39 ` [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate Oscar Carter @ 2020-04-07 16:39 ` Oscar Carter 1 sibling, 0 replies; 7+ messages in thread From: Oscar Carter @ 2020-04-07 16:39 UTC (permalink / raw) To: Forest Bond, Greg Kroah-Hartman Cc: Oscar Carter, Malcolm Priestley, Dan Carpenter, Quentin Deslandes, Amir Mahdi Ghorbanian, devel, linux-kernel Don't initialize the rate variable as it is set a few lines later. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Oscar Carter <oscar.carter@gmx.com> --- drivers/staging/vt6656/baseband.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index 092e56668a09..5d9bc97916a5 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -135,7 +135,7 @@ unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type, { unsigned int frame_time; unsigned int preamble; - unsigned int rate = 0; + unsigned int rate; if (tx_rate > RATE_54M) return 0; -- 2.20.1 ^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-04-13 14:38 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-07 16:39 [PATCH v3 0/2] staging: vt6656: Cleanup of the vnt_get_frame_time function Oscar Carter 2020-04-07 16:39 ` [PATCH v3 1/2] staging: vt6656: Use define instead of magic number for tx_rate Oscar Carter 2020-04-13 12:56 ` Greg Kroah-Hartman 2020-04-13 14:13 ` Oscar Carter 2020-04-13 14:29 ` Greg Kroah-Hartman 2020-04-13 14:38 ` Oscar Carter 2020-04-07 16:39 ` [PATCH v3 2/2] staging: vt6656: Remove unnecessary local variable initialization Oscar Carter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).