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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7535C433F5 for ; Mon, 7 Feb 2022 09:41:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241369AbiBGJkD (ORCPT ); Mon, 7 Feb 2022 04:40:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354791AbiBGJbJ (ORCPT ); Mon, 7 Feb 2022 04:31:09 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0236FC043189 for ; Mon, 7 Feb 2022 01:31:04 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id e3so9593818wra.0 for ; Mon, 07 Feb 2022 01:31:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=e71qr5cQmHNfaTvqFdZSatwMnOkMecpoZmeynQAfXfU=; b=IipD0Md8PLGqTRc8YbhUGW9RZUZYMQMHks4wT414D4MJkTvXaIaxCLgX7q7EqqZkkE RniraUcxZGQqnV/BLhI8fR3OhKUqDYUBLkiKkwsuJN/ZNCuhQa9etjVpPPbBQ9jyOrwx MGb+BBECiHqPAOCpL/b5+NFypnEjgPgL0Rb5qKUiTSwuyDcdtYMjQxjnCr4gVMsnv1db 4Li8Ccoityy3n7nCqgyhw562KdbA+9+AlCO3h6k33jebIUk0d7GU1cLOM5H73yN+w4Xf YMhAHQA5StGpYsrAUVc3HUB89o5DXP0IdN5Syh15D5UZS0wH6QYVpbsbWtyqGxNwNZ4L OgFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=e71qr5cQmHNfaTvqFdZSatwMnOkMecpoZmeynQAfXfU=; b=b0IhysyYdeCgfFdffVekqYkeRb8QxpmjlhBZbUINZTPrB+kXXb6+D7JdO43RdHZ63U 1KqMGS0OdEf0ofLFv2Gvm8rkW+bVBQgisLmmUQAQU9tqtD/6qakjQRaovqFvGXIDxUQw Kkp1voupE8YwAKAz+f95j0SJUPV4Lbsrb9PT8D1odPkDLiOIdcPfLW5eYOsKHGELlJtU Kyi2n/nzEsnGCG/wspcHApgbkX6bLdBxi0wSMxnbuCVBAuXk39C0QxF7pm1HvyC7a94M rpIc1lyry8ls98zgmYYnpPPL4HE9cG2PrTcpPElRYP+TGoPxS/G58vxjtKysqmFbabgw 2Mwg== X-Gm-Message-State: AOAM5339fu2Ga6rsxJ8ZFHMQb6fcGlf+DFueoqHxG6wJHDySnca6PVjw k5Rggb6XdmX3xCBmhNtZSxKYvg== X-Google-Smtp-Source: ABdhPJxyfEhDPaQTrpIwF3s8f+P5EuB6O3syjtuhYC4gv/uXtG6GnEb8OsVA43hN5ymF4KDaQpvKuQ== X-Received: by 2002:a05:6000:385:: with SMTP id u5mr3350003wrf.105.1644226262555; Mon, 07 Feb 2022 01:31:02 -0800 (PST) Received: from google.com (cpc155339-bagu17-2-0-cust87.1-3.cable.virginm.net. [86.27.177.88]) by smtp.gmail.com with ESMTPSA id n15sm10497806wrf.37.2022.02.07.01.31.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 01:31:01 -0800 (PST) Date: Mon, 7 Feb 2022 09:31:00 +0000 From: Lee Jones To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Christophe JAILLET , Thierry Reding , Daniel Thompson , Jingoo Han , Helge Deller , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-pwm@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH] backlight: pwm_bl: Avoid open coded arithmetic in memory allocation Message-ID: References: <20220207080128.xmvommcddjfgz7ey@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220207080128.xmvommcddjfgz7ey@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org On Mon, 07 Feb 2022, Uwe Kleine-König wrote: > On Sat, Feb 05, 2022 at 08:40:48AM +0100, Christophe JAILLET wrote: > > kmalloc_array()/kcalloc() should be used to avoid potential overflow when > > a multiplication is needed to compute the size of the requested memory. > > > > So turn a kzalloc()+explicit size computation into an equivalent kcalloc(). > > > > Signed-off-by: Christophe JAILLET > > LGTM > > Acked-by: Christophe JAILLET > > Thanks > Uwe I am totally confused! -- Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog