[{"id":1764704,"web_url":"http://patchwork.ozlabs.org/comment/1764704/","msgid":"<fb4a28cb-2005-4e9b-8b3d-4d9f4c667c8f@arm.com>","list_archive_url":null,"date":"2017-09-07T12:47:16","subject":"Re: [PATCH v4 1/6] irqdomain: rename variables in\n\tirq_domain_{push,pop}_irq()","submitter":{"id":7353,"url":"http://patchwork.ozlabs.org/api/people/7353/","name":"Marc Zyngier","email":"marc.zyngier@arm.com"},"content":"On 07/09/17 12:41, Masahiro Yamada wrote:\n> The meaning of \"root\" in irq_domain_{push,pop} is opposite to the\n> documentation.  Documentation/IRQ-domain.txt depicts the hierarchy\n> IRQ domain as follows:\n> \n>     CPU Vector irq_domain (root irq_domain to manage CPU vectors)\n>             ^\n>             |\n>     Interrupt Remapping irq_domain (manage irq_remapping entries)\n>             ^\n>             |\n>     IOAPIC irq_domain (manage IOAPIC delivery entries/pins)\n> \n> From above, the inner-most domain (nearest to the CPU) is \"root\".\n> \n> The document also says, \"When building irq_domain hierarchy, the\n> irq_domain near to the device is child and the irq_domain near to\n> CPU is parent.\"  This is how irq_data->parent_data works.  In\n> contrast, these function use a variable \"child_irq_data\" for that.\nThe exact opposite argument could be used for the data structure. The\nirq_desc is the root of the list ordered with parent_data.\n\nYes, this is confusing, but because we're using the same English words\nto describe two different things, we're bound to make one thing more\ndifficult. I'm unconvinced that this change helps anything (it certainly\nconfuses me more than anything else).\n\nThanks,\n\n\tM.","headers":{"Return-Path":"<linux-gpio-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-gpio-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xp0bF5tywz9t2M\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu,  7 Sep 2017 22:47:21 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1755300AbdIGMrU (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 7 Sep 2017 08:47:20 -0400","from foss.arm.com ([217.140.101.70]:59378 \"EHLO foss.arm.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1755282AbdIGMrT (ORCPT <rfc822;linux-gpio@vger.kernel.org>);\n\tThu, 7 Sep 2017 08:47:19 -0400","from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249])\n\tby usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3441A13D5;\n\tThu,  7 Sep 2017 05:47:19 -0700 (PDT)","from [10.1.206.41] (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249])\n\tby usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id\n\t5C3233F578; Thu,  7 Sep 2017 05:47:17 -0700 (PDT)"],"Subject":"Re: [PATCH v4 1/6] irqdomain: rename variables in\n\tirq_domain_{push,pop}_irq()","To":"Masahiro Yamada <yamada.masahiro@socionext.com>,\n\tThomas Gleixner <tglx@linutronix.de>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tlinux-gpio@vger.kernel.org, Rob Herring <robh+dt@kernel.org>","Cc":"Jassi Brar <jaswinder.singh@linaro.org>,\n\tdevicetree@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>,\n\tMasami Hiramatsu <mhiramat@kernel.org>,\n\tDavid Daney <david.daney@cavium.com>, linux-kernel@vger.kernel.org","References":"<1504784522-26841-1-git-send-email-yamada.masahiro@socionext.com>\n\t<1504784522-26841-2-git-send-email-yamada.masahiro@socionext.com>","From":"Marc Zyngier <marc.zyngier@arm.com>","Organization":"ARM Ltd","Message-ID":"<fb4a28cb-2005-4e9b-8b3d-4d9f4c667c8f@arm.com>","Date":"Thu, 7 Sep 2017 13:47:16 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<1504784522-26841-2-git-send-email-yamada.masahiro@socionext.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Sender":"linux-gpio-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-gpio.vger.kernel.org>","X-Mailing-List":"linux-gpio@vger.kernel.org"}},{"id":1764856,"web_url":"http://patchwork.ozlabs.org/comment/1764856/","msgid":"<c9fd0412-6dce-95e9-4ca3-d4d61f9feeca@caviumnetworks.com>","list_archive_url":null,"date":"2017-09-07T17:45:34","subject":"Re: [PATCH v4 1/6] irqdomain: rename variables in\n\tirq_domain_{push,pop}_irq()","submitter":{"id":721,"url":"http://patchwork.ozlabs.org/api/people/721/","name":"David Daney","email":"ddaney@caviumnetworks.com"},"content":"On 09/07/2017 05:47 AM, Marc Zyngier wrote:\n> On 07/09/17 12:41, Masahiro Yamada wrote:\n>> The meaning of \"root\" in irq_domain_{push,pop} is opposite to the\n>> documentation.  Documentation/IRQ-domain.txt depicts the hierarchy\n>> IRQ domain as follows:\n>>\n>>      CPU Vector irq_domain (root irq_domain to manage CPU vectors)\n>>              ^\n>>              |\n>>      Interrupt Remapping irq_domain (manage irq_remapping entries)\n>>              ^\n>>              |\n>>      IOAPIC irq_domain (manage IOAPIC delivery entries/pins)\n>>\n>>  From above, the inner-most domain (nearest to the CPU) is \"root\".\n>>\n>> The document also says, \"When building irq_domain hierarchy, the\n>> irq_domain near to the device is child and the irq_domain near to\n>> CPU is parent.\"  This is how irq_data->parent_data works.  In\n>> contrast, these function use a variable \"child_irq_data\" for that.\n> The exact opposite argument could be used for the data structure. The\n> irq_desc is the root of the list ordered with parent_data.\n> \n> Yes, this is confusing, but because we're using the same English words\n> to describe two different things, we're bound to make one thing more\n> difficult. I'm unconvinced that this change helps anything (it certainly\n> confuses me more than anything else).\n> \n\nThere may be room for improvement here.\n\nHere is my recollection of how I choose the names:\n\n\"root\" is the thing embedded in the struct irq_desc, if you think about \na typical linked list structure like this, we can refer to the starting \npoint as the \"root\".  Sometimes it might be referred to as the \"head\" of \nthe list, but usually not the \"tail\"\n\n\"child\" was used to indicate the thing we get to by traversing the link \nin the list.  The fact that ->parent is the name of the next pointer and \nthat it points to something called \"child\" is confusing here.\n\nSo what do I think should be done?  This:\n\nEither\n   A) s/child_irq_data/parent_irq_data/g  As this patch does, but leave \nthe root_irq_data name unchanged.\n\n   B) Change the name of the ->parent in struct irq_data to ->next\n\nBut that is just my $0.02\n\nI fear we risk a Bike Shedding type of discussion here.\n\n\nDavid Daney\n\n> Thanks,\n> \n> \tM.\n> \n\n--\nTo unsubscribe from this list: send the line \"unsubscribe linux-gpio\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<linux-gpio-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-gpio-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=CAVIUMNETWORKS.onmicrosoft.com\n\theader.i=@CAVIUMNETWORKS.onmicrosoft.com header.b=\"OZwk4XAo\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=David.Daney@cavium.com; "],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xp7CW5bbgz9s83\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  8 Sep 2017 03:45:43 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1754601AbdIGRpm (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tThu, 7 Sep 2017 13:45:42 -0400","from mail-by2nam03on0070.outbound.protection.outlook.com\n\t([104.47.42.70]:28406\n\t\"EHLO NAM03-BY2-obe.outbound.protection.outlook.com\"\n\trhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP\n\tid S1754518AbdIGRpk (ORCPT <rfc822;linux-gpio@vger.kernel.org>);\n\tThu, 7 Sep 2017 13:45:40 -0400","from ddl.caveonetworks.com (50.233.148.156) by\n\tDM5PR07MB3497.namprd07.prod.outlook.com (10.164.153.28) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.20.13.10; Thu, 7 Sep 2017 17:45:36 +0000"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=trnVrxhylgPaVGwjeUKQP4juzn6eHDHN+ReysVHACNA=;\n\tb=OZwk4XAosHu/5QRHjlOpHguPtR1ef5Zr6guUtCyKO4r6XfCktjUKkp5UxJdYaSoSrvmZq1KtFZm6aq3dSMdyGOMosB/032YabLQyDYv7fVjFlR8z0QpypmM2SXqgvnO3ciq5T2b0OQ7Mvok4LxhtXW/VWVlG2V/71FpS8fJ8jyA=","Subject":"Re: [PATCH v4 1/6] irqdomain: rename variables in\n\tirq_domain_{push,pop}_irq()","To":"Marc Zyngier <marc.zyngier@arm.com>,\n\tMasahiro Yamada <yamada.masahiro@socionext.com>,\n\tThomas Gleixner <tglx@linutronix.de>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tlinux-gpio@vger.kernel.org, Rob Herring <robh+dt@kernel.org>","Cc":"Jassi Brar <jaswinder.singh@linaro.org>,\n\tdevicetree@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>,\n\tMasami Hiramatsu <mhiramat@kernel.org>,\n\tDavid Daney <david.daney@cavium.com>, linux-kernel@vger.kernel.org","References":"<1504784522-26841-1-git-send-email-yamada.masahiro@socionext.com>\n\t<1504784522-26841-2-git-send-email-yamada.masahiro@socionext.com>\n\t<fb4a28cb-2005-4e9b-8b3d-4d9f4c667c8f@arm.com>","From":"David Daney <ddaney@caviumnetworks.com>","Message-ID":"<c9fd0412-6dce-95e9-4ca3-d4d61f9feeca@caviumnetworks.com>","Date":"Thu, 7 Sep 2017 10:45:34 -0700","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<fb4a28cb-2005-4e9b-8b3d-4d9f4c667c8f@arm.com>","Content-Type":"text/plain; charset=utf-8; format=flowed","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Originating-IP":"[50.233.148.156]","X-ClientProxiedBy":"DM5PR07CA0044.namprd07.prod.outlook.com (10.168.109.30) To\n\tDM5PR07MB3497.namprd07.prod.outlook.com (10.164.153.28)","X-MS-PublicTrafficType":"Email","X-MS-Office365-Filtering-Correlation-Id":"8d81b2a2-f32a-4096-29ca-08d4f6183fcd","X-Microsoft-Antispam":"UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:DM5PR07MB3497; ","X-Microsoft-Exchange-Diagnostics":["1; DM5PR07MB3497;\n\t3:qVo1ANjfcv4IfJ9g7lqhM4dfTl9vvvOQ4OtHOjVeUws1NREDV96WvrJnjdmKrT4gr1OmcTupYCWH/zsWSNpyK31Ou3jKxG0Hs2kj0oWCEfj1wPYhDMJd86WrVrRTLm1EBoCK328134h/S9471T6PQS8wz0lf6EJNUqc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iagnostic":"DM5PR07MB3497:","X-Exchange-Antispam-Report-Test":"UriScan:;","X-Microsoft-Antispam-PRVS":"<DM5PR07MB3497E96C968AA727D6D6B71997940@DM5PR07MB3497.namprd07.prod.outlook.com>","X-Exchange-Antispam-Report-CFA-Test":"BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(6041248)(20161123564025)(20161123558100)(20161123555025)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:DM5PR07MB3497; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:DM5PR07MB3497; ","X-Forefront-PRVS":"04238CD941","X-Forefront-Antispam-Report":"SFV:NSPM;\n\tSFS:(10009020)(6009001)(189002)(377454003)(199003)(24454002)(230700001)(229853002)(25786009)(5660300001)(83506001)(54356999)(50986999)(76176999)(105586002)(65826007)(106356001)(478600001)(2906002)(189998001)(53416004)(31696002)(3846002)(81166006)(81156014)(101416001)(6506006)(6246003)(4001350100001)(33646002)(68736007)(54906002)(97736004)(8936002)(53936002)(6486002)(6512007)(65956001)(65806001)(66066001)(7416002)(2950100002)(42882006)(53546010)(6116002)(42186005)(69596002)(4326008)(72206003)(7736002)(31686004)(23676002)(36756003)(50466002)(305945005)(8676002)(47776003)(64126003)(142933001);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3497;\n\tH:ddl.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords;\n\tMX:1; A:1; LANG:en; ","Received-SPF":"None (protection.outlook.com: cavium.com does not designate\n\tpermitted sender hosts)","SpamDiagnosticOutput":"1:99","SpamDiagnosticMetadata":"NSPM","X-OriginatorOrg":"caviumnetworks.com","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"07 Sep 2017 17:45:36.1140\n\t(UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"711e4ccf-2e9b-4bcf-a551-4094005b6194","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"DM5PR07MB3497","Sender":"linux-gpio-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-gpio.vger.kernel.org>","X-Mailing-List":"linux-gpio@vger.kernel.org"}},{"id":1765443,"web_url":"http://patchwork.ozlabs.org/comment/1765443/","msgid":"<CAK7LNARboWo4-zkioMAxtpM84f9avtL8Z4z_s0cU5UHXkGotPg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-08T15:05:49","subject":"Re: [PATCH v4 1/6] irqdomain: rename variables in irq_domain_{push,\n\tpop}_irq()","submitter":{"id":65882,"url":"http://patchwork.ozlabs.org/api/people/65882/","name":"Masahiro Yamada","email":"yamada.masahiro@socionext.com"},"content":"Hi Marc, David,\n\n\n2017-09-08 2:45 GMT+09:00 David Daney <ddaney@caviumnetworks.com>:\n> On 09/07/2017 05:47 AM, Marc Zyngier wrote:\n>>\n>> On 07/09/17 12:41, Masahiro Yamada wrote:\n>>>\n>>> The meaning of \"root\" in irq_domain_{push,pop} is opposite to the\n>>> documentation.  Documentation/IRQ-domain.txt depicts the hierarchy\n>>> IRQ domain as follows:\n>>>\n>>>      CPU Vector irq_domain (root irq_domain to manage CPU vectors)\n>>>              ^\n>>>              |\n>>>      Interrupt Remapping irq_domain (manage irq_remapping entries)\n>>>              ^\n>>>              |\n>>>      IOAPIC irq_domain (manage IOAPIC delivery entries/pins)\n>>>\n>>>  From above, the inner-most domain (nearest to the CPU) is \"root\".\n>>>\n>>> The document also says, \"When building irq_domain hierarchy, the\n>>> irq_domain near to the device is child and the irq_domain near to\n>>> CPU is parent.\"  This is how irq_data->parent_data works.  In\n>>> contrast, these function use a variable \"child_irq_data\" for that.\n>>\n>> The exact opposite argument could be used for the data structure. The\n>> irq_desc is the root of the list ordered with parent_data.\n>>\n>> Yes, this is confusing, but because we're using the same English words\n>> to describe two different things, we're bound to make one thing more\n>> difficult. I'm unconvinced that this change helps anything (it certainly\n>> confuses me more than anything else).\n>>\n>\n> There may be room for improvement here.\n>\n> Here is my recollection of how I choose the names:\n>\n> \"root\" is the thing embedded in the struct irq_desc, if you think about a\n> typical linked list structure like this, we can refer to the starting point\n> as the \"root\".  Sometimes it might be referred to as the \"head\" of the list,\n> but usually not the \"tail\"\n>\n> \"child\" was used to indicate the thing we get to by traversing the link in\n> the list.  The fact that ->parent is the name of the next pointer and that\n> it points to something called \"child\" is confusing here.\n> So what do I think should be done?  This:\n>\n> Either\n>   A) s/child_irq_data/parent_irq_data/g  As this patch does, but leave the\n> root_irq_data name unchanged.\n\n\nSounds better than the current situation.\n\n\n\n\n>   B) Change the name of the ->parent in struct irq_data to ->next\n\n\nThis is a bad idea.\n\nirq_data->parent_data corresponds to irq_domain->parent.\nWe should not lose consistency/symmetry.\n\nirq_domain->parent originates in the \"parent\" argument\npassed to irq_domain_create_hierarchy().\nIf we change this, it will introduce horrible confusion.\n\nAs the document says, when we talk about the hierarchy,\n\"the irq_domain near to the device is\nchild and the irq_domain near to CPU is parent\"\nThis is the original concept, and should not be changed.\n\n\nWe can excuse that all the variables in these two helpers\nwere named from the point of linked-list view,\nnot talking about the hierarchy.\n\n\nHowever, what I thought more confusing was the comment block.\n\n/**\n * irq_domain_push_irq() - Push a domain in to the top of a hierarchy.\n\n\nThis comment is talking about the \"hierarchy\" at first glance.\nSo, what is my mind is the picture in Documentation/IRQ-domain.txt\n\nBut, from the term \"top\", this is talking about the linked list here too.\nThe linked list is just implementation detail...\n\n\n\n\n> But that is just my $0.02\n>\n> I fear we risk a Bike Shedding type of discussion here.","headers":{"Return-Path":"<linux-gpio-owner@vger.kernel.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=linux-gpio-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=nifty.com header.i=@nifty.com\n\theader.b=\"Ew5lby7W\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpgdd1nPNz9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 01:06:45 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752485AbdIHPGn (ORCPT <rfc822;incoming@patchwork.ozlabs.org>);\n\tFri, 8 Sep 2017 11:06:43 -0400","from conssluserg-04.nifty.com ([210.131.2.83]:21453 \"EHLO\n\tconssluserg-04.nifty.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751941AbdIHPGm (ORCPT\n\t<rfc822; linux-gpio@vger.kernel.org>); Fri, 8 Sep 2017 11:06:42 -0400","from mail-yw0-f175.google.com (mail-yw0-f175.google.com\n\t[209.85.161.175]) (authenticated)\n\tby conssluserg-04.nifty.com with ESMTP id v88F6UFb028464;\n\tSat, 9 Sep 2017 00:06:30 +0900","by mail-yw0-f175.google.com with SMTP id v72so6069390ywa.3;\n\tFri, 08 Sep 2017 08:06:30 -0700 (PDT)","by 10.37.164.225 with HTTP; Fri, 8 Sep 2017 08:05:49 -0700 (PDT)"],"DKIM-Filter":"OpenDKIM Filter v2.10.3 conssluserg-04.nifty.com v88F6UFb028464","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com;\n\ts=dec2015msa; t=1504883191;\n\tbh=lPjuR2G0pZ6cyBXYOLkJvQ5KzSwP1OVz1jYCoTy2qfo=;\n\th=In-Reply-To:References:From:Date:Subject:To:Cc:From;\n\tb=Ew5lby7Wu5rfqhkQtBUUwvjcsokrDpIo9Ktw8MhSD9lg+NUGzx5vX7TVn+LXrXbZs\n\tRMKHy+xOLd909nEdpqeiTqJNVTEMRE7EnzvSVk3eJeyY4hsM2xtDOal8E6h6mRyPb1\n\t0ZZ99a8lqbe+yZTi4h6nWDJOwVhArQ0pyFgC7BZ8g0XX9jHlJXViLXtuSEvHjdTkYM\n\t7WFL+76IPr1J6IRsNpA/Ta7Vm7iCb95j4c8xYraLL0y7osCqpWXRIBlnFa38UFlYgH\n\tJB8EIUpASeUSUnwWsWcAix+X5+E90gj38HXdyejy13sy9+RFgm/G5jkNlFULguJynB\n\t/+HwdaLdddn4Q==","X-Nifty-SrcIP":"[209.85.161.175]","X-Gm-Message-State":"AHPjjUgBc1RZk+qRJYShn+J/F1jZHx9bvnirAfdyfGW5cXMnC4aZBcj3\n\tLdvylXKwhMuyYVCUtS78jXKu2mBLcQ==","X-Google-Smtp-Source":"ADKCNb7w8YMzdKxoycSwKh2CxMXjkqkMuGwjnDrG6UJ0GvC8Ua/D4wi8MgR9+89+0ianra1WRwLdm+nCRnmexDoW0mA=","X-Received":"by 10.37.41.133 with SMTP id p127mr2608040ybp.331.1504883189641; \n\tFri, 08 Sep 2017 08:06:29 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<c9fd0412-6dce-95e9-4ca3-d4d61f9feeca@caviumnetworks.com>","References":"<1504784522-26841-1-git-send-email-yamada.masahiro@socionext.com>\n\t<1504784522-26841-2-git-send-email-yamada.masahiro@socionext.com>\n\t<fb4a28cb-2005-4e9b-8b3d-4d9f4c667c8f@arm.com>\n\t<c9fd0412-6dce-95e9-4ca3-d4d61f9feeca@caviumnetworks.com>","From":"Masahiro Yamada <yamada.masahiro@socionext.com>","Date":"Sat, 9 Sep 2017 00:05:49 +0900","X-Gmail-Original-Message-ID":"<CAK7LNARboWo4-zkioMAxtpM84f9avtL8Z4z_s0cU5UHXkGotPg@mail.gmail.com>","Message-ID":"<CAK7LNARboWo4-zkioMAxtpM84f9avtL8Z4z_s0cU5UHXkGotPg@mail.gmail.com>","Subject":"Re: [PATCH v4 1/6] irqdomain: rename variables in irq_domain_{push,\n\tpop}_irq()","To":"David Daney <ddaney@caviumnetworks.com>","Cc":"Marc Zyngier <marc.zyngier@arm.com>,\n\tThomas Gleixner <tglx@linutronix.de>,\n\tLinus Walleij <linus.walleij@linaro.org>,\n\tlinux-gpio@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,\n\tJassi Brar <jaswinder.singh@linaro.org>,\n\tdevicetree@vger.kernel.org, Jason Cooper <jason@lakedaemon.net>,\n\tMasami Hiramatsu <mhiramat@kernel.org>,\n\tDavid Daney <david.daney@cavium.com>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>","Content-Type":"text/plain; charset=\"UTF-8\"","Sender":"linux-gpio-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-gpio.vger.kernel.org>","X-Mailing-List":"linux-gpio@vger.kernel.org"}}]