Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753242AbbFANxt (ORCPT ); Mon, 1 Jun 2015 09:53:49 -0400 Received: from mga03.intel.com ([134.134.136.65]:64573 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751386AbbFANxi (ORCPT ); Mon, 1 Jun 2015 09:53:38 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,533,1427785200"; d="scan'208";a="579989040" Message-ID: <556C63DC.4000904@linux.intel.com> Date: Mon, 01 Jun 2015 21:53:32 +0800 From: Jiang Liu Organization: Intel User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Sergei Shtylyov , Thomas Gleixner , Bjorn Helgaas , Benjamin Herrenschmidt , Ingo Molnar , "H. Peter Anvin" , Randy Dunlap , Yinghai Lu , Borislav Petkov , Simon Horman , Magnus Damm CC: Konrad Rzeszutek Wilk , Tony Luck , x86@kernel.org, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, linux-sh@vger.kernel.org Subject: Re: [Patch v3 11/36] sh, irq: Use helper irq_data_get_irq_handler_data() to hide irq_desc details References: <1433145945-789-1-git-send-email-jiang.liu@linux.intel.com> <1433145945-789-12-git-send-email-jiang.liu@linux.intel.com> <556C4451.50503@cogentembedded.com> In-Reply-To: <556C4451.50503@cogentembedded.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1863 Lines: 61 On 2015/6/1 19:38, Sergei Shtylyov wrote: > Hello. > > On 6/1/2015 11:05 AM, Jiang Liu wrote: > >> Use helper function irq_data_get_irq_handler_data() to hide irq_desc >> implementation details. > > I'm only seeing calls to irq_{get|set}_handler_data() below... Hi Sergei, Thanks for review, I will fix the commit message. Thanks! Gerry > >> Signed-off-by: Jiang Liu >> --- >> drivers/sh/intc/virq.c | 12 +++++++----- >> 1 file changed, 7 insertions(+), 5 deletions(-) > >> diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c >> index f30ac9354ff2..bc0601cf0f8f 100644 >> --- a/drivers/sh/intc/virq.c >> +++ b/drivers/sh/intc/virq.c >> @@ -83,12 +83,11 @@ EXPORT_SYMBOL_GPL(intc_irq_lookup); >> >> static int add_virq_to_pirq(unsigned int irq, unsigned int virq) >> { >> - struct intc_virq_list **last, *entry; >> - struct irq_data *data = irq_get_irq_data(irq); >> + struct intc_virq_list *entry; >> + struct intc_virq_list **last = NULL; >> >> /* scan for duplicates */ >> - last = (struct intc_virq_list **)&data->handler_data; >> - for_each_virq(entry, data->handler_data) { >> + for_each_virq(entry, irq_get_handler_data(irq)) { >> if (entry->irq == virq) >> return 0; >> last = &entry->next; >> @@ -102,7 +101,10 @@ static int add_virq_to_pirq(unsigned int irq, >> unsigned int virq) >> >> entry->irq = virq; >> >> - *last = entry; >> + if (last) >> + *last = entry; >> + else >> + irq_set_handler_data(irq, entry); >> >> return 0; >> } > > WBR, Sergei > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/