Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1676647pxb; Wed, 9 Feb 2022 01:56:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSlS3i0E+4GsNgk7pvx1h2Jsr0EFIOHGZOcPStpVBkAMRG2JdtGXW8xPDZH1UeEUpatCPY X-Received: by 2002:a17:902:70cc:: with SMTP id l12mr1311287plt.83.1644400584010; Wed, 09 Feb 2022 01:56:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644400584; cv=none; d=google.com; s=arc-20160816; b=t4bWnlEBeUy5ZNrod3ZxKnLG03Ia/0lSrjUhZAr4QP9cJY0eThL4eLQR/EFRCRxV3v 4la7U5X1HcuEj05uKKyY/AJhHU0A/TB+HP5eZ931SlQuxWouM9aoG/E05hpZXr9QWLyz tdDOvMW30ruIlpLzQWoPi+jdM4+Hy7nlgYIO24nPEVvl63DE8jLhdCgJ1cI5HwBO6M6U CzKxTHMIsXVYC7sZatTQFncCkjof8TwqsAYHlNn6O9fSqGdcYw/nvewRp5iPNPkZMoq9 u4tLIEXA0MwXkt0sSd2MX+5mc9wgiZgWmRJmmB92G/vbhfbBfuEUTCUm6rJ7XlvgzE5R 8AFA== 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=TwOpOhCkewurBTdSPeNG/7ZJDIatq7Dw8T+vkk/TtIs=; b=GG6BkDYUXl4d1lpCZwj1fHg52ePgoxduQ0DYNhYkH0R3UFCyHI/yusZ1d4TP+nQQuR 93iyJ3ESI0+Zzqv1xsJ1vI+p7s1wxAZKCIFxP3rAmbEdbs7O6ONSB6CNbV3ihosqGr0F kqc4aaMnFzYbcYemSsuaVZWBWq5i7Np9dlaAmnkhxyTc/+KjYEzbnU0W4iN3Ap47QKvM 94Ul68bO2qhDkDveAFsvHlUL7Z7YE3BBUe6BCG85Kxu0fCYa56B1OuKK7atjKOQUz/nB CF5LehQCXqUSPU+zsmMLYsGedYPCikCsj9boU8yZoXz2a6ln0P8lWNaukJtc/Wpgkkah rs9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="lW/GiqdU"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 15si15650718pgc.242.2022.02.09.01.56.11; Wed, 09 Feb 2022 01:56:23 -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=@linaro.org header.s=google header.b="lW/GiqdU"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352167AbiBHIyH (ORCPT + 99 others); Tue, 8 Feb 2022 03:54:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231657AbiBHIyE (ORCPT ); Tue, 8 Feb 2022 03:54:04 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1165C03FEC1 for ; Tue, 8 Feb 2022 00:54:00 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id l123-20020a1c2581000000b0037b9d960079so920889wml.0 for ; Tue, 08 Feb 2022 00:54:00 -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=TwOpOhCkewurBTdSPeNG/7ZJDIatq7Dw8T+vkk/TtIs=; b=lW/GiqdU3VVDp/fM92/DOGcQiYkmHr49MJ8+ldaZtWG+Rz0AGaKzffcSP6e7mKYNtp 49/IjQdY63rG2pETJUo630qcGPZsdVPQIJj873h1TvLczfsWYqMZ38inMSLfNaQihw9x LhQvvvpv/jIbjn+KTCIi6iLEIN8lvzm/6z25rtRwYmtebnh9Sej2ZI4P16dbsIDlL9mh weGZIiRJ4jqQDxuxM3tk44SqZbaAO/aFwlinYdFKoqsb7UiI8wm+hdy5UPdESAp0DOyB bO2AMyvRX9Z6EXZ6UNE/DXSiy8BmQ9npowQ8ZGmqcoPgFy3Y+1vOh8MWE6YKaPeRtFOk ZR6Q== 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=TwOpOhCkewurBTdSPeNG/7ZJDIatq7Dw8T+vkk/TtIs=; b=XOEFdLsyreaQ0p0EiwLnlaC/rr9T6madslGR1dmEdKY5OFVLsuGAjHeKltakQFkF+M sVH+dCEeR1iYdkhnqVxUZXcSFhY1lW2IZ43WQKLejchNP5ZEelbdIbc3ITQdzbrDPPvY iOFBsTDlMtJ/p+WAjpy2s4s+g1o+yjWyV3lnBPtAtgn/8JRTsetfWzOmWqsPc8bNSIZL 4SpWrJ5C+T/xVWPDgU3qtdubK4w92FBYiYbroUqqNVEsuqK2axHNxJ8j20cZUAi7Q4wq XQw5iSRgIX+zVGiybFbYSTisQuT5iPliDjQ+c7IdMnXKoT0AqOXwIKwMk8FXYNPWcrX8 Vj9g== X-Gm-Message-State: AOAM532wj6Xio2drN9YA+22CQEy7kplLTY4+UsQ1UNsfQEN//AFieSP/ W7iMY3F6AE1jbV+F3NPQQ7sFew== X-Received: by 2002:a1c:a595:: with SMTP id o143mr191510wme.78.1644310439409; Tue, 08 Feb 2022 00:53:59 -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 o10sm7645041wri.69.2022.02.08.00.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Feb 2022 00:53:58 -0800 (PST) Date: Tue, 8 Feb 2022 08:53:56 +0000 From: Lee Jones To: Christophe JAILLET Cc: Thierry Reding , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , 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: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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=ham 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 Sat, 05 Feb 2022, 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 > --- > drivers/video/backlight/pwm_bl.c | 9 ++++----- > 1 file changed, 4 insertions(+), 5 deletions(-) Applied, thanks. -- Lee Jones [李琼斯] Principal Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog