From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F731C04AAC for ; Mon, 20 May 2019 13:54:10 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DAF08216C4 for ; Mon, 20 May 2019 13:54:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o5bTUh92"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="GjImSPDJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DAF08216C4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=TS5PJMgpHq9PCUcDbLc4DMtYSyTsisiWZLT1UdhoraY=; b=o5bTUh92xR2KZt vMWjdRdokh25fnR3MQSPD00cH2Lwb9J8VqN9VYy3xPTi5TpEK3afC62rNMJvivzUCuuvwTJ5F0/yN eBpHRTz/XXiUInUN4xqYdsqgO8fASjHc/WnmVcmb0EcJNoj1aX+bXVmF9iRxPA5kWDdnfF89EIS6o jy64DupzI9moYfeyNybYICufb12uViImGAnhRFXN8RL6XP1PFMuACPqnUyi7PjUvzfB2ucHORInjh r0Un0AievwdBZpuKFZiXFRDjSLQPG1cWj1Gsn4n04w9CboACngHHqisN+4dlZGa2XfuRfcWvbjVUy UyN3U6RbRZdZoUtxjHGA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSiju-0003tm-Sb; Mon, 20 May 2019 13:54:06 +0000 Received: from mail-io1-xd41.google.com ([2607:f8b0:4864:20::d41]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hSijr-0003sS-DQ for linux-arm-kernel@lists.infradead.org; Mon, 20 May 2019 13:54:04 +0000 Received: by mail-io1-xd41.google.com with SMTP id b3so11031561iob.12 for ; Mon, 20 May 2019 06:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qLnbwDX9nYp0llQixdztrdIhtIxceeBj4sRkANMpAsM=; b=GjImSPDJy8ShaSr+Kmu8fSik802cD/opDqpkNym+Rodro2w5D8/smsz5ZmejQAI+3y rsMqynEsw+xD73XJE5d+sP0np/oEVRcnrXkMM30Bicl9+VFtXV9SuzefGaTp0w4dWx2d gi5l9+EIC4mBj33w5DZLCU64lejWFarf0dO7qDS6jpd6go9WsencnubQbU03VtsuVQGB Wi/mc7Rfz9MNa5VQGnlpXL+mSKXz08kZGb2y304tqMZ88wLNA/kRxIWRufMs4aVFw1eg THnozwMZuhU1xKj5vFnIDhkCPEcKJuuwv5I1KzcdIDa2FRbX69m2+OO9aXrAu/pemwyP obCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qLnbwDX9nYp0llQixdztrdIhtIxceeBj4sRkANMpAsM=; b=N5+9FDXv1tXAz1vdtgYXCtURzxbtxwaHhuBBSqdXTYAXA5GpbDkT731WTkZmFxOo1o n5yizX9OqsnVIZCc6+36VnnCmmBEoozCJF7ElTvVqtXKdSaYsvCvmBsfIdlLve6hR6gy Gxel9s6h52CTu43qgJEZu+Usi1da6HG5YF/fYycfVIdYbdfbxKev0qs9iX3H38Yx1TQ+ nZqWUubcKCjpua/DZN8LtQDItSEHwL8NRpGVvGkianzNXfJpjB5oxzxfSN5XLFwu0Ljg hcw4I3QhElcw5EvgBrR6IopCjlI/Locy3onUGLGParUqJSi1Aleg1b1dSJSyDL6QtZXI kiTw== X-Gm-Message-State: APjAAAUDM+de9rgxeAie/yh6/eb6B0IFumNCxWSgRC6Khbj6LM3owivH ZyR7+zxIwoeZ5/q3NWfiyfdlGw== X-Google-Smtp-Source: APXvYqzqoaiVRHeh1u5raWwifMwfTaaj0AJU7hX2u6GIaGAJpAwDTwJ/wtrswXd4pH9nAZw7EOEz5A== X-Received: by 2002:a6b:f305:: with SMTP id m5mr40986039ioh.271.1558360441814; Mon, 20 May 2019 06:54:01 -0700 (PDT) Received: from localhost.localdomain (c-71-195-29-92.hsd1.mn.comcast.net. [71.195.29.92]) by smtp.gmail.com with ESMTPSA id n17sm6581185ioa.0.2019.05.20.06.54.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 06:54:01 -0700 (PDT) From: Alex Elder To: arnd@arndb.de, subashab@codeaurora.org, david.brown@linaro.org, agross@kernel.org, davem@davemloft.net Subject: [PATCH 1/8] net: qualcomm: rmnet: fix struct rmnet_map_header Date: Mon, 20 May 2019 08:53:47 -0500 Message-Id: <20190520135354.18628-2-elder@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190520135354.18628-1-elder@linaro.org> References: <20190520135354.18628-1-elder@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190520_065403_520342_3CF1C1DF X-CRM114-Status: GOOD ( 12.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: syadagir@codeaurora.org, ejcaruso@google.com, netdev@vger.kernel.org, ilias.apalodimas@linaro.org, linux-kernel@vger.kernel.org, evgreen@chromium.org, bjorn.andersson@linaro.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, cpratapa@codeaurora.org, benchan@google.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org The C bit-fields in the first byte of the rmnet_map_header structure are defined in the wrong order. The first byte should be formatted this way: +------- reserved_bit | +----- cd_bit | | v v +-----------+-+-+ | pad_len |R|C| +-----------+-+-+ 7 6 5 4 3 2 1 0 <-- bit position But the C bit-fields that define the first byte are defined this way: u8 pad_len:6; u8 reserved_bit:1; u8 cd_bit:1; And although this isn't portable, I can state that when I build it the result puts the bit-fields in the wrong location (e.g., the cd_bit is in bit position 7, when it should be position 0). Fix this by reordering the definitions of these struct members. Upcoming patches will reimplement these definitions portably. Signed-off-by: Alex Elder --- drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h index 884f1f52dcc2..b1ae9499c0b2 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_map.h @@ -40,9 +40,9 @@ enum rmnet_map_commands { }; struct rmnet_map_header { - u8 pad_len:6; - u8 reserved_bit:1; u8 cd_bit:1; + u8 reserved_bit:1; + u8 pad_len:6; u8 mux_id; __be16 pkt_len; } __aligned(1); -- 2.20.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel