linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fixed coding style problems.
@ 2018-06-08 18:52 Chris Opperman
  2018-06-08 22:11 ` Dan Carpenter
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Opperman @ 2018-06-08 18:52 UTC (permalink / raw)
  Cc: eklikeroomys, Ian Abbott, H Hartley Sweeten, Greg Kroah-Hartman,
	Simo Koskinen, Frank Mori Hess, devel, linux-kernel

This patch fixes a coding style problem in drivers/staging/comedi/drivers.c
and is submitted for task 10 of the eudyptula challenge.
Signed-off-by: Chris Opperman <eklikeroomys@gmail.com>
---
 drivers/staging/comedi/drivers.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
index 9d73347..90ee974 100644
--- a/drivers/staging/comedi/drivers.c
+++ b/drivers/staging/comedi/drivers.c
@@ -475,7 +475,8 @@ unsigned int comedi_nsamples_left(struct comedi_subdevice *s,
 	struct comedi_cmd *cmd = &async->cmd;
 
 	if (cmd->stop_src == TRIG_COUNT) {
-		unsigned int scans_left = __comedi_nscans_left(s, cmd->stop_arg);
+		unsigned int scans_left =
+			__comedi_nscans_left(s, cmd->stop_arg);
 		unsigned int scan_pos =
 		    comedi_bytes_to_samples(s, async->scan_progress);
 		unsigned long long samples_left = 0;
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fixed coding style problems.
  2018-06-08 18:52 [PATCH] Fixed coding style problems Chris Opperman
@ 2018-06-08 22:11 ` Dan Carpenter
  2018-06-09 10:47   ` chris
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2018-06-08 22:11 UTC (permalink / raw)
  To: Chris Opperman
  Cc: devel, Frank Mori Hess, Simo Koskinen, Greg Kroah-Hartman,
	linux-kernel, Ian Abbott

The subject should be:

[PATCH] staging: comedi: shorten a long line

or something.  You need the subsystem prefix.  Try not to be vague.


On Fri, Jun 08, 2018 at 08:52:37PM +0200, Chris Opperman wrote:
> This patch fixes a coding style problem in drivers/staging/comedi/drivers.c
> and is submitted for task 10 of the eudyptula challenge.
> Signed-off-by: Chris Opperman <eklikeroomys@gmail.com>

You need a blank line before the Signed-off-by line.

Best not to mention eudyptula.  The patch should be a readability
improvement which justifies itsefl.

> ---
>  drivers/staging/comedi/drivers.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
> index 9d73347..90ee974 100644
> --- a/drivers/staging/comedi/drivers.c
> +++ b/drivers/staging/comedi/drivers.c
> @@ -475,7 +475,8 @@ unsigned int comedi_nsamples_left(struct comedi_subdevice *s,
>  	struct comedi_cmd *cmd = &async->cmd;
>  
>  	if (cmd->stop_src == TRIG_COUNT) {
> -		unsigned int scans_left = __comedi_nscans_left(s, cmd->stop_arg);
> +		unsigned int scans_left =
> +			__comedi_nscans_left(s, cmd->stop_arg);

This isn't really a readability improvement.  Checkpatch.pl is not the
king of the world.  It's only useful so far as it improves readability.

We would still have accepted the patch probably but the format wasn't
right because of the subject line.

>  		unsigned int scan_pos =
>  		    comedi_bytes_to_samples(s, async->scan_progress);
>  		unsigned long long samples_left = 0;

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fixed coding style problems.
  2018-06-08 22:11 ` Dan Carpenter
@ 2018-06-09 10:47   ` chris
  0 siblings, 0 replies; 3+ messages in thread
From: chris @ 2018-06-09 10:47 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: devel, Frank Mori Hess, Simo Koskinen, Greg Kroah-Hartman,
	linux-kernel, Ian Abbott

Thanks for the feedback! I will retry the submission.
Regards,
Chris

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-09  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-08 18:52 [PATCH] Fixed coding style problems Chris Opperman
2018-06-08 22:11 ` Dan Carpenter
2018-06-09 10:47   ` chris

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).