From: Leon Romanovsky <leon@kernel.org>
To: Guangbin Huang <huangguangbin2@huawei.com>, kuba@kernel.org
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
lipeng321@huawei.com, lanhao@huawei.com
Subject: Re: [PATCH net-next 00/14] redefine some macros of feature abilities judgement
Date: Sat, 24 Sep 2022 14:27:09 +0300 [thread overview]
Message-ID: <Yy7pjTX8VLLIiA0G@unreal> (raw)
In-Reply-To: <20220924023024.14219-1-huangguangbin2@huawei.com>
On Sat, Sep 24, 2022 at 10:30:10AM +0800, Guangbin Huang wrote:
> The macros hnae3_dev_XXX_supported just can be used in hclge layer, but
> hns3_enet layer may need to use, so this serial redefine these macros.
IMHO, you shouldn't add new obfuscated code, but delete it.
Jakub,
The more drivers authors will obfuscate in-kernel primitives and reinvent
their own names, macros e.t.c, the less external reviewers you will be able
to attract.
IMHO, netdev should have more active position do not allow obfuscated code.
Thanks
>
> Guangbin Huang (14):
> net: hns3: modify macro hnae3_dev_fec_supported
> net: hns3: modify macro hnae3_dev_udp_gso_supported
> net: hns3: modify macro hnae3_dev_qb_supported
> net: hns3: modify macro hnae3_dev_fd_forward_tc_supported
> net: hns3: modify macro hnae3_dev_ptp_supported
> net: hns3: modify macro hnae3_dev_int_ql_supported
> net: hns3: modify macro hnae3_dev_hw_csum_supported
> net: hns3: modify macro hnae3_dev_tx_push_supported
> net: hns3: modify macro hnae3_dev_phy_imp_supported
> net: hns3: modify macro hnae3_dev_ras_imp_supported
> net: hns3: delete redundant macro hnae3_dev_tqp_txrx_indep_supported
> net: hns3: modify macro hnae3_dev_hw_pad_supported
> net: hns3: modify macro hnae3_dev_stash_supported
> net: hns3: modify macro hnae3_dev_pause_supported
>
> drivers/net/ethernet/hisilicon/hns3/hnae3.h | 55 +++++++++----------
> .../hns3/hns3_common/hclge_comm_cmd.c | 2 +-
> .../hns3/hns3_common/hclge_comm_cmd.h | 3 -
> .../ethernet/hisilicon/hns3/hns3_debugfs.c | 2 +-
> .../net/ethernet/hisilicon/hns3/hns3_enet.c | 10 ++--
> .../ethernet/hisilicon/hns3/hns3_ethtool.c | 14 ++---
> .../hisilicon/hns3/hns3pf/hclge_debugfs.c | 2 +-
> .../hisilicon/hns3/hns3pf/hclge_main.c | 38 ++++++-------
> .../hisilicon/hns3/hns3pf/hclge_ptp.c | 2 +-
> .../hisilicon/hns3/hns3vf/hclgevf_main.c | 2 +-
> 10 files changed, 62 insertions(+), 68 deletions(-)
>
> --
> 2.33.0
>
next prev parent reply other threads:[~2022-09-24 11:27 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-24 2:30 [PATCH net-next 00/14] redefine some macros of feature abilities judgement Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 01/14] net: hns3: modify macro hnae3_dev_fec_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 02/14] net: hns3: modify macro hnae3_dev_udp_gso_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 03/14] net: hns3: modify macro hnae3_dev_qb_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 04/14] net: hns3: modify macro hnae3_dev_fd_forward_tc_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 05/14] net: hns3: modify macro hnae3_dev_ptp_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 06/14] net: hns3: modify macro hnae3_dev_int_ql_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 07/14] net: hns3: modify macro hnae3_dev_hw_csum_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 08/14] net: hns3: modify macro hnae3_dev_tx_push_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 09/14] net: hns3: modify macro hnae3_dev_phy_imp_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 10/14] net: hns3: modify macro hnae3_dev_ras_imp_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 11/14] net: hns3: delete redundant macro hnae3_dev_tqp_txrx_indep_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 12/14] net: hns3: modify macro hnae3_dev_hw_pad_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 13/14] net: hns3: modify macro hnae3_dev_stash_supported Guangbin Huang
2022-09-24 2:30 ` [PATCH net-next 14/14] net: hns3: modify macro hnae3_dev_pause_supported Guangbin Huang
2022-09-24 11:27 ` Leon Romanovsky [this message]
2022-09-26 12:56 ` [PATCH net-next 00/14] redefine some macros of feature abilities judgement huangguangbin (A)
2022-09-26 17:11 ` Jakub Kicinski
2022-09-27 3:21 ` huangguangbin (A)
2022-09-27 10:24 ` Leon Romanovsky
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=Yy7pjTX8VLLIiA0G@unreal \
--to=leon@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=huangguangbin2@huawei.com \
--cc=kuba@kernel.org \
--cc=lanhao@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lipeng321@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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).