mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Imededdine Aimene Bounab <aimene.kernel@gmail.com>
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cdrom: fixed a brace coding style issue
Date: Tue, 27 Aug 2013 14:38:23 -0700	[thread overview]
Message-ID: <1377639503.12865.8.camel@joe-AO722> (raw)
In-Reply-To: <1377637278-12166-1-git-send-email-aimene.kernel@gmail.com>

On Tue, 2013-08-27 at 22:01 +0100, Imededdine Aimene Bounab wrote:
> Fixed a coding style issue.

Hi Imededdine.

Just some simple notes.

Your subject line doesn't match the patch and
you are doing more than a single brace change.

There are lots of whitespace changes.

Maybe multiple patches for easier review would be better.

> diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
[]
>  /* These are used to simplify getting data in from and back to user land */
>  #define IOCTL_IN(arg, type, in)					\
> -	if (copy_from_user(&(in), (type __user *) (arg), sizeof (in)))	\
> +	if (copy_from_user(&(in), (type __user *) (arg), sizeof(in)))	\
>  		return -EFAULT;
>  
>  #define IOCTL_OUT(arg, type, out) \
> -	if (copy_to_user((type __user *) (arg), &(out), sizeof (out)))	\
> +	if (copy_to_user((type __user *) (arg), &(out), sizeof(out)))	\
>  		return -EFAULT;

These might as well be expanded in-place.

> @@ -340,7 +340,7 @@ do {							\
>  #define CDROM_CAN(type) (cdi->ops->capability & ~cdi->mask & (type))
>  
>  /* used in the audio ioctls */
> -#define CHECKAUDIO if ((ret=check_for_audio_disc(cdi, cdo))) return ret
> +#define CHECKAUDIO if ((ret = check_for_audio_disc(cdi, cdo))) return ret

This CHECKAUDIO #define isn't used anywhere and could
be deleted.

> @@ -363,7 +363,8 @@ static void cdrom_count_tracks(struct cdrom_device_info *, tracktype*);
>  
>  static int cdrom_mrw_exit(struct cdrom_device_info *cdi);
>  
> -static int cdrom_get_disc_info(struct cdrom_device_info *cdi, disc_information *di);
> +static int cdrom_get_disc_info(struct cdrom_device_info *cdi,
> +		disc_information *di);

Please be consistent with with multi-line statement
indentation.

If this is really an 80 column problem (and if it is,
it's a small one), please use alignment to open paren
like:

static int cdrom_get_disc_info(struct cdrom_device_info *cdi,
			       disc_information *di);

(maximal 8 indent tabs, spaces remainder)

etc...


  reply	other threads:[~2013-08-27 21:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 21:01 Imededdine Aimene Bounab
2013-08-27 21:38 ` Joe Perches [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-08-16 22:07 Imededdine Aimene Bounab

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=1377639503.12865.8.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=aimene.kernel@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®