All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: "Filipe Gonçalves" <filipe@codinghighway.com>
Cc: oleg.drokin@intel.com, andreas.dilger@intel.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] drivers/staging: Fixed sparse error "directive in argument list"
Date: Sat, 11 Oct 2014 13:15:23 -0700	[thread overview]
Message-ID: <20141011201523.GA29341@kroah.com> (raw)
In-Reply-To: <1413054822-7894-1-git-send-email-filipe@codinghighway.com>

On Sat, Oct 11, 2014 at 08:13:42PM +0100, Filipe Gonçalves wrote:
> This patch fixes a sparse warning on layout.c (ptlrpc) that was caused by having preprocessor directives in the arguments to a macro.
> 
> Signed-off-by: Filipe Gonçalves <filipe@codinghighway.com>
> ---
>  drivers/staging/lustre/lustre/ptlrpc/layout.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c
> index 5b83371..211df78 100644
> --- a/drivers/staging/lustre/lustre/ptlrpc/layout.c
> +++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c
> @@ -978,10 +978,11 @@ struct req_msg_field RMF_CONN =
>  EXPORT_SYMBOL(RMF_CONN);
>  
>  struct req_msg_field RMF_CONNECT_DATA =
> +#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 7, 50, 0)
>  	DEFINE_MSGF("cdata",
>  		    RMF_F_NO_SIZE_CHECK /* we allow extra space for interop */,
> -#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(2, 7, 50, 0)
>  		    sizeof(struct obd_connect_data),
> +		    lustre_swab_connect, NULL);

Ick ick ick.

Yeah, sparse might complain about this, but how about just properly
deleting the #ifdef entirely, and not perpetuate it even more?

It shouldn't be needed anymore now that the code is in the kernel tree.

greg k-h

  reply	other threads:[~2014-10-11 20:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-11 19:13 [PATCH 1/1] drivers/staging: Fixed sparse error "directive in argument list" Filipe Gonçalves
2014-10-11 20:15 ` Greg KH [this message]
2014-10-11 21:06   ` Filipe Gonçalves
2014-10-11 21:49     ` Drokin, Oleg
2014-10-11 22:02       ` Filipe Gonçalves

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=20141011201523.GA29341@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=andreas.dilger@intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=filipe@codinghighway.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg.drokin@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.