Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2885876ybb; Sun, 22 Mar 2020 10:02:23 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuU59390pcME79dFX1m6v2L8XFoGTQdgX/ZzA2711vxNjRNNfFkzBqbxAPn3CyIbUgdcJdI X-Received: by 2002:aca:c4d3:: with SMTP id u202mr135453oif.20.1584896543262; Sun, 22 Mar 2020 10:02:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584896543; cv=none; d=google.com; s=arc-20160816; b=xdmDofbMy758as3SCQcOCRmshUvpW916kXapT9J8537dESiaAL/9ZnLXd9kalDaLIj 5ufhkrdeITDxbVY+jkG5d1uceHWNl8jTL3jIanpJ5F0fmGMiyVK+Y/v2VGa6qRQWHaHV 2Abyp+MypaSSzIoVn7yec76u78JkxAJN0zzobtgf97On4b327C2/Sp67GVnvx8Jr5oPI ZNIL27OB+KDdtp1FWvUbxaP59aRstSDMWMK4llmtKzGyG/uj/MKTxpMjIv4r+l3bs0WU 4V2RkWKR3Nq57l9qdgQNOlrrsU7GFQUOdea6EZ4pqDb/ufsmM31HsqE8FizSRaVvtzfw 4weg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=P0iE6O7hqSH2O+ztlUapqkRzpDrs1SGWX2PSQKfZgMI=; b=U5s0z5SBE1SgzWifIw9HEueG1lUg4AFwJiO9SQKZLOFs81Mgr6GxATliufcypOaEc0 /t6PaIKpNPA/wAeBPTRJOKTJKbn9lPn75c3F3CfyeZKToXmU4OkM8nbI7s96vwDz5LLS 9N76YLfh2M6IFBavN8XnqT8goroap1Lc2BC47e/jyY1Xil0NKybsSTZ8MXiiEZosf5k7 +wbHLT8D0RsxZkJji0KGDSFKKsroDp6gyZ3kmE9Kja0Wjg6bYu9j0OMyEDFWBdaP4AYN jy0HTzE0ellCidZrslz09X0BBKPDhsKwOW5XfCzWAS3KB1YlAJO5gzLDeqs2ke2Pu+eD BM5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=icTarVVZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f3si5877272oia.264.2020.03.22.10.02.10; Sun, 22 Mar 2020 10:02:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=icTarVVZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726583AbgCVRBk (ORCPT + 99 others); Sun, 22 Mar 2020 13:01:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:42986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725881AbgCVRBk (ORCPT ); Sun, 22 Mar 2020 13:01:40 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D49FF20724; Sun, 22 Mar 2020 17:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584896499; bh=fRgZZMF3O8FsJEBNZuwdEDytSWq+gORzarwQbFC502M=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=icTarVVZBn8HYnGaH7DB2idV9R5zd0ChanKmPcbwcm+MUn6QvqZVMti4e75xzTDDc EO8N+2l3FlE58AzsWiD2tqjxHBf09vfYEeg0cTnHHB2RcK6otA4nGfuz0uAcRd4Z7i qoiBKz44XQNNjqLn77Kx6gyYSO3EGUolGKyyGzcU= Date: Sun, 22 Mar 2020 17:01:31 +0000 From: Jonathan Cameron To: Alexandru Ardelean Cc: , , , Subject: Re: [PATCH v2] iio: buffer: re-introduce bitmap_zalloc() for trialmask Message-ID: <20200322170131.3e83f0bd@archlinux> In-Reply-To: <20200321085956.11213-1-alexandru.ardelean@analog.com> References: <20200317123621.27722-1-alexandru.ardelean@analog.com> <20200321085956.11213-1-alexandru.ardelean@analog.com> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 21 Mar 2020 10:59:56 +0200 Alexandru Ardelean wrote: > Commit 3862828a903d3 ("iio: buffer: Switch to bitmap_zalloc()") introduced > bitmap_alloc(), but commit 20ea39ef9f2f9 ("iio: Fix scan mask selection") > reverted it. > > This change adds it back. The only difference is that it's adding > bitmap_zalloc(). There might be some changes later that would require > initializing it to zero. In any case, now it's already zero-ing the > trialmask. > > Reviewed-by: Andy Shevchenko > Signed-off-by: Alexandru Ardelean Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke it. Thanks, Jonathan > --- > > Changelog v1 -> v2: > * add 'Reviewed-by: Andy Shevchenko ' > * re-send from an Analog server; GMail changed the author to @gmail.com > > drivers/iio/industrialio-buffer.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c > index 4ada5592aa2b..5ff34ce8b6a2 100644 > --- a/drivers/iio/industrialio-buffer.c > +++ b/drivers/iio/industrialio-buffer.c > @@ -316,8 +316,7 @@ static int iio_scan_mask_set(struct iio_dev *indio_dev, > const unsigned long *mask; > unsigned long *trialmask; > > - trialmask = kcalloc(BITS_TO_LONGS(indio_dev->masklength), > - sizeof(*trialmask), GFP_KERNEL); > + trialmask = bitmap_zalloc(indio_dev->masklength, GFP_KERNEL); > if (trialmask == NULL) > return -ENOMEM; > if (!indio_dev->masklength) {