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

Re: [PATCH v3 2/2] xen/device_tree: remove incorrect and unused dt_irq() and dt_irq_flags() macros


  • To: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Mon, 6 Feb 2023 14:42:50 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=slih/Dexk80MELkkF/r4v8l/LA9gWjYcjwUklT2awqU=; b=QzdzyfRFbgDalF0kZhzbfk2jHZO6cuJ9qZCeYcr2BFi9oTF94cg5eppATIqjpvlqwX3g+KWmN1Jir4RUKOkFC4ivdjnc40KSq46EVLWICHn9qLUpstWdWpaF8HRIROsaGvjdo77DRKqPMMD23BdKl9rbYMPGCFk8gyBtr61DQjb5dZDdT0nyvM41jpJ7WomyFvFlVsnMGZ+g9/J6I4J/o1jSO+NJb5Zxi9eDNgmpV7QMHIMkGx3CjI3krTJLrdOBSa9w3HkIjI0m6xSYYMPdLFOViD7tf/l3TnBdok/n9zZtS1PTEVGdKFzwUof7broAIYKZ+WX2A4nD/e8QGNKiEA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a5/lJLJkRmtoyrtRL5GDd6fZ7ubtAYriZ4uxeLLOXgpXsFPnqYZj0M3s07YMcemeGT1FJso3cI0+r+dEzU43nDy1Deke3xKvJmEOLHDaiVvb38Ld5ux8tz+gYpp9g0lPElCzH8vp/qsW8TJIctvVZW6mMi6khrnUxqFp8r8INokn9MeFg1ZJCHO1ByJc7PuK6dp9uk/RkWqE3T8d4tijhenEP0oqyg0AE8Lq2hjvA7uAq+n6RN+7WK3Dj1MCFS+TMf8Vz1uRQiLWO/wnavsE3WFMQEC1U+JgNVmh3lSXB41iU2rC7rH2HoiK0C+XQAfTsewypqLH/aqBWD8yALfXGQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • Delivery-date: Mon, 06 Feb 2023 14:43:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZOAMXy1ML+LQFIECFNoctrCf/pa7CAoAA
  • Thread-topic: [PATCH v3 2/2] xen/device_tree: remove incorrect and unused dt_irq() and dt_irq_flags() macros


> On 3 Feb 2023, at 19:09, Xenia Ragiadakou <burzalodowa@xxxxxxxxx> wrote:
> 
> Macro dt_irq() is broken because the macro parameter has the same name with
> the struct dt_irq member "irq".

I’m not sure about the wording “broken”, it should work anyway or am I wrong?

> Macro dt_irq_flags() is broken as well because struct dt_irq has no member
> named "flags".

Yes this depends if the macro was meant to access the structure dt_irq, I’ve 
had a look
on the commit introducing it but I could not figure out the usage.

> 
> Since no one seems to have ever tried to use them and eventually stumble upon
> the issues above, remove them instead of fixing them.
> 
> Fixes: 886f34045bf0 ("xen/arm: Add helpers to retrieve an interrupt 
> description from the device tree")
> Signed-off-by: Xenia Ragiadakou <burzalodowa@xxxxxxxxx>
> ---
> 
> Changes in v3:
>  - new patch
> 
> xen/include/xen/device_tree.h | 3 ---
> 1 file changed, 3 deletions(-)
> 
> diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h
> index 7839a199e311..19a74909cece 100644
> --- a/xen/include/xen/device_tree.h
> +++ b/xen/include/xen/device_tree.h
> @@ -159,9 +159,6 @@ struct dt_raw_irq {
>     u32 specifier[DT_MAX_IRQ_SPEC];
> };
> 
> -#define dt_irq(irq) ((irq)->irq)
> -#define dt_irq_flags(irq) ((irq)->flags)
> -
> typedef int (*device_tree_node_func)(const void *fdt,
>                                      int node, const char *name, int depth,
>                                      u32 address_cells, u32 size_cells,
> -- 
> 2.37.2
> 
> 

They seems indeed unused, so for me the code looks good:

Reviewed-by: Luca Fancellu <luca.fancellu@xxxxxxx>



 


Rackspace

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