[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/2] fdt: make fdt handling reusable across arch


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 8 Aug 2023 17:01:18 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1691528482; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=GCt+oDOouAj+Db+dnF97vVixLfO0dNuLruGV9RVi4O0=; b=V7YprwBu/R62Cf3aVCRW/KeZEEl8pKG+6HyANiviIZiP4wEMUd4WHvpiT2zaAOuCdJEM1pA2pOwr53L06z4r8WbGE6Mc77HcmLnuy5ZH+yf6Ky7pICxMFqpTGCjVXtQXxUuvytZeLIzeCiNbTSnZxuDQlNeMZ6bSRbx1WWL28jQ=
  • Arc-seal: i=1; a=rsa-sha256; t=1691528482; cv=none; d=zohomail.com; s=zohoarc; b=oDxGIUnDD2zuyfOt4Zo4f8PqvknzjOvSA5/MM5Y214JiN3//6QyOP9jR6KvaXm2VOMdb4tMUSAN4xXRF6tU4gvPHrsj8KedgKxDKntlTKA0ERyCl31mxReT/XcpTB9z8459f9kaOkdMO29uKIGexncUcqqB1AkWsCx7iy38AoH0=
  • Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Delivery-date: Tue, 08 Aug 2023 21:01:36 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>



On 8/3/23 16:37, Luca Fancellu wrote:


Regarding the coding style, I think it’s better to keep the style you’ve found 
in the original file,
and change only some bits when the code is not following it.
I know there is nothing enforcing parameters on the same line of the function 
definition at the
moment, but it is how it’s done from the original file so I would stick with it.
Regarding the u32/u64 types, maybe since you are moving the code it can be the 
occasion to
convert them, but check with the maintainer before.

I can leave the main code as is, but I do think header decl's should be styled 
correctly as there is no need to have them churn in the future over purely 
style changes.

Uhm, when you say “styled correctly” do you mean as below?

I am retracting that after going back to review my notes, see below.

+bool __init device_tree_node_matches(
+    const void *fdt, int node, const char *match)
+{


If that’s the case, it seems to me that there is nothing like that in the 
codebase,
in my work with clang-format I’ve configured it to match as much as I can the
Xen style and this function would be formatted as the old style that it had.

Can I ask you where did you find instruction to style in that way?


I went back to my old notes on styling to make sure I was correct. Turns out I was incorrect and do apologies. There are two accepted styles for function declarations[1] and the one I used in this patch was the one that I got a recommendation to use. I have gotten so use to that style, that I must have lost track the other was valid. As was pointed out elsewhere, I should use the form that the maintainer desires. As XSM maintainer, I use the one I submitted here and would ask for a style correct if someone submitted a patch using the form that is desired here.

I will roll back the declaration styling for now and per the prior guidance[1], I will flip the linux-compat int over C spec fixed width int notation, unless there is objection to it happening during the move.

[1] https://lists.xenproject.org/archives/html/xen-devel/2021-07/msg01133.html

v/r
dps



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.