Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp529778ybh; Tue, 21 Jul 2020 01:08:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+nSnSYxonote6nseWpFci5KNipEPWPmDW1L5+WWoD5+7ieZc+G9IBvNx+qcvC/rQsmaZP X-Received: by 2002:a17:907:376:: with SMTP id rs22mr25721716ejb.47.1595318919518; Tue, 21 Jul 2020 01:08:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595318919; cv=none; d=google.com; s=arc-20160816; b=NWeJN2iF1cEFR2IgJh9AtsVmxIVGwDUne6/URiYZZpn5IbjUwk4F6CXQMr9q92OZAj tyiFLHY0/CHo0unEe1QA8H69efj+s0M9Vi/Tcn+8LTd8Mz0Pq6Gy2Cz2lwUaivxJaOcd Txv86ynlOSu4XLETCdv7HxQUPEidC0ZVVpg6pgFs464ZVCMJlitqcoZY7HbWjyl6X/1d tqlCaCLllN6IER4RaZhwNqOwNTSlmYtqvITc0Ix7rGHtBZTUW/2EGoPQCT0BmIyXaisl 9QhjXJUzeMB2hwJzQC4/6DcDzvcWixWUux/O1AIcbYNkSdXHptT34cqApOuxtpQ85NoH ecWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:date:to:cc:from :subject:references:in-reply-to:content-transfer-encoding :mime-version:dkim-signature; bh=2azFOSlxIfv9BOo5ove48JwPE7ajWXlX6bYCA/LsFl4=; b=BV2aGThHWqqx7FwFk43JC5YfqKgLBjJg7KwEVYu8GYGmiwRJks0qyK0uwXBpD00MVK xweB6YbxwxzCZxXeyJSNFEEFu9m1mR5esX+W91JTz4iHkzCQxxnFv7997EJuN/yspLA6 326l1sFKLC1lugxScSw0C3ioNFwojtzws0jS6chILegkQxn6Anzc9M3g9WXR2fHqIZng gCDBO4E6CHzeG5WYe09dY3L82J19UpljvuYaArqX/I0dPF8UIwiL3mY4cuKMDRccxDK7 V0sgTFXWu9/4+7V6gglEVF5DNkPVh3SNRiBEBB1onDrMFUVkajJeC/VaToK7ZOn8ZMSe K4lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gyX8m0JF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id om22si11920957ejb.117.2020.07.21.01.08.17; Tue, 21 Jul 2020 01:08:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gyX8m0JF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728410AbgGUIFv (ORCPT + 99 others); Tue, 21 Jul 2020 04:05:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:38996 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726803AbgGUIFv (ORCPT ); Tue, 21 Jul 2020 04:05:51 -0400 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 AA4412080D; Tue, 21 Jul 2020 08:05:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595318750; bh=rDrP2X+jctT9/2IFGc57irZg4LC7++9ZmtdWwTjZFJI=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=gyX8m0JFqonaoBjIPJHKbjSzHj9ZpYOfX2o1OQQHma007mtt6L0I76MHwJDBtaX0J HxfgDniIcDnrfdY2jZdWOh9EIjcLQiCI+beSAJ1P8RGfjoahi8ot4A80hnVPXy6yJZ SNg/vAvwB6FJfCFhsRBTYVeAfKeoPH+1q0LWx9YU= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20200720050500.23357-5-akshu.agrawal@amd.com> References: <20200720050500.23357-1-akshu.agrawal@amd.com> <20200720050500.23357-5-akshu.agrawal@amd.com> Subject: Re: [v2 4/4] clk: x86: Support RV architecture From: Stephen Boyd Cc: Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org To: akshu.agrawal@amd.com Date: Tue, 21 Jul 2020 01:05:49 -0700 Message-ID: <159531874995.3847286.4010361856630371541@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Akshu Agrawal (2020-07-19 22:04:59) > diff --git a/drivers/clk/x86/clk-fch.c b/drivers/clk/x86/clk-fch.c > index b252f0cf0628..d68bca7b213f 100644 > --- a/drivers/clk/x86/clk-fch.c > +++ b/drivers/clk/x86/clk-fch.c [...] > =20 > static int fch_clk_remove(struct platform_device *pdev) > { > - int i; > + int i, clks; > + struct fch_clk_data *fch_data; > =20 > - for (i =3D 0; i < ST_MAX_CLKS; i++) > + fch_data =3D dev_get_platdata(&pdev->dev); > + > + clks =3D (!fch_data->is_rv) ? ST_MAX_CLKS : RV_MAX_CLKS; Useless parenthesis and negation, just write: num =3D fch_data->is_rv ? RV_MAX_CLKS : ST_MAX_CLKS; > + > + for (i =3D 0; i < clks; i++) > clk_hw_unregister(hws[i]); > + > return 0; > } >