Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp468286ybm; Thu, 28 May 2020 07:25:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+2osDjYlCP3Yp51oi3jvkz9V2Mij8IH3SVOeI3ZD1LLExHeHCFzinTPPfxjL4IJT2tCJd X-Received: by 2002:a05:6402:1447:: with SMTP id d7mr3497869edx.367.1590675944236; Thu, 28 May 2020 07:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590675944; cv=none; d=google.com; s=arc-20160816; b=F8xlSI+pXY7Q18Bh8ggeMeEUHmmT0ZUoQL6iGZzLOr7K8VXHnkYLqa1mFOt/WuVGGy 4bGYEsxqdRMf0LN14zSKKXNf18LUSiwilVbyDoECYgDkRd/6XKegY9qlsfStl5zkxyvI qvmF3/p7g/UPVMZv1DUCC85mTBYkE8yrFTSP8Jq9Jxr/OUvgQQdr28931i35WpZ0HmeA xSZ0VclBLsmaMreS2pHPTD31gvZ/Vf5KEGcnhBli8a/jk3RLMqDQEZqculp2lgD9B7Yo ZwFGJO4oC7WZq6uPMUFYx1olqHC8F4mvkPAiJ6IVBVXVuJ4hqf+eMMZdMQqjZ7XLGbt/ ynZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fW1nO44AIOkd1DyHEXQPPUYlT6a8b9ESKOQqboJxrOI=; b=vX5LLj0VffI9FKp6evPWH6S2aa2nU/OFL//Loxy0+4wnaYOVIGjsMw+lh2+g3aoHL3 uRcHl4sjJZvusZws/mt6vCjVXs0Ue/qn97OtBULGecgtUK+iqJrZ2idipq+RJat/yEZg P7AVwr5Kt6MQWdOGZoIZLpPHuEfRo6v6Kn9+xfpGLTsZvMZlAxDDX5mwhHegG8/5uCbm vCOVo0tyk6IqOPW7GgNd+RfcbxjP1g2VUKUsOLvSnWOyEp2CnZqJr7qWcteot3EOlGrE E3TESs2gti1dAtP0JeP6JeBJJAT4X1sjTilqmRFCxnrf2/1NB+axEr7Y4yuxp4CmSWJN Dp2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=Ej4N7usl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m7si3708383edg.244.2020.05.28.07.25.20; Thu, 28 May 2020 07:25:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b=Ej4N7usl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391024AbgE1OXS (ORCPT + 99 others); Thu, 28 May 2020 10:23:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391109AbgE1OWz (ORCPT ); Thu, 28 May 2020 10:22:55 -0400 Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C29CC08C5C6 for ; Thu, 28 May 2020 07:22:54 -0700 (PDT) Received: by mail-wm1-x344.google.com with SMTP id r15so3353094wmh.5 for ; Thu, 28 May 2020 07:22:53 -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=fW1nO44AIOkd1DyHEXQPPUYlT6a8b9ESKOQqboJxrOI=; b=Ej4N7uslJSputqEQa2xbVuKyL2M+K03+7SqLgEzI3Rn7DshHJgdM/1XfyTMJGnW2Vr m0kkQeSvrJxgLmRBi4HalZPUSysYWSMvD8eFOAkLxWuFZhQhfy/KFGA/rhCdy4GUO4Pn iKNJxxJUjDqambIIaNJHNZx7GdTpvLc5/YhqkdhU/HunYNdaEEHUWKYEKM/54NCX3mc4 7+4XyZJipYLbx5cPjsGshzE8ppHw/6xYyV6Z2MCCG8D1JcIbjXIceyeEUpdWsHqCAuhz oq1OVCuUMCpbxDzIXVKaKNAUP6MtMrYwvPGK3qKZh8Z+oY7R5T9JWGFIadiTQ2msyWgZ 0lcA== 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=fW1nO44AIOkd1DyHEXQPPUYlT6a8b9ESKOQqboJxrOI=; b=nrMEALRKn9wB84ni/vBsrc30qkF70lwhEPnyx/os+OXZaHkLgSwBfmGNc7Jmo+ulhk HAptKFjQ9zP2MzNudpLTd7FOp41grrT9r22uvecBqag4TlLaiMswrq84KMaBnjSv25Q9 3MN1Lf07y4KyW8lb12wJ5xoUlaLL920DrcbyuLQyNArCvM2P7bm9MX4DXBBYDRulnaer FGxdVAtJ4kmkHLkwlq2PZgNdmukV5Na6j+FXyfLnb2j75zAeizK802y7sDcj93KMM7ul UUoqraj1veWXle5e/VLSpSjsmDNUtJwz9Rhf76cFyP9WjCeSLnOSCcgYWZrP2FTRQ+zU Uwbg== X-Gm-Message-State: AOAM532wQoxc9TsHOe8TWDY5LLKd3EABfa35KMhKKfex/N+7zv7XOYmR +//ktVxDg9eS2Ag74bd2AnjMqg== X-Received: by 2002:a1c:4008:: with SMTP id n8mr1516082wma.118.1590675772064; Thu, 28 May 2020 07:22:52 -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 h74sm6258162wrh.76.2020.05.28.07.22.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 07:22:51 -0700 (PDT) From: Bartosz Golaszewski To: John Crispin , Sean Wang , Mark Lee , "David S . Miller" , Jakub Kicinski , Matthias Brugger , Mark Brown Cc: netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Fabien Parent , Stephane Le Provost , Pedro Tsai , Andrew Perepech , Bartosz Golaszewski Subject: [PATCH v2 0/2] regmap: provide simple bitops and use them in a driver Date: Thu, 28 May 2020 16:22:39 +0200 Message-Id: <20200528142241.20466-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.26.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bartosz Golaszewski 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. v1 -> v2: - convert the new macros to static inline functions Bartosz Golaszewski (2): regmap: provide helpers for simple bit operations net: ethernet: mtk-star-emac: use regmap bitops drivers/base/regmap/regmap.c | 22 +++++ drivers/net/ethernet/mediatek/mtk_star_emac.c | 80 ++++++++----------- include/linux/regmap.h | 36 +++++++++ 3 files changed, 93 insertions(+), 45 deletions(-) -- 2.26.1