public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Giedrius Statkevičius" <giedrius.statkevicius@gmail.com>
Cc: gregkh@linuxfoundation.org, marek.belisko@gmail.com,
	tapaswenipathak@gmail.com, mahfouz.saif.elyazal@gmail.com,
	tinajohnson.1234@gmail.com, gulsah.1004@gmail.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: ft1000: convert pack pragma to __packed__ attribute
Date: Mon, 22 Jun 2015 14:48:24 -0700	[thread overview]
Message-ID: <1435009704.9808.32.camel@perches.com> (raw)
In-Reply-To: <1435000364-14556-1-git-send-email-giedrius.statkevicius@gmail.com>

On Mon, 2015-06-22 at 22:12 +0300, Giedrius Statkevičius wrote:
> Convert a Microsoft compiler specific directive "#pragma pack(1)" to a
> GCC equivalent __attribute__ ((__packed__)). Also, by doing this we save
> ourselves from trouble if any other struct definitions are added after
> the #pragma because it will be applied to all of the definitions
> following it.
[]
> diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c
[]
> @@ -95,7 +95,6 @@ struct dsp_file_hdr {
>  	long              nDspImages;          /* Number of DSP images in file. */
>  };
>  
> -#pragma pack(1)
>  struct dsp_image_info {
>  	long              coff_date;           /* Date/time when DSP Coff image was built. */
>  	long              begin_offset;        /* Offset in file where image begins. */
> @@ -105,7 +104,7 @@ struct dsp_image_info {
>  	long              version;             /* Embedded version # of DSP code. */
>  	unsigned short    checksum;            /* DSP File checksum */
>  	unsigned short    pad1;
> -};
> +} __attribute__ ((__packed__));

__packed


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

      reply	other threads:[~2015-06-22 21:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 19:12 [PATCH] staging: ft1000: convert pack pragma to __packed__ attribute Giedrius Statkevičius
2015-06-22 21:48 ` Joe Perches [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=1435009704.9808.32.camel@perches.com \
    --to=joe@perches.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=giedrius.statkevicius@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gulsah.1004@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahfouz.saif.elyazal@gmail.com \
    --cc=marek.belisko@gmail.com \
    --cc=tapaswenipathak@gmail.com \
    --cc=tinajohnson.1234@gmail.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