Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10825313ybi; Thu, 25 Jul 2019 05:48:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRSCF+tPaeKuHd9J325qyV0egIkPNc6KLewWUAuPbuTpldFxv3ViUntPSSeMlhYIPGOIDU X-Received: by 2002:a63:2b8e:: with SMTP id r136mr52628701pgr.216.1564058924790; Thu, 25 Jul 2019 05:48:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564058924; cv=none; d=google.com; s=arc-20160816; b=eEbXzVPXDdsioFAx55j2H5tmGx8A1C0Wj2ifw2HSaymsp0sScYwFCGdhNMYb8H/Ahf fATo/i0o/tvdUpD50Zgai8gM6fOzTQyBz1Nz5Ogz4vWfUnSIQ3QLcduKP31KloXURxCu YOj7WFqjwc7p+YqoFDS4xe5V9FEs/PVfUXuSEZ1rXaBiuzwGTvS36b7q+PyQdK/OQ0Zp whd37l6tb4SkIzG3OlILffFnuS31kVZRTXwUgcFkMPKPAS0pbYAm6Pz+BHH0vLnSZb3s tRrOAs6VeFXAiKnR9KeJcik0N4lLp7sWvTgr+pGPtZ2Vxoj/SnoG3/tVAZHDyn0VecHO xGnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=d65ZMVdNR0txdUMNxqaVn+sOhxDNDB5pxgEtdhLw1xA=; b=bwTYsHgmL7HDRZLHdG51EfOjjhpjH33/G5QM5mTSsmrBy1wt+VP9QPAofQFSBatkgp kiSrtltFmhVEjBEOdRBHsLUw57Gz4hxyyvunW9JgTOMoDfBdSY9leVBuLGk+4Xr9ooWN 7WMuGF/6De29FjgLGAz0HB7iZUIVNBFZYuN6GLGLCa8cM2v9NYI5iBSRsbuKaBSmE6IG 6j+3NBz7HtXoFdswzlSsTDMS4JG/EnrK3uJKBjHMEgNuC4WfHwNml5dJeARJMpVRWMro TZKS7t+C3qtfQOxKJn3F2bEjI4UedpHziUd1PCDm9YJGuFFW7zVV7k9mCMhz9FBGQt2p XCuA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a88si15582659pje.6.2019.07.25.05.48.29; Thu, 25 Jul 2019 05:48:44 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389945AbfGYIzh convert rfc822-to-8bit (ORCPT + 99 others); Thu, 25 Jul 2019 04:55:37 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:50978 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389932AbfGYIzh (ORCPT ); Thu, 25 Jul 2019 04:55:37 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x6P8tUqA029958, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCAS12.realtek.com.tw[172.21.6.16]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x6P8tUqA029958 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 25 Jul 2019 16:55:30 +0800 Received: from RTITMBSVM04.realtek.com.tw ([fe80::e404:880:2ef1:1aa1]) by RTITCAS12.realtek.com.tw ([::1]) with mapi id 14.03.0439.000; Thu, 25 Jul 2019 16:55:29 +0800 From: Tony Chuang To: Kalle Valo CC: Brian Norris , "linux-wireless@vger.kernel.org" Subject: RE: [RFC PATCH] rtw88: use txpwr_lmt_cfg_pair struct, not arrays Thread-Topic: [RFC PATCH] rtw88: use txpwr_lmt_cfg_pair struct, not arrays Thread-Index: AQHVQq4lzwsI0XBcs027K+5Cn7dZRqbbB6ZA Date: Thu, 25 Jul 2019 08:55:29 +0000 Message-ID: References: <20190713013232.215138-1-briannorris@chromium.org> <20190724112304.7DDF960909@smtp.codeaurora.org> <87ef2ezmb7.fsf@kamboji.qca.qualcomm.com> In-Reply-To: <87ef2ezmb7.fsf@kamboji.qca.qualcomm.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.68.183] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > Tony Chuang writes: > > >> Brian Norris wrote: > >> > >> > We're just trusting that these tables are of the right dimensions, when > >> > we could do better by just using the struct directly. Let's expose the > >> > struct txpwr_lmt_cfg_pair instead. > >> > > >> > The table changes were made by using some Vim macros, so that should > >> > help prevent any translation mistakes along the way. > >> > > >> > Remaining work: get the 'void *data' out of the generic struct > >> > rtw_table; all of these tables really deserve to be their own data > >> > structure, with proper type fields. > >> > > >> > Signed-off-by: Brian Norris > >> > >> To me this looks like a clear improvement and I'm inclined to apply it. Tony, > >> what do you think? > > > > I think it indeed is better to use struct instead of arrays to access the table. > > But what I am trying to do is to figure a way to write a proper struct for > > radio_[ab] tables. Since the parsing logic is more complicated than others. > > > > Once I finished them, I will send a patch to change the tables. > > Are you saying that your patch will also clean up these txpwr tables and > I should drop this patch? Or can I apply this? > You can apply this. And I can take care of the rest of them. :) Thanks. Tony