From patchwork Tue Mar 9 12:48:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 395965 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp2554714jai; Tue, 9 Mar 2021 04:49:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKoYZsxBpqIRuMmjZ1rHI88bfqzqO6Vbl9OM7N2tA/maIoP2GF5bdiENCSWywcK+epzMSE X-Received: by 2002:a17:906:d19b:: with SMTP id c27mr19703031ejz.304.1615294178684; Tue, 09 Mar 2021 04:49:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615294178; cv=none; d=google.com; s=arc-20160816; b=gfN2QVOc4MiOvrpiIfN3GQIG42KnkNa7MBsocV3L/vgZza3YXsikA5fsmtkWNc2SdA QfUcq18fQZwc+AzoxKstZzeF/CuYuNELF1Jh/Rt0ydvMlGh1UxM+Juz7FHt1EIppFS0G 0pggS4cQMICl29Nc5l7+3i1irKr7KnaMnKDSaa+I/UGH3yDths3Jb6aCNQjcpZ3ssh6b hIm084T+nOdaSGR9veBpI9PPUoVIEPXXU9j7+STfE900YQhKpW5RSYuMkE3DkDXLNVUb anb9vdQq0pi0WHLWcoa6yKDUrnmMdUyK0lZH470mITmTyCNFJHfr0sP//opdQqZRsUj2 B0cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=EdqSV9iHXI9edaVKvYFhOZKxNewnVH7t0NjYc9U5DGQ=; b=TrzEoZvkn6Aekt2i92AXo0x+Ka2OD2Eb9RsZ5LU/qKbZ7Z92UsT8zNm4CDpYIAz7/Y Pvp/dR4HZTyo7E1i3nQ761ZwU6oA+gxEed9CTJoKs9TYic7v/6glM4CwdmigE41Rnfwa TvrSxLPP30f13EOnh2/oEbSJLW3xZ3qdkqdKiuMsTiXZdhcaEX4PW/UPwToC6hZbQI/1 4IkDxDQ77qfCG7mOtdzVWI8ImRySonXWKXT8TKWTKi8Frdv+l0BgpMYX8Jt1pvHT2YEz uLb4rRkZLM0PU7x/bVR1OnAX+M5BUBRwfvjB2yybvxkSGw5j0TzynEAR67SUPD22QKic 1qHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iQ9W693U; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la8si9302850ejc.79.2021.03.09.04.49.38; Tue, 09 Mar 2021 04:49:38 -0800 (PST) Received-SPF: pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iQ9W693U; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231163AbhCIMs4 (ORCPT + 9 others); Tue, 9 Mar 2021 07:48:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229544AbhCIMsw (ORCPT ); Tue, 9 Mar 2021 07:48:52 -0500 Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5636BC06174A for ; Tue, 9 Mar 2021 04:48:52 -0800 (PST) Received: by mail-il1-x129.google.com with SMTP id f10so12035753ilq.5 for ; Tue, 09 Mar 2021 04:48:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=EdqSV9iHXI9edaVKvYFhOZKxNewnVH7t0NjYc9U5DGQ=; b=iQ9W693U/lDKf6xvxhitW2eA6CCVCbnJlzcbXtzJa+f/r1ONSm+difFu+xKJaHpLcX 6Eppb4vAdVFkBu7ge1ML5zkYq9/upaGROdgaGIBCGwRgKahkI1PoFMuLQU7bdSaRoK+E Qajlj5YSwzOHZhAkeNyR2R3j0LZ2TL3NZ2/NCeClSh20sG488Ck8smoHF92J3tQQiWmJ TESDoWmL5gcJVaral6oIx34tkwRQNauL3YoRrhumqtwoTp6d61Ap8kJiafHLeGuOtezV SDCmJ6h7Ml838Cwm+Xq3myHVqXUQl7YKUi+ax9Nf9nG91lQ031E3zPgLZy/pOUC53dsI khEg== 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:mime-version :content-transfer-encoding; bh=EdqSV9iHXI9edaVKvYFhOZKxNewnVH7t0NjYc9U5DGQ=; b=C5kymUNReyq25+gVctRWeTnm/BrCeKLPZyDpydZIWHbxd8DZQ2OKJLi5I8uH5ySg69 VaiPg8pqafru818Ujfbv1t0LHN2Tz+AHzjV1ZQ5kRh+eOYOZD9mHNdyh1Q3LqsoqZQv9 CopOiTgbEFTnDRMKyzWCH6YXgled2wj8ykTbCVxQOmKitySc7cOEXkdX0ZgT5Ys4CAA+ N4xcbTG9QV05wbcvsnqkn4K177XkbtPBtMmWgNRIgJcs7Tnw+y3iMO3w3bWPreMb1pFG 0Ol/8KHfo6ZhUKxSw7JrwlcAfg173baiw16wTTmSTh98mSJXTMEWzR1Soy6bvcbHjOYH PnNw== X-Gm-Message-State: AOAM533PmGVMrIhVVTn0HPHwmcBFmlh0OboDHjVN8JKslw88yQHk9vmv RI3H6YTXo4aTqd3c6eCLBsC10A== X-Received: by 2002:a05:6e02:1069:: with SMTP id q9mr24361776ilj.97.1615294131754; Tue, 09 Mar 2021 04:48:51 -0800 (PST) Received: from presto.localdomain (c-73-185-129-58.hsd1.mn.comcast.net. [73.185.129.58]) by smtp.gmail.com with ESMTPSA id o23sm7810009ioo.24.2021.03.09.04.48.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Mar 2021 04:48:51 -0800 (PST) From: Alex Elder To: subashab@codeaurora.org, stranche@codeaurora.org, davem@davemloft.net, kuba@kernel.org Cc: sharathv@codeaurora.org, bjorn.andersson@linaro.org, evgreen@chromium.org, cpratapa@codeaurora.org, David.Laight@ACULAB.COM, elder@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next v3 0/6] net: qualcomm: rmnet: stop using C bit-fields Date: Tue, 9 Mar 2021 06:48:42 -0600 Message-Id: <20210309124848.238327-1-elder@linaro.org> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Version 3 of this series uses BIT() rather than GENMASK() to define single-bit masks. It then uses a simple AND (&) operation rather than (e.g.) u8_get_bits() to access such flags. This was suggested by David Laight and really prefer the result. With Bjorn's permission I have preserved his Reviewed-by tags on the first five patches. Version 2 fixed bugs in the way the value written into the header was computed. The series was first posted here: https://lore.kernel.org/netdev/20210304223431.15045-1-elder@linaro.org/ Below is a summary of the original description. This series converts data structures defined in so they use integral field values with bitfield masks rather than relying on C bit-fields. - The first three patches lay the ground work for the others. - The first adds endianness notation to a structure. - The second simplifies a bit of complicated code. - The third open-codes some macros that needlessly obscured some simple code. - Each of the last three patches converts one of the structures defined in so it no longer uses C bit-fields. -Alex Alex Elder (6): net: qualcomm: rmnet: mark trailer field endianness net: qualcomm: rmnet: simplify some byte order logic net: qualcomm: rmnet: kill RMNET_MAP_GET_*() accessor macros net: qualcomm: rmnet: use field masks instead of C bit-fields net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum trailer net: qualcomm: rmnet: don't use C bit-fields in rmnet checksum header .../ethernet/qualcomm/rmnet/rmnet_handlers.c | 11 ++-- .../net/ethernet/qualcomm/rmnet/rmnet_map.h | 12 ---- .../qualcomm/rmnet/rmnet_map_command.c | 11 +++- .../ethernet/qualcomm/rmnet/rmnet_map_data.c | 60 ++++++++--------- include/linux/if_rmnet.h | 65 +++++++++---------- 5 files changed, 70 insertions(+), 89 deletions(-) -- 2.27.0