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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id E51B8C0219B for ; Tue, 11 Feb 2025 19:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KRGu/w77R08gH/4YabTq9se+z50iSfESFbJVRlhd9M8=; b=tEPpMWtWOKD8k1 eaMjeUCH1twSfQpOGv+4aWTtg3dJ7OJeXbneJBJ8nvLCvtv5BRjd5Ta6UBd2BWwyHwP/F1m1Cnfta tw2fIajnmMJdt+rQ1+geFcSxLpFW69CUdjrgfbM09jxb6sJmYrtYHPDD9vgJ2pqhOxIbTY+pkRHg2 IYOWoul4g6s4R3j94i92M94pZBfkuYlv0KsMqAc0oH8MdqG//tt3k4n1nGo15fdwkWI79Ze/gQCn+ T7BNscx/5rhKy69WkuG7GpsdNQ+9iSSZxaOHAzX/pAzxpz4pG1EDixRWxY/d4ZDhZaybTVI/nWsYb SqUd18XwcCSDKOSncZbg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1thwJ4-000000056X1-2YXE; Tue, 11 Feb 2025 19:52:30 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1thwDy-000000055Pn-3RkE for linux-phy@lists.infradead.org; Tue, 11 Feb 2025 19:47:16 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 6320EA40C4C; Tue, 11 Feb 2025 19:45:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99459C4CEDD; Tue, 11 Feb 2025 19:47:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1739303233; bh=l+iielRDD1bT9pM6nGbHot5GG7rZbmttCOx/HN/goU4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bqXsQQAKXNpcPIx/WGsrVudBGjDBJGYDzYGupkC/m/yjeYFTzw//u+4Rcck6JDRoN XRlVHoP6LL6Vpc++j6YQOc1DsslK488cxUTfjBxpEC9c9UZzchUrygtiU6dT9hnxAY YeMSdBEC7VF2X/KfFSzw41R+5Sh2XKND46lfId60Qm+76moulNskmn+88svpHL6ufB Tc730P46NE7W8EqNRAMkR6ro+ggaQ9xhIXaDusCaeBzYw2MaMshFiCra/pAFgWAYb2 9qMHCJbUev6uUvd2s5BPOd+3p/QMKeWkkoYArIchnm9txu416uQI81b6hl/ueMlP81 ik8UmeTWMLfHg== Date: Tue, 11 Feb 2025 19:46:58 +0000 From: Jonathan Cameron To: David Lechner Cc: Linus Walleij , Bartosz Golaszewski , Andy Shevchenko , Geert Uytterhoeven , Lars-Peter Clausen , Michael Hennerich , Ulf Hansson , Peter Rosin , Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vinod Koul , Kishon Vijay Abraham I , Nuno =?UTF-8?B?U8Oh?= , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-mmc@vger.kernel.org, netdev@vger.kernel.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org Subject: Re: [PATCH v3 10/15] iio: resolver: ad2s1210: use bitmap_write Message-ID: <20250211194658.0cfb437b@jic23-huawei> In-Reply-To: <20250210-gpio-set-array-helper-v3-10-d6a673674da8@baylibre.com> References: <20250210-gpio-set-array-helper-v3-0-d6a673674da8@baylibre.com> <20250210-gpio-set-array-helper-v3-10-d6a673674da8@baylibre.com> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.48; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250211_114715_009564_37270084 X-CRM114-Status: GOOD ( 17.21 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org On Mon, 10 Feb 2025 16:33:36 -0600 David Lechner wrote: > Replace bitmap array access with bitmap_write. > > Accessing the bitmap array directly is not recommended and now there is > a helper function that can be used. > > Reviewed-by: Linus Walleij > Signed-off-by: David Lechner Acked-by: Jonathan Cameron > --- > drivers/iio/resolver/ad2s1210.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/resolver/ad2s1210.c b/drivers/iio/resolver/ad2s1210.c > index 7f18df790157f1e411fb70de193a49f0677c999f..04879e6d538bce664469c5f6759d8b1cedea16e9 100644 > --- a/drivers/iio/resolver/ad2s1210.c > +++ b/drivers/iio/resolver/ad2s1210.c > @@ -46,6 +46,7 @@ > */ > > #include > +#include > #include > #include > #include > @@ -180,7 +181,7 @@ static int ad2s1210_set_mode(struct ad2s1210_state *st, enum ad2s1210_mode mode) > if (!gpios) > return mode == st->fixed_mode ? 0 : -EOPNOTSUPP; > > - bitmap[0] = mode; > + bitmap_write(bitmap, mode, 0, 2); > > return gpiod_multi_set_value_cansleep(gpios, bitmap); > } > @@ -1470,7 +1471,7 @@ static int ad2s1210_setup_gpios(struct ad2s1210_state *st) > return dev_err_probe(dev, -EINVAL, > "requires exactly 2 resolution-gpios\n"); > > - bitmap[0] = st->resolution; > + bitmap_write(bitmap, st->resolution, 0, 2); > > ret = gpiod_multi_set_value_cansleep(resolution_gpios, bitmap); > if (ret < 0) > -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy