From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752063AbbFYRfi (ORCPT ); Thu, 25 Jun 2015 13:35:38 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:35949 "EHLO mail-wg0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751201AbbFYRfa (ORCPT ); Thu, 25 Jun 2015 13:35:30 -0400 From: =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= To: gregkh@linuxfoundation.org Cc: marek.belisko@gmail.com, joe@perches.com, tapaswenipathak@gmail.com, mahfouz.saif.elyazal@gmail.com, gulsah.1004@gmail.com, hamohammed.sa@gmail.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Giedrius=20Statkevi=C4=8Dius?= Subject: [PATCH v2] staging: ft1000: convert pack pragma to __packed Date: Thu, 25 Jun 2015 20:34:43 +0300 Message-Id: <1435253683-29183-1-git-send-email-giedrius.statkevicius@gmail.com> X-Mailer: git-send-email 2.4.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert a Microsoft compiler specific directive "#pragma pack(1)" to a GCC equivalent __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. Signed-off-by: Giedrius Statkevičius --- v2: Convert __atribute__ ((__packed__)) to __packed as advised by Joe Perches --- drivers/staging/ft1000/ft1000-usb/ft1000_download.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_download.c b/drivers/staging/ft1000/ft1000-usb/ft1000_download.c index 5def347..121792f 100644 --- 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; -}; +} __packed; /* checks if the doorbell register is cleared */ -- 2.4.4