Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754468AbYCLTZ2 (ORCPT ); Wed, 12 Mar 2008 15:25:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751756AbYCLTZO (ORCPT ); Wed, 12 Mar 2008 15:25:14 -0400 Received: from khc.piap.pl ([195.187.100.11]:36848 "EHLO khc.piap.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751752AbYCLTZN (ORCPT ); Wed, 12 Mar 2008 15:25:13 -0400 To: Stephen Hemminger Cc: Jeff Garzik , Andrew Morton , , Subject: Re: [PATCH] Re: WAN: new PPP code for generic HDLC References: <20080312115215.5fb1a370@extreme> From: Krzysztof Halasa Date: Wed, 12 Mar 2008 20:25:10 +0100 In-Reply-To: <20080312115215.5fb1a370@extreme> (Stephen Hemminger's message of "Wed\, 12 Mar 2008 11\:52\:15 -0700") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 835 Lines: 28 Stephen Hemminger writes: >> +struct hdlc_header { >> + u8 address; >> + u8 control; >> + __be16 protocol; >> +} __attribute__ ((packed)); >> + >> +struct cp_header { >> + u8 code; >> + u8 id; >> + __be16 len; >> +} __attribute__ ((packed)); >> + > > If I remember correctly, the packed is unnecessary for structures like this > and causes GCC to generate worse code. Interesting. Gcc obviously will do the right thing without "packed", at least on "current" architectures, but I don't know what the C standard says. I will remove it, thanks. -- Krzysztof Halasa -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/