Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1537697rwi; Thu, 27 Oct 2022 17:39:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4G1WVXkTdpiHsGEilwSykAWvmXTzKoV4OSD2voSHIuWVHN63uUV1D9UMaQYm98qOf7vaKR X-Received: by 2002:a63:1e0f:0:b0:44b:796c:bc14 with SMTP id e15-20020a631e0f000000b0044b796cbc14mr43171386pge.563.1666917584823; Thu, 27 Oct 2022 17:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666917584; cv=none; d=google.com; s=arc-20160816; b=xQdNt5AwDdNzeG+IjjXvQIZzweKVtWr+dXn3rXGif2cxwtgGB2oZS1+mkp5vDFv+AZ 7RDGlA4z7EO7pDRZmU8ZvkkBsFra4JQCdlnt1XtXfKITmSXJkcnwEgeyNUcxKahAbFYG TIqp93I2YbIB6OvDDVjbtvVfvA2QHcMpqfbAjJfm/Phm8cAnFXVRDrSpNzwBNLwv6pTv xSH+sSP+YcwNSJ9cXCHJz8nTVA7NiTdrcXPY1ibb+1z1jqTHQToseoIn4AP2ukwGsfX6 MPklbeuJsx2PH3oZvwGouRasInspUhcE294GO56sCBrurp897NNTpSr5w/DZlyKpRbBg jLvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=MHm+7dR2uZ38dyPp0iBE7UnDXhD3JmYOAQ78Sor0JCo=; b=FPvS4qS07b+Gwgx/TjokwLwTWmRA5XFVSRv5KX4BE6ks9uKFxZstJpOS4Rzi3H85ko wFLt9507YHx8huZ2QmogNXuDCnuoB9DNlDleYmGPXOo3+q9EdG2AArHwDvIJqze5LGfk hxF4TiEYmMfVn4rkpfWPTHCl431W1msU67y4neGQ14LYXgIetJbIiffrS1UkShiQCkNu ZMp5BPuYziaTeP1qWyUEZNKUNo9m2PLHrOmOoCl5cSBjaaE4zLsmZDnjCcTookGFLx90 NwvJYCkMUHPfhMmAu0swA87NvaYeVQwH9LlhTm/ox5tWR1ud9Jp4EycepVPL2ORba5Du 0etQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gvEH3r80; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q15-20020a17090311cf00b00176b7e66c9asi3848536plh.155.2022.10.27.17.39.32; Thu, 27 Oct 2022 17:39:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gvEH3r80; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234864AbiJ1A1P (ORCPT + 99 others); Thu, 27 Oct 2022 20:27:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229998AbiJ1A1N (ORCPT ); Thu, 27 Oct 2022 20:27:13 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 383A198C96; Thu, 27 Oct 2022 17:27:13 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E6285B82712; Fri, 28 Oct 2022 00:27:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 89A81C43470; Fri, 28 Oct 2022 00:27:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666916830; bh=ar2vAUeJp1Fss0BY6YHlg7m1SFzX7KDPJuR8DDTS1Pw=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=gvEH3r80quhFTCgGtDp6SZsI4k7FrSXzRy0dSujUUpq1JAOjEgAbE6rTq2t969c8E ZyCoO3BgUIfu/hP9JmW/5d5ptATjoHcAgKn+zuAdyEEWgbSeYqdsZvsW3Ip/OqbDCm Ju4LMPz7t/aVo8hVLaMztaKUZII4Q8WXY4a/lqBUBAVWs/WN+yb9EfIssq5V+xXilg UbBKm1dDzEAApR5QDh7L+sevwZ/8qFJOHzS8muBD5PaZmOL1EDrd8dw66JiVGywwBg EHAKjnh4rGkBj9d0yjczw9xeCOmaYTC0ZCP+klt7lN/Z1anhZvJz+PbHQuv4+B9W5T T3JZAw3XOpzgQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20221018160352.1591428-1-dario.binacchi@amarulasolutions.com> References: <20221018160352.1591428-1-dario.binacchi@amarulasolutions.com> Subject: Re: [PATCH v2] clk: ti: dra7-atl: don't allocate `parent_names' variable From: Stephen Boyd Cc: Amarula patchwork , michael@amarulasolutions.com, Dario Binacchi , kernel test robot , Allison Randal , Miaoqian Lin , Michael Turquette , Tero Kristo , Thomas Gleixner , Tony Lindgren , linux-clk@vger.kernel.org, linux-omap@vger.kernel.org To: Dario Binacchi , linux-kernel@vger.kernel.org Date: Thu, 27 Oct 2022 17:27:08 -0700 User-Agent: alot/0.10 Message-Id: <20221028002710.89A81C43470@smtp.kernel.org> X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Quoting Dario Binacchi (2022-10-18 09:03:52) > diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c > index ff4d6a951681..78482d1a4a33 100644 > --- a/drivers/clk/ti/clk-dra7-atl.c > +++ b/drivers/clk/ti/clk-dra7-atl.c > @@ -188,24 +188,17 @@ static void __init of_dra7_atl_clock_setup(struct d= evice_node *node) > goto cleanup; > } > =20 > - parent_names =3D kzalloc(sizeof(char *), GFP_KERNEL); > - > - if (!parent_names) > - goto cleanup; > - > parent_names[0] =3D of_clk_get_parent_name(node, 0); Can you use struct clk_parent_data instead and assign index to 0? Then we don't even need to use of_clk_get_parent_name() here.