linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Joe Perches <joe@perches.com>
Cc: Doug Ledford <dledford@redhat.com>,
	Potnuri Bharat Teja <bharat@chelsio.com>,
	Mike Marciniszyn <mike.marciniszyn@intel.com>,
	Dennis Dalessandro <dennis.dalessandro@intel.com>,
	Yishai Hadas <yishaih@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>,
	Christian Benvenuti <benve@cisco.com>,
	Nelson Escobar <neescoba@cisco.com>,
	Parvi Kaustubhi <pkaustub@cisco.com>,
	Danil Kipnis <danil.kipnis@cloud.ionos.com>,
	Jack Wang <jinpu.wang@cloud.ionos.com>,
	Bart Van Assche <bvanassche@acm.org>,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH 3/4] RDMA: manual changes for sysfs_emit and neatening
Date: Fri, 9 Oct 2020 12:20:15 -0300	[thread overview]
Message-ID: <20201009152015.GY5177@ziepe.ca> (raw)
In-Reply-To: <f5c9e4c9d8dafca1b7b70bd597ee7f8f219c31c8.1602122880.git.joe@perches.com>

On Wed, Oct 07, 2020 at 07:36:26PM -0700, Joe Perches wrote:
> Make changes to use sysfs_emit in the RDMA code as cocci scripts can not
> be written to handle _all_ the possible variants of various sprintf family
> uses in sysfs show functions.
> 
> While there, make the code more legible and update its style to be more
> like the typical kernel styles.
> 
> Miscellanea:
> 
> o Use intermediate pointers for dereferences
> o Add and use string lookup functions
> o return early when any intermediate call fails so normal return is
>   at the bottom of the function
> o mlx4/mcg.c:sysfs_show_group: use scnprintf to format intermediate strings
> 
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
>  drivers/infiniband/core/sysfs.c              | 60 +++++++-------
>  drivers/infiniband/hw/cxgb4/provider.c       |  5 +-
>  drivers/infiniband/hw/hfi1/sysfs.c           | 38 ++++-----
>  drivers/infiniband/hw/mlx4/main.c            |  5 +-
>  drivers/infiniband/hw/mlx4/mcg.c             | 82 +++++++++++---------
>  drivers/infiniband/hw/mlx4/sysfs.c           | 47 ++++++-----
>  drivers/infiniband/hw/mlx5/main.c            |  4 +-
>  drivers/infiniband/hw/mthca/mthca_provider.c | 29 ++++---
>  drivers/infiniband/hw/qib/qib_sysfs.c        | 45 +++++------
>  drivers/infiniband/hw/usnic/usnic_ib_sysfs.c | 66 +++++++---------
>  drivers/infiniband/ulp/rtrs/rtrs-clt-sysfs.c | 21 +++--
>  drivers/infiniband/ulp/rtrs/rtrs-srv-sysfs.c | 13 ++--
>  drivers/infiniband/ulp/srp/ib_srp.c          |  4 +
>  13 files changed, 206 insertions(+), 213 deletions(-)

Some of thee are a bit exciting, so usnic, hfi1, qib and mlx4 folks
should check their bits over the next two weeks

Thanks,
Jason

  reply	other threads:[~2020-10-09 15:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-08  2:36 [PATCH-next 0/4] RDMA: sprintf to sysfs_emit conversions Joe Perches
2020-10-08  2:36 ` [PATCH 1/4] RDMA: Convert sysfs device * show functions to use sysfs_emit() Joe Perches
2020-10-09 14:07   ` Jason Gunthorpe
2020-10-08  2:36 ` [PATCH 2/4] RDMA: Convert sysfs kobject " Joe Perches
2020-10-09 14:09   ` Jason Gunthorpe
2020-10-09 16:25     ` Joe Perches
2020-10-12  5:21   ` Jinpu Wang
2020-10-08  2:36 ` [PATCH 3/4] RDMA: manual changes for sysfs_emit and neatening Joe Perches
2020-10-09 15:20   ` Jason Gunthorpe [this message]
2020-10-12  5:30   ` Jinpu Wang
2020-10-28 17:25   ` Jason Gunthorpe
2020-10-28 17:54     ` Joe Perches
2020-10-28 18:23       ` Jason Gunthorpe
2020-10-29 17:16       ` Joe Perches
2020-10-31  0:04         ` Jason Gunthorpe
2020-10-08  2:36 ` [PATCH 4/4] RDMA: Convert various random sprintf sysfs _show uses to sysfs_emit Joe Perches
2020-10-09 15:27   ` Jason Gunthorpe
2020-10-12  5:25   ` Jinpu Wang
2020-10-28 18:12   ` Jason Gunthorpe
2020-10-28 18:22     ` Joe Perches
2020-10-08  5:41 ` [PATCH-next 0/4] RDMA: sprintf to sysfs_emit conversions Leon Romanovsky
2020-10-08  5:52   ` Joe Perches
2020-10-08  7:02     ` Leon Romanovsky
2020-10-15  5:29   ` Joe Perches
2020-10-26 22:54 ` Jason Gunthorpe
2020-10-28 18:27 ` Jason Gunthorpe

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=20201009152015.GY5177@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=benve@cisco.com \
    --cc=bharat@chelsio.com \
    --cc=bvanassche@acm.org \
    --cc=danil.kipnis@cloud.ionos.com \
    --cc=dennis.dalessandro@intel.com \
    --cc=dledford@redhat.com \
    --cc=jinpu.wang@cloud.ionos.com \
    --cc=joe@perches.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mike.marciniszyn@intel.com \
    --cc=neescoba@cisco.com \
    --cc=pkaustub@cisco.com \
    --cc=yishaih@nvidia.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).