From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752782AbbFVVsd (ORCPT ); Mon, 22 Jun 2015 17:48:33 -0400 Received: from smtprelay0017.hostedemail.com ([216.40.44.17]:53329 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752079AbbFVVs2 (ORCPT ); Mon, 22 Jun 2015 17:48:28 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::,RULES_HIT:41:152:355:379:541:599:973:981:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:3138:3139:3140:3141:3142:3352:3622:3865:3866:3867:3870:3872:4250:4321:4605:5007:6119:6261:7688:7903:8829:8957:9121:10004:10400:10848:11026:11232:11657:11658:11914:12043:12517:12519:12663:12740:13069:13311:13357:13894:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: water79_66b2e0d4d8e3e X-Filterd-Recvd-Size: 2199 Message-ID: <1435009704.9808.32.camel@perches.com> Subject: Re: [PATCH] staging: ft1000: convert pack pragma to __packed__ attribute From: Joe Perches To: Giedrius =?UTF-8?Q?Statkevi=C4=8Dius?= 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 Date: Mon, 22 Jun 2015 14:48:24 -0700 In-Reply-To: <1435000364-14556-1-git-send-email-giedrius.statkevicius@gmail.com> References: <1435000364-14556-1-git-send-email-giedrius.statkevicius@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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/