Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1635987pxb; Wed, 9 Feb 2022 00:45:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwv0VOLQiYBQ14pZaEwPaD4rmojUk3bzVS0mTj9YGRoffghG+GxkjKWZ+GS3T1ypIj2c3AT X-Received: by 2002:a17:90a:548:: with SMTP id h8mr1370940pjf.109.1644396333815; Wed, 09 Feb 2022 00:45:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644396333; cv=none; d=google.com; s=arc-20160816; b=Ld4wjskARZC1T3PKPiDhUKc4L1FeQYYxtiXUDBK8gyzJh35hO/ZA8UiEDhR7+Dp6OU zuviIAmYrJQnd8WqUG16F3q8XsyRtcL5kWVs+Q1xgpeFhhUM2efsFUS6DJ1yKghEM87A WkJalMwU6nn0K1LGkPv46o6n7ynB++AJo7KmiFUzmr5TCUBcWx9fP9pxCbpmb2pudI0Q oHfKDmna4wfUCV8+uBZ//ZueL+T6tUO6g8xB3P/FbubpA13sCuCYK+1U7lzMxrjjmoPP C3qJmtTpA6XRUt4ejxnbXFDDE9pEMWaN1LmuMPX0oxtXY4gpBAj/uLddUwiZukUmPHw0 y/0A== 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; bh=8oCU8I73aEglxrJEIkO1otOcFbnQcXvZZrXI9Dptee4=; b=JY/nNL+U1KRECFpi39dQ8s+s8bVAW79iwfTbyZtQgNOpytgZeoioMa2DURreGE2J5U r1+gmJ4RN5J47L89N4JigD4X571rmq7VzCd9UBYBwM+Vm8lcTwrbRBbZC5osvSIdonjS yMCMvoPOVL4zHYYCxYarrKfuTjDk21fa8Q7b7yuSgLwQNGlcXHGHr4HnPocuKYxSBRP/ ek0WmZH51XsPcEnKMxDorzHD1nxSXZDigmOpubINlivPcSw/7Q+bY1GEWnd8V4VHFOnp 7GpB4OR7vxJbzR8OS3ZqyF2JgsljYXocUu5NnYRUltu3IGzp1fhlIRKfcgQ1WC40bkQ2 8SrQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id b13si16420577pgn.72.2022.02.09.00.45.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Feb 2022 00:45:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CD2A2C0DE7E5; Wed, 9 Feb 2022 00:41:55 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240074AbiBGIGQ (ORCPT + 99 others); Mon, 7 Feb 2022 03:06:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245495AbiBGIBq (ORCPT ); Mon, 7 Feb 2022 03:01:46 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C34E9C043181 for ; Mon, 7 Feb 2022 00:01:44 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nGyxw-0003Oz-Pw; Mon, 07 Feb 2022 09:01:40 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1nGyxo-00F3Bq-Ev; Mon, 07 Feb 2022 09:01:31 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1nGyxn-00AMWQ-2y; Mon, 07 Feb 2022 09:01:31 +0100 Date: Mon, 7 Feb 2022 09:01:28 +0100 From: Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= To: Christophe JAILLET Cc: Thierry Reding , Lee Jones , 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: <20220207080128.xmvommcddjfgz7ey@pengutronix.de> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uk5prupw6c7p3eyw" Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 --uk5prupw6c7p3eyw Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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. >=20 > So turn a kzalloc()+explicit size computation into an equivalent kcalloc(= ). >=20 > Signed-off-by: Christophe JAILLET LGTM Acked-by: Christophe JAILLET Thanks Uwe --=20 Pengutronix e.K. | Uwe Kleine-K=F6nig | Industrial Linux Solutions | https://www.pengutronix.de/ | --uk5prupw6c7p3eyw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEfnIqFpAYrP8+dKQLwfwUeK3K7AkFAmIA0dUACgkQwfwUeK3K 7Akisgf+KATEEZW9EvLtoWYOICsrIUedN6ABItVv/WiMhk+x+Eba9XEgyus6wzIc /pEpQB/9sngfUC7oZDdM7xZVmAn2c7CZOoQzYQKAdusOeXUSLwD+5PMS1WYfjIoK WGwZB6/Ghy/7TtpsljHKHei7DdwMsTz4l5N3e0pdjqpk106LPmcNXAL9QwmQzWKU IHkz9zPH+2KS0XtB4/kgHfCL8hz+gBMyCnC8spbzs1gGdXsqaldoAQmCFOPDxVTf V+3qfJITYq3tbUDjQpSHVMjJlhrg2CBbicAa0IYZHOGtsoQn+nGkmF5pA7TRX0m4 aEiCFiUcqsd4F3sKg+tZMD8bJMMbSA== =iwgW -----END PGP SIGNATURE----- --uk5prupw6c7p3eyw--