Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4546846ybb; Tue, 7 Apr 2020 09:32:08 -0700 (PDT) X-Google-Smtp-Source: APiQypKkfvo+dcJEAr6J5JpO2kll2W+wwKdWz1EYR4SMzIMumJAMERmCjIR+vuQn8epOKmJfxJAY X-Received: by 2002:a54:4e86:: with SMTP id c6mr110780oiy.178.1586277127987; Tue, 07 Apr 2020 09:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586277127; cv=none; d=google.com; s=arc-20160816; b=o6D08fcHPNTo2UXDqFi7UlYsqqUspnkejFKIh4Vw3YxCTzzZjFRBOon6a7a55lXzTU Oh5STeshA2N5kYyXRK0bu3p9lQI5A1GC742f+m2SvAxMrS95BGVhDzgC/bpT+7aCFoLx +Vi/egFiY3ETo15kYOReCTRUTgBQIp6nBg198ZgKah3cZPSG3ne2E0dJcvPKdGJCTmhJ YFG4ii518ihM19nPiwr3fAgg6sS/Jz8LPEXumFWI8xCp8NJOYX2k9Rv/OtbC/bZZzW6d P5xjDtsIEyQaLAdYzw8U3bjCiBXTU2djOD4flMLJUO/b5LkT0CLa+sV4OaeDIrRZVJeV d19Q== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=P5I+br30FVHCv01NRxxKULklJ0e53RbnOMKfDiAD2rY=; b=o9YytwtOWBQe5SZEaebx9i0lTB5HS9M7gm4cHrvd6pgNMQYJ5YEERhKd8vWlcdheI1 kdlQVzbAvHb7OXgqfCwqewxjEjVMHBin+VxydtH1SKl7oagDsbFnPnpelBZFms0+GBgk u6go4+In+lZul9Cc0mFhEFVaXEeWmaVzLPppwR5vJ8QXQneU1HJRQNazIGogMzMTtzah kbLb0AOCiKWFccRLVWfcZEcKa4FkO8J1hzqWdC8FeRzN7Q418CA1e8PhabAJwoi8A22k xiA0Gs0BCYKmL0XQ3fcS8ciwSCPJPwJBlybl5ia3WbOAFSr8Hs4FY/I+rMgcBSpyLE81 QXoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=jAeeiq8O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2si1834146ots.188.2020.04.07.09.31.56; Tue, 07 Apr 2020 09:32:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@gmx.net header.s=badeba3b8450 header.b=jAeeiq8O; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728230AbgDGQa6 (ORCPT + 99 others); Tue, 7 Apr 2020 12:30:58 -0400 Received: from mout.gmx.net ([212.227.15.15]:47181 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726776AbgDGQa6 (ORCPT ); Tue, 7 Apr 2020 12:30:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1586277048; bh=sgFBcuEhJ09mNWZg34/SHX56SC+2GL9Chr9TTaUeP1s=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=jAeeiq8O37DIgn86++v52pz6abQzqk8q2GvBdYWbXyjsbslLvM5GYwplpqNy0MUMm v2cFFMXIWeQXKDCCg+S7VYPu+KAD8viGtH42Bnl0TMtSmYYCF12ckO5vkFt8AXHFln 2/6UaW+6jn7eg9H3+wqYIO/ex+TH6AEyucIufvWA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([83.52.229.196]) by mail.gmx.com (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MirjS-1ipqDk1z6q-00exHd; Tue, 07 Apr 2020 18:30:48 +0200 From: Oscar Carter To: Forest Bond , Greg Kroah-Hartman Cc: Oscar Carter , Malcolm Priestley , Dan Carpenter , Quentin Deslandes , Amir Mahdi Ghorbanian , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] staging: vt6656: Use define instead of magic number for tx_rate Date: Tue, 7 Apr 2020 18:29:58 +0200 Message-Id: <20200407162959.7318-2-oscar.carter@gmx.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200407162959.7318-1-oscar.carter@gmx.com> References: <20200407162959.7318-1-oscar.carter@gmx.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:szOayLQTAId7qo7NZHx+GS0NJkVobbE+8kh0SBj1Vzt8VOCnrLb 7prfRQgPnbAcLNmGEadMG+UrXL6t9H1IAFTQFOMaXA1UFufJdWF9rK4ZH6UbqKF83dV9sir hJZT8SZv1/uq5H5+rflLgcnx9WHENFR0pFD+8CHnm19AiOfbBWUrE/NO9I+9YMjmQPLIInR hDlWJHmAVs/3MGHbVWnXA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:9q6i7Pi+KZs=:liAxVS0Sfys8sbMV+1krZD GSDfkUf0M3erwlSu4xcmTnwwVH0CCs8e4ZgfB1GtOLzMihnM8fd3Z1uQLSOpjuEEeTWN+sAOU k5giVl0TdfI7GDHo7pBxiAc39pG4u7erXdkbWdWl4RXGGunpWbvD8dQDeAvhcuUx7GbKdQJmi N8f1q2HbFmAiEaueZc3rv4omPIM6rrrLo0BVnOL320099qaohKTsjQgYXbUNCBBUIC2OVTuNG 9welrHpM2vCFETiHfg9/nxs9A6RA2DSgnIBm+HOv+JO0xxvSxV76eRMlk9tU8GryxW2WYRj7X 5IrK/jAsL5qZHxqGxC6pLP+h+lnvKU/vKdssMsEq8XaO0prP7Dyo17VYoDCZo1SzW9t+SGzhx YK3kNIjGon4nELMO1eb9ijnOwfmFde5adv1dvm0bKhxY3MLiOuwngHaNNVBz15OdMHZvUAyXg daBRiuXvrlD54vYuknJsB9rYLVZeQjHxrFFoV+pN8IyWoz/sygVrtDJHMi2RZ5pIaouo6dndW hkPmglSqR4D7LF+yjbCYBXlfuTgoXJZYeH++QGJYj8O1xMuze7uMZ2wMDAObG9UGfyOEj1T3x a7z6+K5h4+oMbJiUcs1iRtQuYo35LXdJTtkHM1SIk5bFSDzGTm6rkG8dLJDgAcLRdkHcuwBtk ttxO034yFgG5ncoh3+6DUOwq4PY/fgkQyOx8JUjI9vDY7oXRBcBOw3EBUKtKmIM3BxUp7N6G7 8iJyF8TLn728r3QSmpcsUOifZPamWWg49uUG5gRZaW8rHdRx7ooJqa2rEOJHc4UIFGm6R0Gh8 ZE8EEbwqif9b44NhOTbWpjj33zP7htBN63v4Ey3WfEl962zmVgSuhEcTNJZqy2yKTLVVrrzw0 5U0BeVv3s1RdvYfJ+E9ogGRUjO0AaZNhAtLFk+qVk1gLAqNwBwUipkx0b/q8FNH+uwHML7G+H vpXFG3ELgKKZOLnNRP0DkIeL34jZri+WNRfMtWSxCVSqDKuo7JHopTVk3CwXveCrbOl/u/aax Bt7mnSFfjUWZki1Dy7Mw378RVx5MmNysKWsSG0YfXlKC87qmEzATLy/V/AQCTcnE779is1Tdm h6tPIWfsgIDoxij7ra6In1BMWwTyqr4Mc7LWA3OMZE9BkKAoV6V0rpoBFm9+vhoGu1Cg6Cxiz /lUZhIx6G0z5Fg16CzFv5zzJF2lEoLtnlYSlFBMid1axRJh7IsQGZLwmdvs8ffjLLNRhFB8iF BFcZjljnwjRseSd+v Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Oscar Carter =2D-- 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/ba= seband.c index a19a563d8bcc..092e56668a09 100644 =2D-- a/drivers/staging/vt6656/baseband.c +++ b/drivers/staging/vt6656/baseband.c @@ -24,6 +24,7 @@ #include #include +#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 p= kt_type, rate =3D (unsigned int)vnt_frame_time[tx_rate]; - if (tx_rate <=3D 3) { + if (tx_rate <=3D RATE_11M) { if (preamble_type =3D=3D 1) preamble =3D 96; else =2D- 2.20.1