From patchwork Mon Apr 10 15:00:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kepplinger X-Patchwork-Id: 9672783 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0DE3360244 for ; Mon, 10 Apr 2017 15:01:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF6AD279E0 for ; Mon, 10 Apr 2017 15:00:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E276428066; Mon, 10 Apr 2017 15:00:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1457279E0 for ; Mon, 10 Apr 2017 15:00:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753668AbdDJPA4 (ORCPT ); Mon, 10 Apr 2017 11:00:56 -0400 Received: from mail.ginzinger.com ([31.193.165.229]:7142 "EHLO mail.ginzinger.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753411AbdDJPAf (ORCPT ); Mon, 10 Apr 2017 11:00:35 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.ginzinger.com (Postfix) with ESMTP id CA57336ED; Mon, 10 Apr 2017 17:00:30 +0200 (CEST) X-Virus-Scanned: by amavisd-new-2.10.1 (20141025) (Debian) at ginzinger.com Received: from mail.ginzinger.com ([127.0.0.1]) by localhost (mail.ginzinger.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aVHI9w7P58nh; Mon, 10 Apr 2017 17:00:29 +0200 (CEST) Received: from mail.ginzinger.com (unknown [10.1.1.201]) by mail.ginzinger.com (Postfix) with ESMTPS id 8A21E3E2C; Mon, 10 Apr 2017 17:00:29 +0200 (CEST) Received: from martin-laptop.buero.ginzinger.com (10.10.1.120) by exc2.buero.ginzinger.com (10.1.1.201) with Microsoft SMTP Server (TLS) id 14.3.339.0; Mon, 10 Apr 2017 17:00:30 +0200 From: Martin Kepplinger To: , CC: , , , Martin Kepplinger Subject: [PATCH v2] input: misc: yealink: define packet offset __be16 instead of u16 Date: Mon, 10 Apr 2017 17:00:22 +0200 Message-ID: <1491836422-22309-1-git-send-email-martin.kepplinger@ginzinger.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1491814577-26408-1-git-send-email-martin.kepplinger@ginzinger.com> References: <1491814577-26408-1-git-send-email-martin.kepplinger@ginzinger.com> MIME-Version: 1.0 X-Originating-IP: [10.10.1.120] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP sparse says warning: incorrect type in assignment (different base types) expected unsigned short [unsigned] [usertype] offset got restricted __be16 [usertype] for every usage of cpu_to_be16 in yealink.c. Defining it __be16 in the first place shouldn't hurt. Signed-off-by: Martin Kepplinger Signed-off-by: Henk.Vergonet@gmail.com --- revision history ---------------- v2: add privately received Signed-off-by drivers/input/misc/yealink.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/yealink.h b/drivers/input/misc/yealink.h index 1e0f523..934c247 100644 --- a/drivers/input/misc/yealink.h +++ b/drivers/input/misc/yealink.h @@ -28,7 +28,7 @@ struct yld_ctl_packet { u8 cmd; /* command code, see below */ u8 size; /* 1-11, size of used data bytes. */ - u16 offset; /* internal packet offset */ + __be16 offset; /* internal packet offset */ u8 data[11]; s8 sum; /* negative sum of 15 preceding bytes */ } __attribute__ ((packed));