Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp671812ybf; Sat, 29 Feb 2020 12:50:28 -0800 (PST) X-Google-Smtp-Source: APXvYqy6StCgPMKhpoWHgC0fcMcBpqfgom7gaDsMWQlUhAXBlWX0zrAvlaXeoI+HoUeII6WYbyq5 X-Received: by 2002:a9d:7d93:: with SMTP id j19mr8275591otn.102.1583009428723; Sat, 29 Feb 2020 12:50:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583009428; cv=none; d=google.com; s=arc-20160816; b=P5Xe8GnP55Y7oeQJzqhamaaX8gkzryvGs7Vr6eCnBiIz3Y04KyZXsP57+vzT8TDZVo TsfkkB8Uvm1kqBVdh+u5c//8YTIArrkdwV9fj5AJxLbFG8eD6TTAyL3UUjJkriUWCgrq vqLhXWJpyQR5J2pQV8TLgnz14HX/qXISwWg2wKqoIEExIQzxSdsGWbgRT/g9Tz0z7LH5 B7euCHBkGbeG8FCOLUIKsTMM7Ap+1Jj1iO3BfXC8/nhsrbgrG9sPJ2KrZoDW67ue3Vkn jClLQzmmwnosBqIa0s+veqoQ8WoZ/LZQWnN/DMKona2E1+LZtQ8p9R0TdlmDmxdTUwaJ RU/A== 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 :content-language:mime-version:user-agent:date:message-id:subject :from:cc:to:dkim-signature; bh=Zt3dq1OUkMEUcUXW65qyxooApGG+qBeaodqKhZlMmPE=; b=jIC3knbsY0nDdEtDZ5Gud37NSjbLYJkIj7QRxiOjJTpuLECqN/IByh6p/QI009OF66 KEKbIL69v6g845f9E3lS7QpEOTkcwY9+hZjeHoU91ufmF4KeHYua/b6mqw1v/uvJQNna WOqoks2vpCpdDzzoGxe4cqNBkZSwIAbKuE1OEpCzRzHy2JCvLGrbuI9WqPMYGBtr8fmZ /wSK4xt6JtemMma7J9X1th/Jp0RQ1bSkRxqd6P1ZfS1RZKfszBB8LyRW9JhFzKFkfior cyOTisugL6e7NlIoYTeSg88f2H4ZtzrnIn37dZnzoKaeZsb8p56ZfdhDZvyYVOdLWkJs 6XZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JbBDTY++; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si3941419oia.238.2020.02.29.12.49.59; Sat, 29 Feb 2020 12:50:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JbBDTY++; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727442AbgB2Ud7 (ORCPT + 99 others); Sat, 29 Feb 2020 15:33:59 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:42510 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727412AbgB2Ud6 (ORCPT ); Sat, 29 Feb 2020 15:33:58 -0500 Received: by mail-wr1-f66.google.com with SMTP id p18so7579478wre.9 for ; Sat, 29 Feb 2020 12:33:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=Zt3dq1OUkMEUcUXW65qyxooApGG+qBeaodqKhZlMmPE=; b=JbBDTY++uSsVrcYM05asL6cIXEST1QQi6vSxyskSsjGDkrsnZGvIJcvG/XPIPBnqKp PFrt7L1A0B0Hy99+rv8yAw8SEE5sPCtfVHnHb4pj7Nnlwxu6AoaDbNrozSJ61KZOmvNd JFi3S1nTzfTvXGmssIJVRK0MySvv3RtvGCxdAIgBK7taVUakmntRsp2oHat26dfDy43l 7TRmgM9WFxH0wjV8XJKA+74DEEIllSN8Gvb3IGoJz9EZ6TMgbOC0l+sTZnW0YORtqGAo uTYo9o0OLtSw6SFzznqxP20u6VmHOOAriwO9hP+gdKQqma65k7Lw4sB6DU4lNOLvw3ax 2hcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=Zt3dq1OUkMEUcUXW65qyxooApGG+qBeaodqKhZlMmPE=; b=syYt91BAYCOAnazfWm9WIuki/dR1mM3GFDirmbrqPFYQPhb+ZcBpJzw1D+REeLhvtZ eM0B8/TH6ySWYcQdrO57TQbKEkhXio5i3GMjkdFkuUVdmphjwQVTbpHrA0X19kRuBt8W P6VcIn4a19w0DEKfkWVAwnL4+UW6+sd40u2ePaRMS7B+mC70a6rwFeUYNLBw2CHhVnYF 5YV6oiGLeQcprq2HlL1f+sxoZfemaCS3B816kCho5AnuKD6gVxeyfysK0aGGSfMPCDms Rjel/e7vZ94Jtz42cWNy9UCpaitff9y+6TtDj7LPwQU/1itgX+CIugD/1VaawFVznAna iMKQ== X-Gm-Message-State: APjAAAVxOueoL+w0GYctz3Tcaa+6HL6PmdDURcCeqx+hKtgeZ1siBcfv xnaImt+eHzK0G1Tf1RJoR/esNaSX X-Received: by 2002:adf:9282:: with SMTP id 2mr12657562wrn.124.1583008436742; Sat, 29 Feb 2020 12:33:56 -0800 (PST) Received: from [192.168.43.18] (94.197.121.166.threembb.co.uk. [94.197.121.166]) by smtp.gmail.com with ESMTPSA id a9sm19644051wrn.3.2020.02.29.12.33.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 29 Feb 2020 12:33:56 -0800 (PST) To: Greg Kroah-Hartman Cc: "devel@driverdev.osuosl.org" , linux-wireless@vger.kernel.org From: Malcolm Priestley Subject: [PATCH 1/2] staging: vt6656: use vnt_vt3184_agc array directly Message-ID: <4b455ee4-7ac7-e1ff-4a10-2d99f2e30714@gmail.com> Date: Sat, 29 Feb 2020 20:33:54 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org vnt_vt3184_agc is always the same regardless of rf type so use the array directly removing from stack buffer. Signed-off-by: Malcolm Priestley --- drivers/staging/vt6656/baseband.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/staging/vt6656/baseband.c b/drivers/staging/vt6656/baseband.c index f18e059ce66b..48a624bf00c0 100644 --- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -367,8 +367,6 @@ int vnt_vt3184_init(struct vnt_private *priv) int ret = 0; u16 length; u8 *addr; - u8 *agc; - u16 length_agc; u8 array[256]; u8 data; @@ -386,8 +384,6 @@ int vnt_vt3184_init(struct vnt_private *priv) priv->bb_rx_conf = vnt_vt3184_al2230[10]; length = sizeof(vnt_vt3184_al2230); addr = vnt_vt3184_al2230; - agc = vnt_vt3184_agc; - length_agc = sizeof(vnt_vt3184_agc); priv->bb_vga[0] = 0x1C; priv->bb_vga[1] = 0x10; @@ -398,8 +394,6 @@ int vnt_vt3184_init(struct vnt_private *priv) priv->bb_rx_conf = vnt_vt3184_al2230[10]; length = sizeof(vnt_vt3184_al2230); addr = vnt_vt3184_al2230; - agc = vnt_vt3184_agc; - length_agc = sizeof(vnt_vt3184_agc); addr[0xd7] = 0x06; @@ -413,8 +407,6 @@ int vnt_vt3184_init(struct vnt_private *priv) priv->bb_rx_conf = vnt_vt3184_vt3226d0[10]; length = sizeof(vnt_vt3184_vt3226d0); addr = vnt_vt3184_vt3226d0; - agc = vnt_vt3184_agc; - length_agc = sizeof(vnt_vt3184_agc); priv->bb_vga[0] = 0x20; priv->bb_vga[1] = 0x10; @@ -430,8 +422,6 @@ int vnt_vt3184_init(struct vnt_private *priv) priv->bb_rx_conf = vnt_vt3184_vt3226d0[10]; length = sizeof(vnt_vt3184_vt3226d0); addr = vnt_vt3184_vt3226d0; - agc = vnt_vt3184_agc; - length_agc = sizeof(vnt_vt3184_agc); priv->bb_vga[0] = 0x20; priv->bb_vga[1] = 0x10; @@ -454,10 +444,9 @@ int vnt_vt3184_init(struct vnt_private *priv) if (ret) goto end; - memcpy(array, agc, length_agc); - ret = vnt_control_out(priv, MESSAGE_TYPE_WRITE, 0, - MESSAGE_REQUEST_BBAGC, length_agc, array); + MESSAGE_REQUEST_BBAGC, + sizeof(vnt_vt3184_agc), vnt_vt3184_agc); if (ret) goto end; -- 2.25.1