Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp20807389ybl; Sun, 5 Jan 2020 11:57:07 -0800 (PST) X-Google-Smtp-Source: APXvYqwFaO903osaYsQYU4CvW22eSTE4PjTGEupvttH6Isxj0lZU3De5YKugNoazjeL0NL5KerXq X-Received: by 2002:a9d:6f0a:: with SMTP id n10mr115248567otq.54.1578254227151; Sun, 05 Jan 2020 11:57:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578254227; cv=none; d=google.com; s=arc-20160816; b=iBYeaPy08MYqqDxKierzfgv3M8hosW0yC7PNbBNEOV8jhYdymqsvGP0MklmZma+pNZ 98B8bu3fMdGtWt2QaBNdNpp7MpZJAlBi5XVUmynppJe2AX6y3vcm4ZEmCCmwSJHOwfG5 BuC4zQbS9xyqzNQTxGRoIvKJRtKMV5KNUAd+vfwA7eJKqLf1KEtMjOt0lEl5ubdwnBE/ 9GoE7VIZ3kIYH8C3v3MAHPrPXws5XnIBSQ06EcvAiu3W40FrRmmeOBYRtXLDZdkBOAMj FnGtHRfbXQApWealS2F7SCMgDCnn1wNw7O94iC0uLSo+dzDwRyBEngzc5d+XAAY5Ubu4 EmjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:user-agent:from:subject :to:cc:references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=vYy4M5/8xbuRkwHcoEJ8LvWfC4FVLFjD8qUsd9KCoQ8=; b=VedWRvy9LuRBVZOVMlAYcmDZcmvNEkF/a/vkMEERk9fy7aX0HoBTZzoYhPFu0OHesL F7WPcxceQM4Y72tdHN9Qiod6NiyL0C9IvEwRIfVFvtmCNJRiYORlSZMXxi3n2ytNog8D FpPi91e9Eiep3d3uiSITYhlFOUAwfQ/BW1YfrmrzbOiKek2ZsAR4XfoW2SO3WclO/bW/ mdt+CRvHgsYpRISc/BbR3bc/YaX0+QiR94Ws+Eo+4rfdo9QlYALX9iq7HnWfLvlIkZyX 5EExY1kfxcXYocN04MZLbXq+H0PLRrTRWOiQqvzVKDUlPdAHFOCa5B5Hh4rFzyCLquYu L+Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TvaJCIOY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p16si4467300otr.134.2020.01.05.11.56.54; Sun, 05 Jan 2020 11:57:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=TvaJCIOY; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726697AbgAET4M (ORCPT + 99 others); Sun, 5 Jan 2020 14:56:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:42604 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726092AbgAET4L (ORCPT ); Sun, 5 Jan 2020 14:56:11 -0500 Received: from kernel.org (unknown [104.132.0.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8F17320678; Sun, 5 Jan 2020 19:56:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578254170; bh=7t14hCA0XP+MmY5EzlL7gorT0FZ/Fb5lWXrgUegaoiw=; h=In-Reply-To:References:Cc:To:Subject:From:Date:From; b=TvaJCIOY2xoO4b9U18aVip2O69DWnnW/lVnrj/tYcqMV/Q6fLIYHE6aZu1m35h8a7 sjNEnFg2OGJZ3337lOgONBWYb44lfYcezHBW1mQuuBLhhBFz8ebCFs/wy4ncp1tRw4 DsYZ5vY3+Uaebud2bgeFcjRCXmCSe0HJF7sEQsOQ= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <4b69f5ba64b68b388ab1e1a0c5896536b063da74.1574922435.git.shubhrajyoti.datta@xilinx.com> References: <4b69f5ba64b68b388ab1e1a0c5896536b063da74.1574922435.git.shubhrajyoti.datta@xilinx.com> Cc: gregkh@linuxfoundation.org, mturquette@baylibre.com, robh+dt@kernel.org, mark.rutland@arm.com, shubhrajyoti.datta@gmail.com, devicetree@vger.kernel.org, soren.brinkmann@xilinx.com, Shubhrajyoti Datta To: devel@driverdev.osuosl.org, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, shubhrajyoti.datta@gmail.com Subject: Re: [PATCH v3 06/10] clk: clock-wizard: Remove the hardcoding of the clock outputs From: Stephen Boyd User-Agent: alot/0.8.1 Date: Sun, 05 Jan 2020 11:56:09 -0800 Message-Id: <20200105195610.8F17320678@mail.kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting shubhrajyoti.datta@gmail.com (2019-11-27 22:36:13) > diff --git a/drivers/clk/clk-xlnx-clock-wizard.c b/drivers/clk/clk-xlnx-c= lock-wizard.c > index bc0354a..4c6155b 100644 > --- a/drivers/clk/clk-xlnx-clock-wizard.c > +++ b/drivers/clk/clk-xlnx-clock-wizard.c > @@ -493,6 +493,7 @@ static int clk_wzrd_probe(struct platform_device *pde= v) > const char *clk_name; > struct clk_wzrd *clk_wzrd; > struct resource *mem; > + int outputs; > struct device_node *np =3D pdev->dev.of_node; > =20 > clk_wzrd =3D devm_kzalloc(&pdev->dev, sizeof(*clk_wzrd), GFP_KERN= EL); > @@ -583,7 +584,7 @@ static int clk_wzrd_probe(struct platform_device *pde= v) > } > =20 > /* register div per output */ > - for (i =3D WZRD_NUM_OUTPUTS - 1; i >=3D 0 ; i--) { > + for (i =3D outputs - 1; i >=3D 0 ; i--) { Where is 'outputs' assigned in this patch? > const char *clkout_name; > =20 > if (of_property_read_string_index(np, "clock-output-names= ", i, > @@ -614,7 +615,7 @@ static int clk_wzrd_probe(struct platform_device *pde= v) > if (IS_ERR(clk_wzrd->clkout[i])) { > int j; > =20 > - for (j =3D i + 1; j < WZRD_NUM_OUTPUTS; j++) > + for (j =3D i + 1; j < outputs; j++) > clk_unregister(clk_wzrd->clkout[j]); > dev_err(&pdev->dev, > "unable to register divider clock\n");