From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4486CC0650F for ; Thu, 8 Aug 2019 19:46:39 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 14CF52084D for ; Thu, 8 Aug 2019 19:46:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fFI+wLoW"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="DWhUDArU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14CF52084D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:To:From:Subject: References:In-Reply-To:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3K+zFhre+Cc5mLcOaolhoZliySDVaP08bLRu/Xvn+H8=; b=fFI+wLoWs0nyXF LftBaODx1Gs4Uvzk1PBedCYIJsQavS2Ta7n3O2PhbsweIU0plYKl9O9xnyCoNNZ6vyUfLpozR0IOD rAb33CLPwezV5nmG2VlLReVo/9VJIxrMWA7stC18KH1J820hYZl0s6PW5KFMMlcgRwzEtBsZ4clwB pPLAEe+L5inb+OjC6Lnnw8GpezNeHVCbJ8Xp647UkWLJam0cusMl3VD+kmvEO+e/P8PlZlxOoIEdE 85Qt5AIP8lW6hnzaLHWikGHKp8bKxDEM7gXGq8AIIVzSPiTN1cAFafeePQr9SBWSCZWgmEo/kc3FN VTUJDPVJuq8lBN/UY4Pw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hvoMo-0002if-Sr; Thu, 08 Aug 2019 19:46:30 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hvoMl-0002iC-Ly for linux-arm-kernel@lists.infradead.org; Thu, 08 Aug 2019 19:46:29 +0000 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 BEEA02084D; Thu, 8 Aug 2019 19:46:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1565293586; bh=4me4XpvB7qqVvu84vAAL5nGYKbA83wV2yUhPtXDdy2M=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=DWhUDArUOh7Ld3rKR0NbaJJjppzYKgaC0SxZtenmNSc/wyyXMAwseOsG5WlEsxpVo 7toVidYd+5F0b7ctbVsSw9aU2jav2vCfR2qDFNhcTgE53aRYRmuUDqJEERobeD9pWN hHeCXa5I/TuIOWKJNpi6VDgS1ukfTCwfpfujnevU= MIME-Version: 1.0 In-Reply-To: References: <68e96af2df96512300604d797ade2088d7e6e496.1562073871.git.leonard.crestez@nxp.com> <20190808150028.0BC1F217D7@mail.kernel.org> Subject: Re: [PATCH v3 1/2] clk: Add clk_min/max_rate entries in debugfs From: Stephen Boyd To: Geert Uytterhoeven , Leonard Crestez User-Agent: alot/0.8.1 Date: Thu, 08 Aug 2019 12:46:25 -0700 Message-Id: <20190808194626.BEEA02084D@mail.kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190808_124627_741970_A3D00637 X-CRM114-Status: GOOD ( 12.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Turquette , "linux-clk@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Quoting Leonard Crestez (2019-08-08 09:46:48) > On 8/8/2019 6:00 PM, Stephen Boyd wrote: > > Quoting Leonard Crestez (2019-07-02 06:27:09) > >> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c > > >> static void clk_dump_one(struct seq_file *s, struct clk_core *c, int level) > >> { > >> + clk_core_get_boundaries(c, &min_rate, &max_rate); > >> + if (min_rate != 0) > >> + seq_printf(s, "\"min_rate\": %lu,", min_rate); > >> + if (max_rate != ULONG_MAX) > >> + seq_printf(s, "\"max_rate\": %lu,", max_rate); > > > > What are the if conditions about? We always output the values in the > > individual files, but for some reason we don't want to do that in the > > json output? > > These if conditions are an easy way to avoid spamming "min_rate": 0, > "max_rate": 18446744073709551615 in json. If you object to the > inconsistency a nice solution would to be show "null" in both debugfs > and json. Aren't those the min and max values though? I don't see it as spam, it's just more data that is the "default". Given that json is for machine parsing maybe the parser of this can ignore them if it wants to when the values match 0 and ULONG_MAX? _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel