driverdev-devel.linuxdriverproject.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Deepak R Varma <mh12gx2825@gmail.com>
Cc: devel@driverdev.osuosl.org, outreachy-kernel@googlegroups.com
Subject: Re: [PATCH 2/2] staging: kpc2000: kpc_dma: rename show function per convention
Date: Wed, 21 Oct 2020 07:50:31 +0200	[thread overview]
Message-ID: <20201021055031.GA975815@kroah.com> (raw)
In-Reply-To: <5d757cf6f97533b48aa471db6efc100acfb8f517.1603256795.git.mh12gx2825@gmail.com>

On Wed, Oct 21, 2020 at 10:40:21AM +0530, Deepak R Varma wrote:
> Rename show_engine_regs to engine_regs_show as per the convention
> followed. Issue reported by checkpatch script.
> 
> Signed-off-by: Deepak R Varma <mh12gx2825@gmail.com>
> ---
>  drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c
> index 7698e5ef2a7c..b6d1afbd452d 100644
> --- a/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c
> +++ b/drivers/staging/kpc2000/kpc_dma/kpc_dma_driver.c
> @@ -50,7 +50,7 @@ static void kpc_dma_del_device(struct kpc_dma_device *ldev)
>  }
>  
>  /**********  SysFS Attributes **********/
> -static ssize_t  show_engine_regs(struct device *dev, struct device_attribute *attr, char *buf)
> +static ssize_t  engine_regs_show(struct device *dev, struct device_attribute *attr, char *buf)
>  {
>  	struct kpc_dma_device *ldev;
>  	struct platform_device *pldev = to_platform_device(dev);
> @@ -80,7 +80,7 @@ static ssize_t  show_engine_regs(struct device *dev, struct device_attribute *at
>  		ldev->desc_completed
>  	);
>  }
> -static DEVICE_ATTR(engine_regs, 0444, show_engine_regs, NULL);
> +static DEVICE_ATTR(engine_regs, 0444, engine_regs_show, NULL);

Shouldn't this just be using a DEVICE_ATTR_RO() macro instead?  Make
that change and the name will be fixed up at the same time.

And did checkpatch really complain about this?  What was the actual
message it produced?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply	other threads:[~2020-10-21 16:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-21  5:08 [PATCH 1/2] staging: kpc2000: kpc_dma: rearrange lines exceeding 100 columns Deepak R Varma
2020-10-21  5:10 ` [PATCH 2/2] staging: kpc2000: kpc_dma: rename show function per convention Deepak R Varma
2020-10-21  5:50   ` Greg Kroah-Hartman [this message]
2020-10-21  6:20     ` Deepak R Varma

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=20201021055031.GA975815@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devel@driverdev.osuosl.org \
    --cc=mh12gx2825@gmail.com \
    --cc=outreachy-kernel@googlegroups.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).