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] [day] [month] [year] [list]
Message-ID: <BANLkTi=E=FQonndVeROSQJkpWRH4sCwEfA@mail.gmail.com>
Date:	Sat, 18 Jun 2011 19:39:11 +0200
From:	Bart Van Assche <bvanassche@....org>
To:	Bernard Metzler <bmt@...ich.ibm.com>
Cc:	netdev@...r.kernel.org, linux-rdma@...r.kernel.org
Subject: Re: [PATCH 04/14] SIWv2: Module initialization: siw_main.c

On Thu, Jun 16, 2011 at 2:42 PM, Bernard Metzler <bmt@...ich.ibm.com> wrote:
> ---
>  drivers/infiniband/hw/siw/siw_main.c |  603 ++++++++++++++++++++++++++++++++++
>  1 files changed, 603 insertions(+), 0 deletions(-)
>  create mode 100644 drivers/infiniband/hw/siw/siw_main.c
>
> diff --git a/drivers/infiniband/hw/siw/siw_main.c b/drivers/infiniband/hw/siw/siw_main.c
> [ ... ]
> +static ssize_t show_stats(struct device *dev,
> +                         struct device_attribute *attr, char *buf)
> +{
> +       struct siw_dev *siw_dev = container_of(dev, struct siw_dev,
> +                                              ofa_dev.dev);
> +
> +       return sprintf(buf, "Allocated SIW Objects:\n"
> +#if DPRINT_MASK > 0
> +                       "Global     :\t%s: %d\n"
> +#endif
> +                       "Device %s:\t"
> +                       "%s: %d, %s: %d, %s: %d, %s: %d, %s: %d, %s: %d\n",
> +#if DPRINT_MASK > 0
> +                       "WQEs", atomic_read(&siw_num_wqe),
> +#endif
> +                       siw_dev->ofa_dev.name,
> +                       "PDs", atomic_read(&siw_dev->num_pd),
> +                       "QPs", atomic_read(&siw_dev->num_qp),
> +                       "CQs", atomic_read(&siw_dev->num_cq),
> +                       "SRQs", atomic_read(&siw_dev->num_srq),
> +                       "MRs", atomic_read(&siw_dev->num_mem),
> +                       "CEPs", atomic_read(&siw_dev->num_cep));
> +}

The rules for sysfs, documented in Documentation/ABI/README, are:
- One value per file.
- All new sysfs attributes must be documented in Documentation/ABI.

An alternative to following the above rules is moving attributes from
sysfs to debugfs.

Bart.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ