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=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 2DFE3C433E0 for ; Thu, 28 May 2020 12:35:21 +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 E66C92068D for ; Thu, 28 May 2020 12:35:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tsvIvl7H"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=bgdev-pl.20150623.gappssmtp.com header.i=@bgdev-pl.20150623.gappssmtp.com header.b="n5TfYfHG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E66C92068D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bgdev.pl 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: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:In-Reply-To:References: List-Owner; bh=0ruC8hCPv9Er/jae2gSl+ym8U2YSvmtOXsLY409qYlw=; b=tsvIvl7HZWf06b 9m9gs1R1Zx6FJJTuJmSw2fTvMkiAup63iLsE/sft1kKLOgV4U+EEL9Ws+w8NEbLiUvTJ4i1J+WGwt jAihm3MDHHNnMEpmOPIahDyDrocySLfPLOKi0CaUXvgdpEAGt/S0ghDKtjMFbOdUMIA3J/msQRCYy dngswDA3y34ouXOjrHz+VUXKccBAfxlgtD8nvLlu3pfLrs0hrbq5m6U8YnUb5ckTF0IrrhjgoOD8o Wio3PXcZ+4jDEtcoMtdpdVYMpbwblzarMVcAjMBxxcCj/BQ3vJaEx/e3UEHHAf7BU+WHiZNwF/LUw 6pZHowxmhphnOC1YNoiw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeHkm-0007mB-3x; Thu, 28 May 2020 12:35:20 +0000 Received: from mail-wm1-f66.google.com ([209.85.128.66]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeHkj-0007kS-AN for linux-arm-kernel@lists.infradead.org; Thu, 28 May 2020 12:35:18 +0000 Received: by mail-wm1-f66.google.com with SMTP id u26so4413401wmn.1 for ; Thu, 28 May 2020 05:35:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BQJlUoiEpzky8o42erc/ysy+K0QjdQ5ysTv41onRRZM=; b=n5TfYfHGMNMD8D+8R6USQfibZj8hFE1+qAcYAnQl3Mw9twHILNshCqgYHbRv7HpuaL v4IklUmYcEW5niLRusiOXOTcnxRLlH+wYowKNR3lZLf5ItsR95+s8Hv++i4vO5dC4uPh n0p4wW94L1kDNBcKfipskEv7wfb7426RGlrPhn4PFoxf1I0YEsoJru8lwCrLv92WVLLy 2hlwHISith+xluEzHWoEfPddgu3jBHMUjBzpgKrfubN75bsbjR1KjwAIJGSc6VeHYsh9 WQfz5qvkacA722/Ou4Ec0yxL3tlfgeZ+5nX5+ECK9Hx0I9c1Wqnk3rOdrygNkRJdfAh9 V4dw== 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=BQJlUoiEpzky8o42erc/ysy+K0QjdQ5ysTv41onRRZM=; b=DPvHTh7wgLJLVs4sECA9JEQoIVzEkeWqg8wpo0fTeAWBlWqELv5o4lkBApPXEf1t5W YSJNlauIcd4xnUMwXjD/HhrIQKjYRFyN7lep8h0+0rlh1av1Th8hVWBNANuRoyhdcrRJ 4dDuSKpBXsP3XuuerExLZIEEg4LSvHqjpzOPy/tqSq/wZfcNdel2w3N9URPyCk4bd5lO vLI6nsORqAaXD7NWL1j4md5F55ZuwvXdyzN6QCS1bTZzCvoQQBhPtLvarClhRa13TYeF Is9O6ZbTrqVDGF7hT0ZcybqqbYAI3+xLL1A8bGQhYWw+rB8YdP99lq4eyPjv++TwkK/y wfSA== X-Gm-Message-State: AOAM533Cv5+MvuhoxziFPs/WPDDTvw7XPyq+GlPO8U1/5V/RIMi7j5VI fQkPONaaBVyXu56GqCn7VKVTOw== X-Google-Smtp-Source: ABdhPJwkYFBW2TmPZeRXJcUrexQmKR4xdJmfkmnN7Oh42inb9Wtau1p7DRTwWhCZId+ogIBZ4nemzg== X-Received: by 2002:a7b:ce01:: with SMTP id m1mr3261268wmc.116.1590669310774; Thu, 28 May 2020 05:35:10 -0700 (PDT) Received: from localhost.localdomain (lfbn-nic-1-65-232.w2-15.abo.wanadoo.fr. [2.15.156.232]) by smtp.gmail.com with ESMTPSA id c140sm6027306wmd.18.2020.05.28.05.35.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 05:35:10 -0700 (PDT) From: Bartosz Golaszewski To: John Crispin , Sean Wang , Mark Lee , "David S . Miller" , Jakub Kicinski , Matthias Brugger , Mark Brown Subject: [PATCH 0/2] regmap: provide simple bitops and use them in a driver Date: Thu, 28 May 2020 14:34:57 +0200 Message-Id: <20200528123459.21168-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200528_053517_425333_B996BAAF X-CRM114-Status: GOOD ( 11.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephane Le Provost , Bartosz Golaszewski , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Fabien Parent , linux-mediatek@lists.infradead.org, Andrew Perepech , Pedro Tsai , linux-arm-kernel@lists.infradead.org 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 From: Bartosz Golaszewski Hi Mark, I noticed that oftentimes I use regmap_update_bits() for simple bit setting or clearing. In this case the fourth argument is superfluous as it's always 0 or equal to the mask argument. This series proposes to add simple bit operations for setting, clearing and testing specific bits with regmap. The second patch uses all three in a driver that got recently picked into the net-next tree. The patches obviously target different trees so - if you're ok with the change itself - I propose you pick the first one into your regmap tree for v5.8 and then I'll resend the second patch to add the first user for these macros for v5.9. Bartosz Golaszewski (2): regmap: provide helpers for simple bit operations net: ethernet: mtk-star-emac: use regmap bitops drivers/net/ethernet/mediatek/mtk_star_emac.c | 80 ++++++++----------- include/linux/regmap.h | 18 +++++ 2 files changed, 53 insertions(+), 45 deletions(-) -- 2.25.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel