linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Refactor the vnt_rf_table_download function
@ 2020-04-25 12:38 Oscar Carter
  2020-04-25 12:38 ` [PATCH 1/3] staging: vt6656: Remove the local variable "array" Oscar Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Oscar Carter @ 2020-04-25 12:38 UTC (permalink / raw)
  To: Forest Bond, Greg Kroah-Hartman
  Cc: Oscar Carter, Malcolm Priestley, Quentin Deslandes, devel, linux-kernel

This patch series refactors the vnt_rf_table_download function through
tree patches.

The first one removes the local variable "array" and all the memcpy
function calls because this copy operation from different arrays to this
variable is unnecessary.

The second patch replaces the "goto" statements with a direct "return ret"
as the jump label only returns the ret variable.

The third patch replaces three while loops with three calls to the
vnt_control_out_blocks function. This way avoid repeat a functionality
that already exists.

Oscar Carter (3):
  staging: vt6656: Remove the local variable "array"
  staging: vt6656: Use return instead of goto
  staging: vt6656: Remove duplicate code in vnt_rf_table_download

 drivers/staging/vt6656/rf.c | 85 +++++++------------------------------
 1 file changed, 16 insertions(+), 69 deletions(-)

--
2.20.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-04-25 14:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-25 12:38 [PATCH 0/3] Refactor the vnt_rf_table_download function Oscar Carter
2020-04-25 12:38 ` [PATCH 1/3] staging: vt6656: Remove the local variable "array" Oscar Carter
2020-04-25 12:50   ` Joe Perches
2020-04-25 14:29     ` Oscar Carter
2020-04-25 12:38 ` [PATCH 2/3] staging: vt6656: Use return instead of goto Oscar Carter
2020-04-25 12:38 ` [PATCH 3/3] staging: vt6656: Remove duplicate code in vnt_rf_table_download 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).