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

Re: [PATCH v2 5/8] xen/ppc: Define minimal stub headers required for full build


  • To: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 1 Sep 2023 08:41:43 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9l312x2LMU0e88AsqYXEC7ucHbsAli9ncOp8TEE6QTc=; b=kxx1CXbXWxEODNk4/7zaM76eKoeujskmu9o65cA0R+CjLN9dAMiWCoMdw4wtFvJFG8JSZw3yYA5goIp9x1GAmTrwc+33n/JnJ4VaJCMuUTtOE8HOhoDF8+Pv+pVpqDtea0VQcvtE/XYYv2X+PezCLYiH5p3DwXlbmqQ7LgTe/7I/C7g9bWnU8T/cjlVw3RVg7J/zXwOovA6ZYs4h9tKC0c7CXAQDBA3eO/mxOGpjUZufXO2tAkRR12jZEgo9pZpbPOZcRz/4eJsz6qRsaW7J0OZIDS5hEM+ziTvkWd+xefzfu5K8jdNCuLnf9sXGEYKld9+grmThVXOmg/OJpTl1iQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aPAqlZoygv9sLeuRCFof5iwScnzraOzfGelq663H2A8M2awRJ4I2YKE6EZ3sfSScUTG03eMNmpoHoUT2ecney+kkO6jc+8nTBdr8CfKPZwP6gCAX1/YZO7GNKmw1sDfCisqT4OlEv+T0LGOk6zSkB8l+vHkv9Z20pO2sL6zgkav05ehJWdgk4jt1ewU+z8PcrqS+s/7v0j1t02W4mshpJZH8Kkyi2ZxfIwRpgfAAHT3hNuGReKCrxBF5mxuVnKPi5fhLbPK1svnkofyLyKxfj4PINpXtc3zOllMZIYKWmf4xgdjCFMbJDW2HfC3dh7HBU4qGWa91pVDFnf4xpx/gBw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Timothy Pearson <tpearson@xxxxxxxxxxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 01 Sep 2023 06:41:58 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 01.09.2023 00:22, Shawn Anastasio wrote:
> On 8/30/23 5:49 AM, Jan Beulich wrote:
>> On 23.08.2023 22:07, Shawn Anastasio wrote:
>>> --- /dev/null
>>> +++ b/xen/arch/ppc/include/asm/div64.h
>>> @@ -0,0 +1,14 @@
>>> +#ifndef __ASM_PPC_DIV64_H__
>>> +#define __ASM_PPC_DIV64_H__
>>> +
>>> +#include <xen/types.h>
>>> +
>>> +#define do_div(n,base) ({                       \
>>> +    uint32_t __base = (base);                   \
>>> +    uint32_t __rem;                             \
>>> +    __rem = ((uint64_t)(n)) % __base;           \
>>> +    (n) = ((uint64_t)(n)) / __base;             \
>>> +    __rem;                                      \
>>> +})
>>
>> I understand you're merely copying this from elsewhere, but it would be
>> really nice if style could be corrected for such new instances (no
>> leading underscores, blank after comma, and ideally also no excess
>> parentheses).
>>
> 
> I'll fix the leading underscores and missing blank. As for unnecessary
> parenthesis, I'm assuming you mean (base) in the first statement and (n)
> in the second-to-last one, but I'd personally rather leave them.

Quite the other way around, actually:

#define do_div(n, base) ({                       \
    uint32_t base_ = (base);                     \
    uint32_t rem_ = (uint64_t)(n) % base_;       \
    (n) = (uint64_t)(n) / base_;                 \
    rem_;                                        \
})

(with other tidying included right away).

>> I also notice that most new files don't have an SPDX header. Would be
>> nice to fulfill this formal aspect right from the start.
> 
> Since you've commented on some copyright headers in trivial stub files
> before, could you clarify whether you'd want an SPDX header in every
> introduced header, including empty/trivially stubbed ones?

SPDX headers are about license, not copyright. Aiui ideally every source
file would have one.

Jan



 


Rackspace

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