From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752172AbbL1KW6 (ORCPT ); Mon, 28 Dec 2015 05:22:58 -0500 Received: from conuserg009.nifty.com ([202.248.44.35]:46610 "EHLO conuserg009-v.nifty.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751503AbbL1KWy (ORCPT ); Mon, 28 Dec 2015 05:22:54 -0500 X-Nifty-SrcIP: [153.142.97.90] From: Masahiro Yamada To: linux-clk@vger.kernel.org Cc: Masahiro Yamada , Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org Subject: [RESEND PATCH v2 04/16] clk: remove unnecessary !core->parents conditional Date: Mon, 28 Dec 2015 19:22:58 +0900 Message-Id: <1451298191-30815-5-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1451298191-30815-1-git-send-email-yamada.masahiro@socionext.com> References: <1451298191-30815-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This if-block has been here since the introduction of the common clock framework. Now no clock drivers are statically initialized. core->parent is always NULL at this point. Drop the redundant check and the confusing comment. Signed-off-by: Masahiro Yamada --- Changes in v2: None drivers/clk/clk.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 41179f3..30c0bbc 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2348,11 +2348,8 @@ static int __clk_core_init(struct clk_core *core) * in to clk_init during early boot; thus any access to core->parents[] * must always check for a NULL pointer and try to populate it if * necessary. - * - * If core->parents is not NULL we skip this entire block. This allows - * for clock drivers to statically initialize core->parents. */ - if (core->num_parents > 1 && !core->parents) { + if (core->num_parents > 1) { core->parents = kcalloc(core->num_parents, sizeof(struct clk *), GFP_KERNEL); /* -- 1.9.1