Re: [PATCH] staging: ft1000: convert pack pragma to __packed__ attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux