Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1967022pxb; Sat, 14 Nov 2020 08:18:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJwDBgsPvoVYH/tAdoOhP2Lz0h4bpNyzBMpzrZXLcxidqMEaEWMnOVAwrDtWdHRSnKknVly7 X-Received: by 2002:aa7:da0a:: with SMTP id r10mr8217811eds.102.1605370737953; Sat, 14 Nov 2020 08:18:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605370737; cv=none; d=google.com; s=arc-20160816; b=vVV67OdRcjwQhaYh6LHsPVgjd7qNUMaBKTlgaLYa9Rtwekdcp7i5aQq+GTLbOMCw5C E62CEidrNugUNVmCzD+PPl33uX5Kv35xDL1097w/IXIpqMBpO3e/e1dXlSgXtxAbpz/P vtYTFR2crTOpVm4v4Kr2rLovA1Hc5DpbJbRi5I01M8MDJ687X8iLDIoyJrmjEJTxukKO Ufr9Uwd237T1thqWba7vMcWWpJJv1Wf8KtB+QLEI6zFeYRJt1vKv1puMOOU6evNqA6IG /sdbJWjLt3z+l5w0VqEqkVOTAtUrDbnp7gCDf62p9GdN/3EZ0YLb/xo3jzd+0UMDpHN9 DJtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Qy/vWVya8VJyBUQUf5m873Mz3sUP2SvzjZTKSRUvPHA=; b=ZJSZnW4qBDfL4E6z1S0RFKhKiJhTQmub4ph23v7PWJleUzy/4ltS8HpZeFMYeQepOZ pVCimfdpARXG4f/4RT7c9bkeSN7yMMtbu8AP7jHA2FzxCHAjix+SV8szTCYqyrzwOxOc Xia2Zd8JyjkQJMf4nPGVMe8JJDRM9iLdwH9PtOQnGSHruzMIJkrAyvV4Ypw6uW43fNHv LzLhOSm3Or/mKOjkYom51W74V0Fpeq3IuLTaaCdxLb1GAZ2M7mLAmCfUNz22RCJzlBFK xx+vefOFLXiz4m8v8Pn/Hn+HCpnarPNKJPXHOpGULH3TATg2oyzMa7LEJnm+MMDgybf4 RzrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KcePe2Z3; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a2si9088589edn.504.2020.11.14.08.18.32; Sat, 14 Nov 2020 08:18:57 -0800 (PST) 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=@kernel.org header.s=default header.b=KcePe2Z3; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726885AbgKNQQc (ORCPT + 99 others); Sat, 14 Nov 2020 11:16:32 -0500 Received: from mail.kernel.org ([198.145.29.99]:53714 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726356AbgKNQQb (ORCPT ); Sat, 14 Nov 2020 11:16:31 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 7472B206D9; Sat, 14 Nov 2020 16:16:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1605370590; bh=wA5JJM2Bglgv3WNaexhFOxOw949Mt4FgBWDr20dnDG4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KcePe2Z3jSFIayjYrptBzcTyAxS7H7XkDm+fV+qUyDAqEnNKAy383n4RPbrvBUHe/ 1h1oHjj6Ue+iDdGi7mc8gvAwct9MVWdpYVGWZg2SZJ0FosB+TAY8w2/rE6VdPfDgOb 2sYpcTxJPyQpOr5y6o3deR8ztoV+2f0DV1np9XXY= Date: Sat, 14 Nov 2020 17:17:24 +0100 From: Greg KH To: Jonathan Cameron Cc: Bartosz Golaszewski , Lars-Peter Clausen , Peter Meerwald-Stadler , Michal Simek , linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski Subject: Re: [PATCH v2 1/4] device: provide devm_krealloc_array() Message-ID: References: <20201102142228.14949-1-brgl@bgdev.pl> <20201102142228.14949-2-brgl@bgdev.pl> <20201114154641.0258f4ee@archlinux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201114154641.0258f4ee@archlinux> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 14, 2020 at 03:46:41PM +0000, Jonathan Cameron wrote: > On Mon, 2 Nov 2020 15:22:25 +0100 > Bartosz Golaszewski wrote: > > > From: Bartosz Golaszewski > > > > When allocating an array of elements, users should check for > > multiplication overflow or preferably use one of the provided helpers > > like: devm_kmalloc_array(). > > > > This provides devm_krealloc_array() for users who want to reallocate > > managed arrays. > > > > Signed-off-by: Bartosz Golaszewski > > +CC Greg KH. > > As this is going into a very generic place I'd like a relevant ack. > That file is a bit of a wild west for acks, but Greg seems most > appropriate person. > > So Greg, any comments on this one? As there is only 1 user of this function in the patch series, you don't save any extra code space here, I don't think this is worth it. We are seeing less and less gains from these new devm_* additions, and only more confusion and problems with them. So perhaps don't add this? I don't think it is needed. thanks, greg k-h