Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp978077ybz; Sat, 25 Apr 2020 08:20:33 -0700 (PDT) X-Google-Smtp-Source: APiQypLr8QDL5bGHqeCIGLAiEG9WK0T9dnOrhz4QVly2CCu97VSKMqKGQxsmjXer33Zh9yXHwGFh X-Received: by 2002:aa7:c34e:: with SMTP id j14mr12027190edr.195.1587828033151; Sat, 25 Apr 2020 08:20:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587828033; cv=none; d=google.com; s=arc-20160816; b=bGHp7/58ZME3JeVY1wZHPFscYDLeqCKiXgi1V5L2OKGKv6E6wa7/uywWiAs5TZnqAY ysgh0y/WZmUrJdJap6iygjgDUlpX8KqIeb+QbIx4RM55iAAlOxTLejBWrxVDc9B551ms F8DllgL1DW0tAvWlYoN3MFQFM7lRzk7z48cM/vpkEkZzV1KfOeNIwQWSq6sqqPgN3eK8 JuWDx10atxbTPMWIEeuyF87AKDErKrymgB39+kfantUq7BX3aMsQRnBbz8HF/1Y3Sirw I81YRkEVas2xkQjS+uPKbVKyY/0Fh2tAcv8ByuJDxbdUr1BGzo1niOyP6voYtz1/gDpM S69Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=Y2X6ioShsVQTzC9eUI9wOhsDlK3oIkb80pWrVdJtb/0=; b=qq7HpIV24I8AveqYZt7Ujq0HrIbywtAvHHO/puZ6zjoKVh1NxWfLs6CAM/4l+bLNds LasG9ksMGpL4i+/Sm1C9+i2HUkjJIoX7CulSqrUCGFcWyLX6JbvvhtkMbSmauj00Kjd3 9OnDlIzeIbAB0OiEt8vz83Ny5IT51S9S+lv5IidNqRwzPojhKWoJqWq9x60Bb/ias7Ft e5HqX+ERtKwt+5ALo4zg/cNbq/oCek0AQ0jc15IJZAJ210rL2kJ1SIyE+ewbaUn24RLf nJNhVeZtVHtj0xc3yhdBa31kTOHndFRJtS1qQ30fdC5+rLAlU+X7eV0BL4PhkOwacAlE famQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=dtUI6W4S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a23si4721340edy.27.2020.04.25.08.20.07; Sat, 25 Apr 2020 08:20:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=dtUI6W4S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726128AbgDYPSe (ORCPT + 99 others); Sat, 25 Apr 2020 11:18:34 -0400 Received: from mout.gmx.net ([212.227.17.21]:57681 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726062AbgDYPSe (ORCPT ); Sat, 25 Apr 2020 11:18:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1587827906; bh=jinwy3zrH9UsxZ3tEHwtp3UM6YHeWfehz+l0ZpozMaM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=dtUI6W4S3nAvGnest769Io7PDw0Szl7Ot8yTgJSoou/JjjLUMi2TXOYlbK/32AsO6 QRy4CbNBMbu/FbfhaKGO3AVs3bXZB5xRt8tKOlBUu60ADIBKjqCJo6EApbO7zTVmyk 9pOWlIXzg5WosTjL9KwcgiQIDEepwySDUH5DmlDg= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([83.52.229.196]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1M3DNt-1jTk9U3Ej7-003cdB; Sat, 25 Apr 2020 17:18:25 +0200 From: Oscar Carter To: Forest Bond , Greg Kroah-Hartman Cc: Oscar Carter , Malcolm Priestley , Quentin Deslandes , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Joe Perches Subject: [PATCH v2 0/3] Refactor the vnt_rf_table_download function Date: Sat, 25 Apr 2020 17:17:44 +0200 Message-Id: <20200425151747.8199-1-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:rmWVld04s+Fu3pTwdTP738ZueO133wtJEO1sO1l0AofOKZcxWVQ WJ1OD+c+84OQD8uWBAYMX3aURCQnqBG4ZqsfFgp2lfIZnJu4K7/A/b5GTF0PyztEvzJi8Lu rVExGTjMbfzSiY0JY265NvEcvokGsLVSJejB7d7eang5rbBLTgmmQ4Qw0gPAAHNtE2JPuNe 8UJvYeUWK8JD66qBZiKjw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:q5M185wis7U=:GLML2V8Er0JRJPPMvkxKmP /1jnEpRgdmYfyKuZzln8bcEGcE1u2EHOaJbefwguVtwtoM474fO4CO6vSDQSjEsKiznHDjDA9 C2X3AxaFBn1KMKDbDbuliy2N4gMERf+OyKpmzV1B3sRlvY4zkOoE0MYnokbSREwdCGZdadZH2 AAkja0BoZb869C7p7HUpoABs5OMbFzoBmqzGA18HYlXuAVo6GtI6/TPv3JFcPtDxCk+ku/a9T JiKs2TWeAVpWt/49wrYc0GHYpKIFrXXFj/WT1JfBKNqUBczn6zAe1lt2vfO2bbzttG9yG112g LZeFfU+gRbeJ2AjNu94FHxBDyTyIBF8TH54ebTRkZE9gj7wg7b0mg/7UcNXCOwAh7KXibeqq1 SEzV91fXNKTU9AjBWRSbRHhOqqnoEXmWtww2iWvjhjVprgZlkI+pfbLPJKVFf+E+8biZ2CIOe sqYuqnwxH0ob2yY19U01M4rGXpcPMpLGg8YTc1nnx2czbeae+BHFKPvC9Drp13YWrvuKIMh5Y DpBlPEo7XaGnING5p2XgbjOI9QqMtccoC4N5LiNNliud9VIs+NqaUP/TXP56bFBH/gaesJmrE vhvWRrokpw+u8tprlXAmFifve8eP+PR9fgHvwwv3BcFmB0/4z6Dx/i9f34X3DsRrp0O4PGSvp kG4FkafEV2/4oQa+vLCmUiQbkk7u4Xb7QkecIAra4MSVwM+vnm7Z07einLnl068oCxLu1ydrk AbBamx2fx0Bwcpj/7K6h7RjIn1aqnFMUMN/z4GvQYaWmgrPoDfXNbC2HI76LFxQf0D6wDNBiO HqV7XLZvAi2bEb6wyUdFPrOD9k/xIpeDfOQ/aeKI2jLZpLKOJHVZ/+X9hgdnD+Evs9xgL1XPN W6hFjVqcwKGSvsiHRGoesOR+S+Miu8qjgfLeYbTwwxZYc9B5gEzJ28O2K8HCml4ERd6GlDdgl cMC2d8ADD17KtdgpxKSAtL0heckiJE2luS2rfd1ogojlrI4ZqAuOv1jBama6zsvXQZNlRGe2K f411S/BTrRK52ys6WzjzoN4Wqnmn0ESEMIiO8gmPrwCzemldLh59iLgCLHRP23ZPcVYpr9c29 GEtdZlD+4epWOydbonRllkcQgKXeMscP2c42Q/wFA5OUs+Ej+J3JO4TFFDS01yCZrcEgit7uI St6yxOBk2o3APXP4KGyIJUg1NML+LAAQZLxmoUs6IVBQ2qTPcrG/bkWqSuo9G1FNWPnJMbii2 tacBHVM6ZUo4MP58d Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Changelog v1 -> v2 - Modify the commit changelog of the first patch to clarify the change as Joe Perches suggested. 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(-) =2D- 2.20.1