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]
Message-ID: <20241004113037.GA8416@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
Date: Fri, 4 Oct 2024 04:30:37 -0700
From: Shradha Gupta <shradhagupta@...ux.microsoft.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: linux-hyperv@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-rdma@...r.kernel.org,
	"K. Y. Srinivasan" <kys@...rosoft.com>,
	Haiyang Zhang <haiyangz@...rosoft.com>,
	Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
	Long Li <longli@...rosoft.com>, Simon Horman <horms@...nel.org>,
	Konstantin Taranov <kotaranov@...rosoft.com>,
	Souradeep Chakrabarti <schakrabarti@...ux.microsoft.com>,
	Erick Archer <erick.archer@...look.com>,
	Pavan Chebbi <pavan.chebbi@...adcom.com>,
	Ahmed Zaki <ahmed.zaki@...el.com>,
	Colin Ian King <colin.i.king@...il.com>,
	Shradha Gupta <shradhagupta@...rosoft.com>
Subject: Re: [PATCH net-next] net: mana: Enable debugfs files for MANA device

On Thu, Oct 03, 2024 at 05:05:18PM -0700, Jakub Kicinski wrote:
> On Mon, 30 Sep 2024 20:40:41 -0700 Shradha Gupta wrote:
> > @@ -1516,6 +1519,13 @@ static int mana_gd_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> >  	gc->bar0_va = bar0_va;
> >  	gc->dev = &pdev->dev;
> >  
> > +	if (gc->is_pf) {
> > +		gc->mana_pci_debugfs = debugfs_create_dir("0", mana_debugfs_root);
> > +	} else {
> > +		gc->mana_pci_debugfs = debugfs_create_dir(pci_slot_name(pdev->slot),
> > +							  mana_debugfs_root);
> > +	}
> 
> no need for brackets around single statements
> 
> 
> > @@ -1619,7 +1640,29 @@ static struct pci_driver mana_driver = {
> >  	.shutdown	= mana_gd_shutdown,
> >  };
> >  
> > -module_pci_driver(mana_driver);
> > +static int __init mana_driver_init(void)
> > +{
> > +	int err;
> > +
> > +	mana_debugfs_root = debugfs_create_dir("mana", NULL);
> > +
> > +	err = pci_register_driver(&mana_driver);
> > +
> 
> no need for empty lines between function call and its error check
> 
> > +	if (err)
> > +		debugfs_remove(mana_debugfs_root);
> > +
> > +	return err;
> > +}
> > +
> > +static void __exit mana_driver_exit(void)
> > +{
> > +	debugfs_remove(mana_debugfs_root);
> > +
> > +	pci_unregister_driver(&mana_driver);
> > +}
> > +
> > +module_init(mana_driver_init);
> > +module_exit(mana_driver_exit);
> >  
> >  MODULE_DEVICE_TABLE(pci, mana_id_table);
> >  
> > diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
> > index c47266d1c7c2..255f3189f6fa 100644
> > --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> > +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
> > @@ -9,6 +9,7 @@
> >  #include <linux/filter.h>
> >  #include <linux/mm.h>
> >  #include <linux/pci.h>
> > +#include <linux/debugfs.h>
> 
> looks like the headers were previously alphabetically sorted.
> -- 
> pw-bot: cr

Thanks Jakub. I will get these in a newer version

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ