netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Danielle Ratson <danieller@nvidia.com>, Jakub Kicinski <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"mkubecek@suse.cz" <mkubecek@suse.cz>,
	"matt@traverse.com.au" <matt@traverse.com.au>,
	"daniel.zahka@gmail.com" <daniel.zahka@gmail.com>,
	Amit Cohen <amcohen@nvidia.com>,
	NBU-mlxsw <NBU-mlxsw@exchange.nvidia.com>
Subject: Re: [PATCH ethtool-next v3 10/16] qsfp: Add JSON output handling to --module-info in SFF8636 modules
Date: Wed, 5 Feb 2025 12:20:01 +0000	[thread overview]
Message-ID: <7c417b93-773b-432b-89f6-fe380ca4878f@linux.dev> (raw)
In-Reply-To: <DM6PR12MB451696EDF6DF09074926E8F3D8F72@DM6PR12MB4516.namprd12.prod.outlook.com>

On 05/02/2025 12:13, Danielle Ratson wrote:
>> From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
>> Sent: Wednesday, 5 February 2025 12:48
>> To: Jakub Kicinski <kuba@kernel.org>; Danielle Ratson <danieller@nvidia.com>
>> Cc: netdev@vger.kernel.org; mkubecek@suse.cz; matt@traverse.com.au;
>> daniel.zahka@gmail.com; Amit Cohen <amcohen@nvidia.com>; NBU-mlxsw
>> <nbu-mlxsw@exchange.nvidia.com>
>> Subject: Re: [PATCH ethtool-next v3 10/16] qsfp: Add JSON output handling
>> to --module-info in SFF8636 modules
>>
>> On 05/02/2025 02:34, Jakub Kicinski wrote:
>>> On Tue, 4 Feb 2025 15:39:51 +0200 Danielle Ratson wrote:
>>>> +#define YESNO(x) (((x) != 0) ? "Yes" : "No") #define ONOFF(x) (((x)
>>>> +!= 0) ? "On" : "Off")
>>>
>>> Are these needed ? It appears we have them defined twice after this
>>> series:
>>>
>>> $ git grep 'define YES'
>>> cmis.h:#define YESNO(x) (((x) != 0) ? "Yes" : "No")
>>> module-common.h:#define YESNO(x) (((x) != 0) ? "Yes" : "No")
>>
>> Are we strict on capital first letter here? If not then maybe try to use
>> str_yes_no() and remove this definition completely?
> 
> I only moved it to a different file, I didn’t find a reason to change it right now.
> I can add a separate patch to change all the YESNO and ONOFF uses, and remove those definitions, do you want me to do that?
> To be honest, I don’t know if there is a justification to do it in that patchset, considering it is a pretty long anyway.

Well, I do really know that pure refactoring to str_yes_no() and
str_on_off() are not appreciated in netdev. I thought that we may
combine these changes, but no strong feeling. We may keep it as is.

  reply	other threads:[~2025-02-05 12:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04 13:39 [PATCH ethtool-next v3 00/16] Add JSON output to --module-info Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 01/16] module_common: Add a new file to all the common code for all module types Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 02/16] ethtool: Standardize Link Length field names across " Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 03/16] sff_common: Move sff_show_revision_compliance() to qsfp.c Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 04/16] cmis: Change loop order in cmis_show_dom_chan_lvl_flags() Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 05/16] qsfp: Reorder the channel-level flags list for SFF8636 module type Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 06/16] qsfp: Refactor sff8636_show_dom() by moving code into separate functions Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 07/16] module_common: Add helpers to support JSON printing for common value types Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 08/16] cmis: Add JSON output handling to --module-info in CMIS modules Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 09/16] cmis: Enable JSON output support " Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 10/16] qsfp: Add JSON output handling to --module-info in SFF8636 modules Danielle Ratson
2025-02-05  2:34   ` Jakub Kicinski
2025-02-05  7:45     ` Danielle Ratson
2025-02-05 10:48     ` Vadim Fedorenko
2025-02-05 12:13       ` Danielle Ratson
2025-02-05 12:20         ` Vadim Fedorenko [this message]
2025-02-05 12:25           ` Danielle Ratson
2025-02-05  2:37   ` Jakub Kicinski
2025-02-05 11:32     ` Petr Machata
2025-02-05 11:41       ` Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 11/16] qsfp: Enable JSON output support for " Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 12/16] sfpid: Add JSON output handling to --module-info in SFF8079 modules Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 13/16] sfpdiag: Add JSON output handling to --module-info in SFF8472 modules Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 14/16] ethtool: Enable JSON output support for SFF8079 and " Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 15/16] module_info: Add a new JSON file for units documentation Danielle Ratson
2025-02-04 13:39 ` [PATCH ethtool-next v3 16/16] ethtool: Add '-j' support to ethtool Danielle Ratson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c417b93-773b-432b-89f6-fe380ca4878f@linux.dev \
    --to=vadim.fedorenko@linux.dev \
    --cc=NBU-mlxsw@exchange.nvidia.com \
    --cc=amcohen@nvidia.com \
    --cc=daniel.zahka@gmail.com \
    --cc=danieller@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=matt@traverse.com.au \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).