Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp398036pxb; Mon, 7 Feb 2022 14:10:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzBgymmkvQHhagX7JVhebZMr2loZlCxic2UYL/be9GvIJ+hUzhiTicvrw4DhiEq42A1ayAL X-Received: by 2002:a17:906:cc46:: with SMTP id mm6mr1364192ejb.202.1644271845890; Mon, 07 Feb 2022 14:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644271845; cv=none; d=google.com; s=arc-20160816; b=osMPKJvv7fKGJx7W62PLf+lOWvqtQjBIdbXju6fhdLyC1TrKZwDH+K9SvVXo45ZqBi 5Prr9oON2uGOwGrtzpajOHNhQHO7uOcNcNm4MnOxHZHRgcftv1/yN0LAeo8znT8OzXBQ hjJEg4OgdKUdO+DrlTzJNY659NRdBzLqMA/byvE5dzLheQs2BqRO3TPK7+p+YtSfxvyo zDi9LwxNb6a7v6pduoGCPINwJX2b8Hbo6tvcrwuCZ+lexjlDf16ZqfnOwkkBW+acInC+ hkJigNXnpg0Pg5h6dcDspDOgm1gpakqLLc92UQHFlK2YCfT+8o3K3Qz6hwbdoAkCew9N WkzQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=e71qr5cQmHNfaTvqFdZSatwMnOkMecpoZmeynQAfXfU=; b=N3TwlmOSlnhfauaePpODCECSC4ObnLc3yZ0Uz436g5e3M/qGb9bRzUEn6O+pcvlDiO EwOAqDXcOtk85dSe1icLLR+9fhzyFvUegg2W8DP9KRqtKSpz58EMNwnl6GV5ylKw6+xk Yn7O7S5mbUaje5wA0ZNmyLPmD5TMEB4wdfe+UZXQe/0w/WLP2P3iQpMn8hbqzQaAbUCS 7wyCKLMZk3AsCA03TMsuOlmCyfNjZPUlprJEAT9ksT0f9T9mZkG1XeluIJgGAKK3ZuKq rtdSWcOPabnPKsbcrGAyfCKIjMZZrgk1eLDyPIvwBcLZqHW9fVojmrHdZnqZpTdJaUVY O4dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IipD0Md8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg27si8866450ejc.363.2022.02.07.14.10.20; Mon, 07 Feb 2022 14:10:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IipD0Md8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243042AbiBGJfI (ORCPT + 99 others); Mon, 7 Feb 2022 04:35:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354794AbiBGJbJ (ORCPT ); Mon, 7 Feb 2022 04:31:09 -0500 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3BDAC043188 for ; Mon, 7 Feb 2022 01:31:03 -0800 (PST) Received: by mail-wr1-x434.google.com with SMTP id i15so1157433wrb.3 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=pzNhygrU8Ln2zPQs5wapkKdHpA46vEwMftokhLEDj5ZyjFdi5WY4HHfjNGUNmGAhEH S5+0lsCVJzMYgC+SCv7wUmHB3SSBjix2edog5LlrXSugQZ2sVItiteYTSJ7zH3+bUNz4 K+ZEHG8gmiXv12Gj8kTB4eMAk6cZ7OvyC2xOJzvOKS5jDwfnpewoxKGeKAZr22ltSdMW hnkx3GGwu7J96Vdrmvdk8rE+8SXTojYZhTgSYbnkQG9caajGnd8PzwEFQjS78vvJI/rT zRVg+K2/CusnlUVqZYRJjJuSWAKrEzfi2mllcyDEccszXdaO8uN4QSq0PQs5MmGhESV5 1thA== X-Gm-Message-State: AOAM530kJOH3FNwv5ysR8wR8UiC8wa7RvxVq1TGIxEkQbgy6DIJYIlPh zYOCnk/00zVimcBTNqgipHq/FQ== 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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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