Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp304076rdb; Fri, 5 Jan 2024 10:17:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHSqFp4k17CyEd2s9Y4yPXuLy/Zex9pEJFxCJy46O0LytAnpofNAshz47/wiyKsTAAI48R9 X-Received: by 2002:a05:6512:2311:b0:50e:b5e5:bc4c with SMTP id o17-20020a056512231100b0050eb5e5bc4cmr504467lfu.50.1704478672685; Fri, 05 Jan 2024 10:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704478672; cv=none; d=google.com; s=arc-20160816; b=f97zBRddgobNse0lKGeAbrXtmI0VygQzB6JJgsoGwJlYuX5O6UHgOnBPc6NFL+PFFJ HgE0oHaN2xXcVmVMSeBLa+QMW1l/RqB6dm9Kgorp0VcVUaGHRXJLsC8n/qvuFd/o/qgh +RH4kt8eMxD0ZqQLQVA3Jr/S5kUQhbSkLfZCZsnRdUNEdH56N2EBU9fU+8Tp1DdSz0d8 BQTXEGyMR2iDRv9nJvSDW2N/9U2hFlu3vfvAAtiSPSqaUy5HZY2CqUlaC9QT/2xvdmNd DAMrVttDUGpaZ/dTV4MnDUSW88kjHzsf772gv9wJMk5oebDY64AT96PTE4hWdVRh21Ww 6vXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=9I/V4bfaoYSOxFfnj8JFSrOi1wVdUSbRrkSkeRTBjnw=; fh=/311VSBYDK4yuXoSFEq4NApHMBDdlgO+cJfF8IQm+uo=; b=gVfZTuCfluP8CXBsOgwTTJvFiXtQbVTGVaIa4m1tsHNvVed3fOxQrPkwjqTErMWfDR 8cY6xWwPs6YILeZwoAczwIbiLEzHxX21QBA1UHwTRiLNUIlIu2UunHiFhgeqNy+/7oT8 TMffsSaiMB8njQhwGcoUyPzAsr1cKnSPn0hej4GrRDYYG3cs+/owGsxZ+af1ghQ7DH81 uHOgY1clU/1oNFkgYjuLXcUG2MS9VTwpWLnXP4DAclWiT0steAYeIMure1uU5GjAOLxR uDNEa381lDjR5TxQN02welFbvabMeb9lFPp+ONfFFcTg/bZ1WcrbLmf2YyDHYqWNLzry mWgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@embeddedor.com header.s=default header.b="rB3BJ+l/"; spf=pass (google.com: domain of linux-kernel+bounces-18195-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18195-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id u24-20020a50a418000000b00555fd111991si803505edb.499.2024.01.05.10.17.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jan 2024 10:17:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18195-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=fail header.i=@embeddedor.com header.s=default header.b="rB3BJ+l/"; spf=pass (google.com: domain of linux-kernel+bounces-18195-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18195-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 6D9221F22302 for ; Fri, 5 Jan 2024 18:17:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 955373589B; Fri, 5 Jan 2024 18:17:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=embeddedor.com header.i=@embeddedor.com header.b="rB3BJ+l/" X-Original-To: linux-kernel@vger.kernel.org Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FE613588C for ; Fri, 5 Jan 2024 18:17:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=embeddedor.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=embeddedor.com Received: from eig-obgw-6006a.ext.cloudfilter.net ([10.0.30.182]) by cmsmtp with ESMTPS id LiVoraE5EoMN9Lol0rWYjO; Fri, 05 Jan 2024 18:17:22 +0000 Received: from gator4166.hostgator.com ([108.167.133.22]) by cmsmtp with ESMTPS id Lol0rvHBaYjq0Lol0ryvIx; Fri, 05 Jan 2024 18:17:22 +0000 X-Authority-Analysis: v=2.4 cv=afxyIDkt c=1 sm=1 tr=0 ts=659847b2 a=1YbLdUo/zbTtOZ3uB5T3HA==:117 a=GfQleyYEO+cc22AUyTT7qQ==:17 a=OWjo9vPv0XrRhIrVQ50Ab3nP57M=:19 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10 a=dEuoMetlWLkA:10 a=wYkD_t78qR0A:10 a=NEAV23lmAAAA:8 a=7YfXLusrAAAA:8 a=VwQbUJbxAAAA:8 a=_MUxwH_1hrhzMBYmUHsA:9 a=QEXdDO2ut3YA:10 a=SLz71HocmBbuEhFRYD3r:22 a=AjGcO6oz07-iQ99wixmX:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=embeddedor.com; s=default; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9I/V4bfaoYSOxFfnj8JFSrOi1wVdUSbRrkSkeRTBjnw=; b=rB3BJ+l/ZQSDA8Sk9VwkRFJRzb aL/dkDOCl3UtoelOYMsMkSTz99aqaeRy4nLtWrM967qj/lud31V+W0CNMQcpbqcxd3OjM4JCzGIMq fQnNAQrjqhqKYBclf9DkyzGkeY17MLkN2/9QpteCRMFmJ9OjyOY/tvO3VpVpz2XoAuYBdsjsgtUkm mSDw8GtnSYpKWV7ojECsJ/Th3BboRCRtjDJ5Q4S6UpuSHpd5L3ejHbCGE5XNMW2nihes1DfEatELx BufUr+kuV9tpeayqKRX9rqOkuQ5OZnWGhpB9lr7OIvmZnwjXhC4/Fwqb6yp1E5dWFE/XmGOhi+Yav ItP2PGzw==; Received: from 187.184.157.186.cable.dyn.cableonline.com.mx ([187.184.157.186]:13689 helo=[192.168.0.10]) by gator4166.hostgator.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96.2) (envelope-from ) id 1rLokz-003FGW-0q; Fri, 05 Jan 2024 12:17:21 -0600 Message-ID: Date: Fri, 5 Jan 2024 12:17:18 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] PM / QOS: Use kcalloc() instead of kzalloc() Content-Language: en-US To: Erick Archer , "Rafael J. Wysocki" , Len Brown , Pavel Machek , Greg Kroah-Hartman , "Gustavo A. R. Silva" Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org References: <20240105181118.116292-1-erick.archer@gmx.com> From: "Gustavo A. R. Silva" In-Reply-To: <20240105181118.116292-1-erick.archer@gmx.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 187.184.157.186 X-Source-L: No X-Exim-ID: 1rLokz-003FGW-0q X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 187.184.157.186.cable.dyn.cableonline.com.mx ([192.168.0.10]) [187.184.157.186]:13689 X-Source-Auth: gustavo@embeddedor.com X-Email-Count: 2 X-Org: HG=hgshared;ORG=hostgator; X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfEiLZx33Rt1Syp6VmH803vmRGh+0k9vrpP7y+6a1S5cZpy+GIE6odviAyTwfFXQFsdmW/rhpK9oqlFUw5A/6YGae1A6Qf2moYMiTg1wOImSV6PKokKNv k/Ma1UkGKUloCwWkIqLEAO19yNvLmtjEpQH/B7lPpts33Gxo3Hg5bisf91UFa1JAPcrdKGoytfsCp643l+b7D/8U0QnUSf0tvFFIQyFLWLOVY6j32oelcJ/7 On 1/5/24 12:11, Erick Archer wrote: > Use 2-factor multiplication argument form kcalloc() instead > of kzalloc(). > > Link: https://github.com/KSPP/linux/issues/162 > Signed-off-by: Erick Archer Reviewed-by: Gustavo A. R. Silva Thanks! -- Gustavo > --- > drivers/base/power/qos.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/base/power/qos.c b/drivers/base/power/qos.c > index 8e93167f1783..bd77f6734f14 100644 > --- a/drivers/base/power/qos.c > +++ b/drivers/base/power/qos.c > @@ -201,7 +201,7 @@ static int dev_pm_qos_constraints_allocate(struct device *dev) > if (!qos) > return -ENOMEM; > > - n = kzalloc(3 * sizeof(*n), GFP_KERNEL); > + n = kcalloc(3, sizeof(*n), GFP_KERNEL); > if (!n) { > kfree(qos); > return -ENOMEM; > -- > 2.42.0 > >