lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 13 Mar 2023 16:05:55 +0800
From:   Hao Lan <lanhao@...wei.com>
To:     Simon Horman <simon.horman@...igine.com>
CC:     <andrew@...n.ch>, <davem@...emloft.net>, <kuba@...nel.org>,
        <alexander.duyck@...il.com>, <yisen.zhuang@...wei.com>,
        <salil.mehta@...wei.com>, <edumazet@...gle.com>,
        <pabeni@...hat.com>, <richardcochran@...il.com>,
        <shenjian15@...wei.com>, <netdev@...r.kernel.org>,
        <wangjie125@...wei.com>
Subject: Re: [PATCH v3 net-next] net: hns3: support wake on lan configuration
 and query

Thanks for your suggestion. Generally I follow the reverse xmas tree style
for readability. But for this case, whether it looks a bit bloated ?

On 2023/3/11 20:15, Simon Horman wrote:
> Simon Horman <simon.horman@...igine.com>
> On Fri, Mar 10, 2023 at 04:14:04PM +0800, Hao Lan wrote:
> > The HNS3 driver supports Wake-on-LAN, which can wake up
> > the server from power off state to power on state by magic
> > packet or magic security packet.
> >
> > ChangeLog:
> > v1->v2:
> > Deleted the debugfs function that overlaps with the ethtool function
> > from suggestion of Andrew Lunn.
> >
> > v2->v3:
> > Return the wol configuration stored in driver,
> > suggested by Alexander H Duyck.
> >
> > Signed-off-by: Hao Lan <lanhao@...wei.com>
>
> Reviewed-by: Simon Horman <simon.horman@...igine.com>
>
> ...
>
> > diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> > index 55306fe8a540..10de2b4c401b 100644
> > --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> > +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
> > @@ -2063,6 +2063,31 @@ static int hns3_get_link_ext_state(struct net_device *netdev,
> >  	return -ENODATA;
> >  }
> >
> > +static void hns3_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
> > +{
> > +	struct hnae3_handle *handle = hns3_get_handle(netdev);
> > +	struct hnae3_ae_dev *ae_dev = pci_get_drvdata(handle->pdev);
> > +	const struct hnae3_ae_ops *ops = handle->ae_algo->ops;
>
> nit: the local variable declarations could be reverse xmas tree
>      - longest line to shortest line. One option being:
>
> 	const struct hnae3_ae_ops *ops;
> 	struct hnae3_handle *handle;
> 	struct hnae3_ae_dev *ae_dev;
>
> 	handle = hns3_get_handle(netdev);
> 	ae_dev = pci_get_drvdata(handle->pdev);
> 	ops = handle->ae_algo->ops;
>
> Likewise elsewhere in this patch.
> .

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ