From patchwork Mon Dec 17 12:20:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 1887011 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 7ACC9DF266 for ; Mon, 17 Dec 2012 12:20:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752142Ab2LQMUS (ORCPT ); Mon, 17 Dec 2012 07:20:18 -0500 Received: from mail-we0-f174.google.com ([74.125.82.174]:53629 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091Ab2LQMUR (ORCPT ); Mon, 17 Dec 2012 07:20:17 -0500 Received: by mail-we0-f174.google.com with SMTP id x10so2678574wey.19 for ; Mon, 17 Dec 2012 04:20:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=qGk0+PVdbcS1O0mzV0Lin+dlftHQAaE41z5AEwybFuA=; b=AR8uzI0MWlnqOvgQgciuf+IL5qlfrtzvxJBsr0V4O2YWYaXpZ/30rgcFi/ExUWPT0A wV6LMx8FOsH9O8gnx60tyYGCt4h7FrE1+gAt2rk1/yJiaewfuiT1X2DLX7INiBwPb9vo ayiJfmqdv49FW8SjqTWV/iAKtSw7MbaOqXNIXXQQoPRFG9/lKM1NWymDcQctTAM32fE8 0JM3E+c7jl8BvImiJ2lqsXtgvMtpI0S3a0GZw0Ixcr/17r6FJ93/ij+Nfw1FFxZUPkBG 01pYdH5oXnw5GIuiJ4nLJC1quyz1wDW9/Es0jkF+j+NGE+W13Y4LPt5oEPKT8OF1vo2+ IiXA== Received: by 10.180.81.39 with SMTP id w7mr15319279wix.15.1355746816309; Mon, 17 Dec 2012 04:20:16 -0800 (PST) Received: from localhost.localdomain (stgt-5f718427.pool.mediaWays.net. [95.113.132.39]) by mx.google.com with ESMTPS id p3sm10873070wic.8.2012.12.17.04.20.14 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 17 Dec 2012 04:20:15 -0800 (PST) From: David Herrmann To: linux-input@vger.kernel.org Cc: Jiri Kosina , David Herrmann Subject: [PATCH] HID: uhid: use __packed__ for uhid_feature_answer_req Date: Mon, 17 Dec 2012 13:20:43 +0100 Message-Id: <1355746843-14015-1-git-send-email-dh.herrmann@googlemail.com> X-Mailer: git-send-email 1.8.0.2 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org We use __packed__ for all API structures so we can extend them without breaking alignment rules. We do try to explicitly align the structures, but to be safe we also use __packed__. uhid_feature_answer_req is already 64bit aligned so we can add __packed__ without breaking ABI. Signed-off-by: David Herrmann --- include/uapi/linux/uhid.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/uhid.h b/include/uapi/linux/uhid.h index 9c6974f..e9ed951 100644 --- a/include/uapi/linux/uhid.h +++ b/include/uapi/linux/uhid.h @@ -86,7 +86,7 @@ struct uhid_feature_answer_req { __u16 err; __u16 size; __u8 data[UHID_DATA_MAX]; -}; +} __attribute__((__packed__)); struct uhid_event { __u32 type;