From patchwork Mon Dec 23 16:28:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ethan Carter Edwards X-Patchwork-Id: 13919166 Received: from mail-10625.protonmail.ch (mail-10625.protonmail.ch [79.135.106.25]) (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 CF1B71B6D01 for ; Mon, 23 Dec 2024 16:28:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.25 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734971298; cv=none; b=Fw/VAuZtZXKebZn3Zt7gLwGHP47qV5kGC2cvwL+qknyM/DJID/EW1hjhI2Rssq+8pNPwCd/bWe1qtXrourbg/zLNOXwxEbBqX3uAUan0Ts3MV6eWKwT1Lok1BvxES+xGGnD23jJ790klzI+eo+8x4Ki44Tg4foa+BpMCkZYxTG0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734971298; c=relaxed/simple; bh=YwniGKnAg4EDmwYBiUYaoSDvo6SUYsXGJQgDPG4yMSE=; h=Date:To:From:Cc:Subject:Message-ID:MIME-Version:Content-Type; b=rJGHzULVpFHvTY8t3GcuD7DqtWwWSRx/1JfOHG1VkNtScQu/WPK/rq4hL93AuX6UdD9ZaO8KRh+HyJn1C2Go77HZpw5NXtakZLReAfpiH5YoHIW7LPdF6g9yIJV4cqB4haIzJ0dEmEc/6pgow+eweZ3qHKzkcK5Wj6aph7tRHs8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ethancedwards.com; spf=pass smtp.mailfrom=ethancedwards.com; dkim=pass (2048-bit key) header.d=ethancedwards.com header.i=@ethancedwards.com header.b=dKhJz62U; arc=none smtp.client-ip=79.135.106.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ethancedwards.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ethancedwards.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ethancedwards.com header.i=@ethancedwards.com header.b="dKhJz62U" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ethancedwards.com; s=protonmail3; t=1734971294; x=1735230494; bh=bqyMZPUwM8jdoQ7R6OfI9h6Twr/FyoQIi75Q+q7W9u4=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector: List-Unsubscribe:List-Unsubscribe-Post; b=dKhJz62UltxDlEmpJaPB4/KU5pncU8BXKp64nZSktCoyu/p2SxGL/p6GJpNE+niVM oRTB6rnkEDxmmsmUR26ZKa7rx4G5gMHFNNYG1jmZCQJV1j3uAyYOLrg0nnXiVGQbDg uBrJVPK+TDnUpBmeW+AZK6tB0Q1bmA+R35d0U1jSf6EJlRN6MyUbjlWv2Mn8OG11eQ r7eWB6KuwZlt51nk/OU7MIERljnMPVX34wr7tabRX/v0mbScPuoxmLBzDBUcVfzww8 QwNbJIK/88VBZ7bj63gGpgObQkEzDPpHV/+uE+Et5eWYk48xb9xp2xxkBTFj0VLehv 40ntThRWXFv+g== Date: Mon, 23 Dec 2024 16:28:09 +0000 To: "rafael@kernel.org" From: Ethan Carter Edwards Cc: "daniel.lezcano@linaro.org" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "kernel-hardening@lists.openwall.com" , "linux-hardening@vger.kernel.org" Subject: [PATCH v2] thermal/debugfs: change kzalloc to kcalloc Message-ID: Feedback-ID: 28410670:user:proton X-Pm-Message-ID: 7953223c63a835d43bd4e9b315c0fdf4d734ad51 Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Use 2-factor multiplication argument form kcalloc() instead of instead of the deprecated kzalloc() [1]. [1] https://www.kernel.org/doc/html/next/process/deprecated.html#open-coded-arithmetic-in-allocator-arguments Link: https://github.com/KSPP/linux/issues/162 Signed-off-by: Ethan Carter Edwards --- drivers/thermal/thermal_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.47.1 diff --git a/drivers/thermal/thermal_debugfs.c b/drivers/thermal/thermal_debugfs.c index c800504c3cfe..29dc1431a252 100644 --- a/drivers/thermal/thermal_debugfs.c +++ b/drivers/thermal/thermal_debugfs.c @@ -876,7 +876,7 @@ void thermal_debug_tz_add(struct thermal_zone_device *tz) tz_dbg->tz = tz; - tz_dbg->trips_crossed = kzalloc(sizeof(int) * tz->num_trips, GFP_KERNEL); + tz_dbg->trips_crossed = kcalloc(tz->num_trips, sizeof(int), GFP_KERNEL); if (!tz_dbg->trips_crossed) { thermal_debugfs_remove_id(thermal_dbg); return;