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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 6C155C433DB for ; Mon, 4 Jan 2021 14:22:36 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 180CE20784 for ; Mon, 4 Jan 2021 14:22:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 180CE20784 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+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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=55DVMLi3M/ccrX6oB6LciSsjxLFZ3SNSTRMBvMllPfo=; b=aQt/hD1syUJAZu/qAxb0qkO1Q GGaQ0ofXNRoe0TDBXEAMDBCvBWubKzEFXZ+UEDTXpCC5OJqS+QeEil4WJRKeStPP4r0ftWGFOBRsy sleyTfq4gZGQUDY9eLF9ERITwB+YMV0q9LWuZFm86y00twW/XeO+JeD3XHlELcOuTZEbgQOdQwqSY HyEj+NjAbDAPEB6ghpGZT/UJjAySPRr/Z03yb0OGnOhrnDsB8DALCAPNLUFUeGlWT08G/gpKwoBHq Ck0qiqSMO/G0cwiH73Zomaangg3aURKtZk+r/e6hvaF/1Lo+E4D+zqOvL+IcfEEGeXlD+OzZ4i4HZ x/GsCRNqQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwQjV-0003Jo-Mi; Mon, 04 Jan 2021 14:21:17 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kwQjR-0003FW-Ra for linux-arm-kernel@lists.infradead.org; Mon, 04 Jan 2021 14:21:14 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 67E7921D93; Mon, 4 Jan 2021 14:21:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1609770073; bh=tgnQRJ6U7DDuRuCcWIJ9ljcKBZPad6QeFd5MTeyUFv4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=g1vQqJz4Cph+uXxCZ6BfMNn9AsBHzpWSHFepcf1aX4SPozzVl+HbcmhehCqBj8pbX WpzLcIbVbISKbkVzK0gC5osFLRB8LFQTt9OJ9lP3tTCjvb9Isk76/4VzAv5w1EujH4 Vj4H6A7YPToy3t3nwq+OqDPqzt8Yn6ZCbR2oqF0YHqZaMcDsnMy18gHaOlTUmwJsbK 2+r0YjKFfXJm6W3LVDJcl5L0xNYrgZteumuGYw0ZV6eyQmYYuUXRoT/t7/zUJpesOT MRCQgXwOFu9VeUNp6nrNw94NwUuxJKUEUsA+sbMIVrZQRRJ++zt2leQa+KX6aZyfi+ dYUADGE6WsWyg== Date: Mon, 4 Jan 2021 16:20:57 +0200 From: Leon Romanovsky To: Steen Hegelund Subject: Re: [PATCH v11 3/4] phy: Add Sparx5 ethernet serdes PHY driver Message-ID: <20210104142057.GL31158@unreal> References: <20210104082218.1389450-1-steen.hegelund@microchip.com> <20210104082218.1389450-4-steen.hegelund@microchip.com> <20210104121502.GK31158@unreal> <5e5332e026af5d3716cf9bb0aa404783b53f9e02.camel@microchip.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <5e5332e026af5d3716cf9bb0aa404783b53f9e02.camel@microchip.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210104_092114_040165_47E7B5D6 X-CRM114-Status: GOOD ( 15.96 ) 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: Bjarni Jonasson , Alexandre Belloni , Andrew Lunn , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Kishon Vijay Abraham I , Vinod Koul , linux-arm-kernel@lists.infradead.org, Microchip UNG Driver List , Lars Povlsen Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jan 04, 2021 at 02:16:38PM +0100, Steen Hegelund wrote: > Hi Leon, > > > On Mon, 2021-01-04 at 14:15 +0200, Leon Romanovsky wrote: > > > > <...> > > > > > +struct sparx5_sd10g28_args { > > > +=A0=A0=A0=A0 bool=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 sk= ip_cmu_cfg; /* Enable/disable CMU cfg > > > */ > > > +=A0=A0=A0=A0 bool=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 no= _pwrcycle;=A0 /* Omit initial power- > > > cycle */ > > > +=A0=A0=A0=A0 bool=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 tx= invert;=A0=A0=A0=A0 /* Enable inversion of > > > output data */ > > > +=A0=A0=A0=A0 bool=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 rx= invert;=A0=A0=A0=A0 /* Enable inversion of > > > input data */ > > > +=A0=A0=A0=A0 bool=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 tx= margin;=A0=A0=A0=A0 /* Set output level to=A0 > > > half/full */ > > > +=A0=A0=A0=A0 u16=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = txswing;=A0=A0=A0=A0=A0 /* Set output level */ > > > +=A0=A0=A0=A0 bool=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 mu= te;=A0=A0=A0=A0=A0=A0=A0=A0 /* Mute Output Buffer */ > > > +=A0=A0=A0=A0 bool=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 is= _6g; > > > +=A0=A0=A0=A0 bool=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 re= g_rst; > > > +}; > > > > All those bools in structs can be squeezed into one u8, just use > > bitfields, e.g. "u8 a:1;". > > Got you. > > > > > Also I strongly advise do not do vertical alignment, it will cause to > > too many churn later when this code will be updated. > > So just a single space between the type and the name and the comment is > preferable? Yes, use clang formatter over your code, it will change everything to be aligned to kernel coding style. https://linuxplumbersconf.org/event/7/contributions/803/ > > > > > > + > > > > <...> > > > > > +static inline void __iomem *sdx5_addr(void __iomem *base[], > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int id, int tinst, int tcnt, > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int gbase, int ginst, > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int gcnt, int gwidth, > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int raddr, int rinst, > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 int rcnt, int rwidth) > > > +{ > > > +#if defined(CONFIG_DEBUG_KERNEL) > > > +=A0=A0=A0=A0 WARN_ON((tinst) >=3D tcnt); > > > +=A0=A0=A0=A0 WARN_ON((ginst) >=3D gcnt); > > > +=A0=A0=A0=A0 WARN_ON((rinst) >=3D rcnt); > > > +#endif > > > > Please don't put "#if defined(CONFIG_DEBUG_KERNEL)", print WARN_ON(). > > OK, I will drop the #if and keep the WARN_ON... Thanks _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel