Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934344AbdDGTpP (ORCPT ); Fri, 7 Apr 2017 15:45:15 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:38772 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752848AbdDGTpH (ORCPT ); Fri, 7 Apr 2017 15:45:07 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org E9F9060D6E Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sboyd@codeaurora.org Date: Fri, 7 Apr 2017 12:45:06 -0700 From: Stephen Boyd To: Peter De Schrijver Cc: Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] clk: add clk_possible_parents debugfs file Message-ID: <20170407194506.GF7065@codeaurora.org> References: <1490102432-21314-1-git-send-email-pdeschrijver@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1490102432-21314-1-git-send-email-pdeschrijver@nvidia.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1071 Lines: 44 On 03/21, Peter De Schrijver wrote: > diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > index f5f2bcd..2fa2fb8 100644 > --- a/drivers/clk/clk.c > +++ b/drivers/clk/clk.c > @@ -2128,6 +2128,34 @@ static int clk_dump_open(struct inode *inode, struct file *file) > .release = single_release, > }; > > +static int possible_parents_dump(struct seq_file *s, void *data) > +{ > + struct clk_core *core; > + int i; > + > + core = (struct clk_core *)s->private; Useless cast from void. > + > + for (i = 0; i < core->num_parents - 1; i++) > + seq_printf(s, "%s ", core->parent_names[i]); I hope we don't have spaces in clk names! I don't think we do. > + > + seq_printf(s, "%s\n", core->parent_names[i]); > + > + return 0; > +} > + > +static int possible_parents_open(struct inode *inode, struct file *file) > +{ > + return single_open(file, possible_parents_dump, inode->i_private); > +} > + > + Double newline. I fixed both when applying to clk-next. -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project