Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10445083ybi; Wed, 24 Jul 2019 23:21:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxi46pE8hV9usDbec7Lt4UjRJhHZ2+47xzfeNkIn9twvoZtLucWqAPjyIWGBNBFVv5j2TbN X-Received: by 2002:a17:90a:220a:: with SMTP id c10mr92819271pje.33.1564035670552; Wed, 24 Jul 2019 23:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564035670; cv=none; d=google.com; s=arc-20160816; b=YuYUXvOsxonzJSOe7lT5qmVTXQNK5HWRbHuBNHpGQ5epsL8F1XLG3CP0zYwLsgLThu cvkuwChMa1uZVHtMp7l7rFfcoZfreIObqOWFNVHfwNOjZc8ODULh7YRL39qNcj17lX6K KNs/5OsKXQcqPcvJAmL3aEXRQuR07IEIVc4YIyhMRFlT22RboxcnCiFkS3olFNahJB21 DXHWnGHzO9lz+dMGNS9EHF0tid4hUw1D5v16x63zJCfQDF1fHshm/3Cen5qORunsOYhU vmWlqWA/R1KXo2838Z70+t4hvAbyOnHr36fH4D3mtjGsBa/RmOnD9EJ2eVkEy7q5rYb8 TVRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:dmarc-filter :dkim-signature:dkim-signature; bh=/0udXG64UUk9s2jrlu+MrzGsSbTaw/2gSYQR46zCb2w=; b=QWfYomytu8YOZ34c98KsAzfRUOnVpjlckfwDP/BAVJ3UnOrJtkRttcrbawA8TZDusi 6ARXz5ZHw01q4YwMUAAVGb6V5z/Ij+YbsdxzlALXXlVKOLoLq1nPFdQFDF42AShQ5AX4 0I1shN2qxFc54cDZFwZ6/qDsVpRG7EfPhpQmd7t7Q3s3jUzhp6ja8ygfS9cbK0Bg/di0 spJYWjXuKR6JcB0XfwlqABX1cz8GwApV2fkQGXdPsNgKShlNiTrNEqxux9scpFSd9gVh Qh/cCL3DaiQKPtjB8nzF45ByCMqmVeK/KiJpGi5MWwmNB3Rt0wiAs84Q8EB5jfkbyGo4 LzRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=IHN1HE79; dkim=pass header.i=@codeaurora.org header.s=default header.b=DhxaidlF; 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 h189si15796207pgc.236.2019.07.24.23.20.56; Wed, 24 Jul 2019 23:21:10 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b=IHN1HE79; dkim=pass header.i=@codeaurora.org header.s=default header.b=DhxaidlF; 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 S1728969AbfGYF7p (ORCPT + 99 others); Thu, 25 Jul 2019 01:59:45 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:38684 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728970AbfGYF7p (ORCPT ); Thu, 25 Jul 2019 01:59:45 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1C48460312; Thu, 25 Jul 2019 05:59:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1564034384; bh=ADI4qEjHe7gkm/jWbTCwTSNbvBnDACdDyQAayf58nYw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=IHN1HE79hHMp0TRyMiOoxNdkszJrnzEfU9KMT9Zef8coJ4ywasvPnjje7/dId0fje ztM0yBTOQeZC2JrX7ZOHep2CsEtVDnbHGRGsW7zRN/svrc7fL4fkF2UZ2Fyl+tHVR8 dWYqDQIB/GIBKJXoqK3zmX9ZcK19tq+4JxQzFJjQ= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED,SPF_NONE autolearn=no autolearn_force=no version=3.4.0 Received: from potku.adurom.net (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C52BE602B7; Thu, 25 Jul 2019 05:59:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1564034383; bh=ADI4qEjHe7gkm/jWbTCwTSNbvBnDACdDyQAayf58nYw=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=DhxaidlFEupym/VTOeH6Vqj6vjgzhNo8N6UgDnSH6GM/1DA88pCUsqrGkLUBsUZuI SDR9avVXEHJ/nBroGzDcQE2yDvNgdGRV0+4rXe+fNle1mGy2KZ23I8io6AQgDYVGAq NC3ZsOJZBEvW+FK51r+uANiHmWUSKbgC76A5f4Kw= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C52BE602B7 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=kvalo@codeaurora.org From: Kalle Valo To: Tony Chuang Cc: Brian Norris , "linux-wireless\@vger.kernel.org" Subject: Re: [RFC PATCH] rtw88: use txpwr_lmt_cfg_pair struct, not arrays References: <20190713013232.215138-1-briannorris@chromium.org> <20190724112304.7DDF960909@smtp.codeaurora.org> Date: Thu, 25 Jul 2019 08:59:40 +0300 In-Reply-To: (Tony Chuang's message of "Thu, 25 Jul 2019 02:26:45 +0000") Message-ID: <87ef2ezmb7.fsf@kamboji.qca.qualcomm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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? -- Kalle Valo