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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5069FC433FE for ; Sat, 13 Nov 2021 18:18:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 33D0E610A8 for ; Sat, 13 Nov 2021 18:18:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235918AbhKMSVl (ORCPT ); Sat, 13 Nov 2021 13:21:41 -0500 Received: from mail.kernel.org ([198.145.29.99]:46224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230363AbhKMSVk (ORCPT ); Sat, 13 Nov 2021 13:21:40 -0500 Received: from jic23-huawei (cpc108967-cmbg20-2-0-cust86.5-4.cable.virginm.net [81.101.6.87]) (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 6CBDB6112F; Sat, 13 Nov 2021 18:18:46 +0000 (UTC) Date: Sat, 13 Nov 2021 18:23:34 +0000 From: Jonathan Cameron To: Andy Shevchenko Cc: Alexandru Tachici , linux-iio , Linux Kernel Mailing List , Lars-Peter Clausen Subject: Re: [PATCH 3/5] iio: adc: ad_sigma_delta: Add sequencer support Message-ID: <20211113182334.0486a4a0@jic23-huawei> In-Reply-To: References: <20211110111750.27263-1-alexandru.tachici@analog.com> <20211110111750.27263-4-alexandru.tachici@analog.com> <20211112171448.79b4e8cc@jic23-huawei> X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 13 Nov 2021 19:00:11 +0200 Andy Shevchenko wrote: > On Fri, Nov 12, 2021 at 7:10 PM Jonathan Cameron wrote: > > On Wed, 10 Nov 2021 13:17:48 +0200 > > wrote: > > > > > + kfree(sigma_delta->samples_buf); > > > > krealloc() preferred. It might not be necessary to actually do an allocation after all > > if we happen to have one we can already use. > > Looking at below, shouldn't it be krealloc_array()? True > > > > + sigma_delta->samples_buf = kzalloc(slot * indio_dev->channels[0].scan_type.storagebits, > > > + GFP_KERNEL); > >