All of lore.kernel.org
 help / color / mirror / Atom feed
From: Artur Paszkiewicz <artur.paszkiewicz@intel.com>
To: "Jürg Billeter" <j@bitron.ch>, NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, "Baldysiak,
	Pawel" <pawel.baldysiak@intel.com>
Subject: Re: [PATCH] IMSM: do not use comma expression for simple assignments
Date: Thu, 11 Dec 2014 10:06:57 +0100	[thread overview]
Message-ID: <54895EB1.4040502@intel.com> (raw)
In-Reply-To: <1407313179-24598-1-git-send-email-j@bitron.ch>

On 08/06/2014 10:19 AM, Jürg Billeter wrote:
> Fixes build with gcc 4.9.
> 
> error: right-hand operand of comma expression has no effect
>   snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
>   ^
> 
> Signed-off-by: Jürg Billeter <j@bitron.ch>
> ---
>  super-intel.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/super-intel.c b/super-intel.c
> index e28ac7d..f24d101 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -5069,13 +5069,13 @@ static int write_super_imsm_spares(struct intel_super *super, int doclose)
>  	__u32 sum;
>  	struct dl *d;
>  
> -	spare->mpb_size = __cpu_to_le32(sizeof(struct imsm_super)),
> -	spare->generation_num = __cpu_to_le32(1UL),
> +	spare->mpb_size = __cpu_to_le32(sizeof(struct imsm_super));
> +	spare->generation_num = __cpu_to_le32(1UL);
>  	spare->attributes = MPB_ATTRIB_CHECKSUM_VERIFY;
> -	spare->num_disks = 1,
> -	spare->num_raid_devs = 0,
> -	spare->cache_size = mpb->cache_size,
> -	spare->pwr_cycle_count = __cpu_to_le32(1),
> +	spare->num_disks = 1;
> +	spare->num_raid_devs = 0;
> +	spare->cache_size = mpb->cache_size;
> +	spare->pwr_cycle_count = __cpu_to_le32(1);
>  
>  	snprintf((char *) spare->sig, MAX_SIGNATURE_LENGTH,
>  		 MPB_SIGNATURE MPB_VERSION_RAID0);
> 

Hi Neil,

We verified that this patch indeed is needed to build mdadm with gcc
4.9. Can you apply it?

Thanks,
Artur

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2014-12-11  9:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06  8:19 [PATCH] IMSM: do not use comma expression for simple assignments Jürg Billeter
2014-12-11  9:06 ` Artur Paszkiewicz [this message]

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=54895EB1.4040502@intel.com \
    --to=artur.paszkiewicz@intel.com \
    --cc=j@bitron.ch \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=pawel.baldysiak@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.