From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9071C27C77 for ; Sun, 16 Jun 2024 08:00:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JLEuhC2updjeyj6C6/H8FM3q6Og+u3grGWIQdKvOyho=; b=0edGy/q8swA6vrkoAZS2iC9BXE KZTOs4evvphg+Eft2GFUCaYlIzmTyoRNzsfxIERtkflg4A11ekOVXxnY+sVwT9ze6ULelfN9r5pmP OARe6M6I1i+I6jgm8w9n7zMdU2YvTgz9MNNLdupTGs0yTy32l6m7FB8VXltMlV39guARFS1t2Jhof JGWb0llhCoMOMeL3kbKR+TBMC3PGgPmaf/T8TKtzxuWMn2LAFSZpHLxddsCPyaBKdsngsDrrtV/HG n5+r5gYPC3UNseR5LInot5c5gibVRj1pJ9WhMk3Oskbn5Hpxh89HuMLCfYptY9z7GAJRbIH+Wt+J3 85BKEOIg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sIkoC-000000075D8-0Sti; Sun, 16 Jun 2024 08:00:16 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sIko8-000000075CI-3W6q; Sun, 16 Jun 2024 08:00:14 +0000 Received: from 79-98-74-242.sys-data.com ([79.98.74.242] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sIko5-0000Vp-S0; Sun, 16 Jun 2024 10:00:09 +0200 From: Heiko Stuebner To: Andy Shevchenko Cc: Sam Protsenko , Krzysztof Kozlowski , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Michael Turquette , Stephen Boyd , Krzysztof Kozlowski , Sylwester Nawrocki , Chanwoo Choi , Alim Akhtar , Nobuhiro Iwamatsu Subject: Re: [PATCH v1 2/4] clk: rockchip: Switch to use kmemdup_array() Date: Sun, 16 Jun 2024 10:00:07 +0200 Message-ID: <6087515.R56niFO833@phil> In-Reply-To: References: <20240606161028.2986587-1-andriy.shevchenko@linux.intel.com> <8182279.JRmrKFJ9eK@diego> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240616_010012_911047_5DD2D8DF X-CRM114-Status: GOOD ( 12.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Am Dienstag, 11. Juni 2024, 15:20:05 CEST schrieb Andy Shevchenko: > On Fri, Jun 07, 2024 at 10:13:04AM +0200, Heiko St=FCbner wrote: > > Am Donnerstag, 6. Juni 2024, 18:09:32 CEST schrieb Andy Shevchenko: >=20 > ... >=20 > > > - cpuclk->rate_table =3D kmemdup(rates, > > > - sizeof(*rates) * nrates, > > > - GFP_KERNEL); > > > + cpuclk->rate_table =3D kmemdup_array(rates, nrates, sizeof(*rates), > > > + GFP_KERNEL); > >=20 > > are you sure the param order is correct? > >=20 > > According to [0], it's (src, element_size, count, gfp), while above > > (and below) element_size and count seems switched in the > > kmemdup_array calls. >=20 > I'm glad you asked. The parameter order is going to be fixed [1]. >=20 > > [0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/= tree/mm/util.c#n149 >=20 > [1]: 0ee14725471c ("mm/util: Swap kmemdup_array() arguments") ah that clears it up :-) Thanks for the pointer Heiko