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

Re: [Xen-devel] Coding style



Hello,

Please avoid top-posting.

On Thu, 27 Apr 2017, 21:33 Goel, Sameer, <sgoel@xxxxxxxxxxxxxx> wrote:
The changes at this point are similar in spirit to SMMUv2, with additions for ACPI parsing. I have not #def'd the platform_get functions or the dma allocation functions, prints et al. I have deleted out unneeded functions instead of wrapping them in if 0 based on some internal review.

I would not recommend to drop them. We decided to use #if 0 on the SMMUv2 driver because it makes easier to port patches.

Similarly any Xen changes in Linux code have a comment on top.

Lastly we first introduced a patch with a verbatim copy of Linux drivers. Then add Xen changes on top.

Cheers,


Your response helps. I can try to keep the code as similar to the upstream driver as possible. So, I will follow the origin file coding standard.
Thanks,
Sameer

On 4/27/2017 12:45 PM, Julien Grall wrote:
> Hello,
>
> On Thu, 27 Apr 2017, 20:12 Goel, Sameer, <sgoel@xxxxxxxxxxxxxx <mailto:sgoel@xxxxxxxxxxxxxx>> wrote:
>
>     I am trying to port a Linux driver to Xen. After making the changes it seems that there are enough changes to say that this driver is different enough as compared to the original file. But it still has code from the original author that is used as is.
>
>     Based on the CODING_STYLE document I was following the Linux coding style for this file. Since, the file looks a lot different, I am wondering if I should convert this to Xen coding style?
>
>
> My concern is if we diverge too much from Linux we will increase the maintainance cost.
>
> It will be very difficult to backport patch and we would not benefit from Linux testing.
>
> I did this mistake with SMMU v2 and I had to rewrite everything 6 months later.
>
> So before giving any answer here, I'd like to understand what changes you had to make.
>
> Cheers,
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxx
> https://lists.xen.org/xen-devel
>

--
 Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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