From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: Re: [PATCH 01/12] xen/events: refactor retrigger_dynirq() and resend_irq_on_evtchn() Date: Thu, 5 Sep 2013 18:28:50 +0100 Message-ID: <5228BF52.2040308@citrix.com> References: <1376072121-17786-1-git-send-email-david.vrabel@citrix.com> <1376072121-17786-2-git-send-email-david.vrabel@citrix.com> <20130816174640.GH12674@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130816174640.GH12674@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: Boris Ostrovsky , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 16/08/13 18:46, Wei Liu wrote: > On Fri, Aug 09, 2013 at 07:15:10PM +0100, David Vrabel wrote: >> From: David Vrabel >> >> These two function did the same thing with different parameters, put >> the common bits in retrigger_evtchn(). >> >> Signed-off-by: David Vrabel >> --- >> drivers/xen/events.c | 27 +++++++++------------------ >> 1 files changed, 9 insertions(+), 18 deletions(-) >> >> diff --git a/drivers/xen/events.c b/drivers/xen/events.c >> index a58ac43..1697cf2 100644 >> --- a/drivers/xen/events.c >> +++ b/drivers/xen/events.c >> @@ -1529,13 +1529,13 @@ static int set_affinity_irq(struct irq_data *data, const struct cpumask *dest, >> return rebind_irq_to_cpu(data->irq, tcpu); >> } >> >> -int resend_irq_on_evtchn(unsigned int irq) >> +static int retrigger_evtchn(int evtchn) >> { >> - int masked, evtchn = evtchn_from_irq(irq); >> + int masked; >> struct shared_info *s = HYPERVISOR_shared_info; >> >> if (!VALID_EVTCHN(evtchn)) >> - return 1; >> + return 0; >> > > This looks weird. Either resend_irq_on_evtchn is bogus in first place or > resend_irq_on_evtchn is different from retrigger_dynirq. resend_irq_on_evtchn() is only called from one place in ia64 code and the return value is ignored. I shall note this in the commit message. David