Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754916AbbKLPyY (ORCPT ); Thu, 12 Nov 2015 10:54:24 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:54705 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753364AbbKLPyW (ORCPT ); Thu, 12 Nov 2015 10:54:22 -0500 Message-ID: <0ef6f6fb8bdce49101ec60ca464f9118.squirrel@www.codeaurora.org> In-Reply-To: References: <1447308882-29634-1-git-send-email-okaya@codeaurora.org> <1447308882-29634-2-git-send-email-okaya@codeaurora.org> <5644AA63.2070205@codeaurora.org> Date: Thu, 12 Nov 2015 15:54:21 -0000 Subject: Re: [PATCH] acpi: add support for extended IRQ to PCI link From: okaya@codeaurora.org To: "Andy Shevchenko" Cc: "Sinan Kaya" , "linux-acpi@vger.kernel.org" , "Timur Tabi" , cov@codeaurora.org, jcm@redhat.com, "Rafael J. Wysocki" , "Len Brown" , "linux-kernel@vger.kernel.org" User-Agent: SquirrelMail/1.4.22-4.el6 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT X-Priority: 3 (Normal) Importance: Normal Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1791 Lines: 48 > On Thu, Nov 12, 2015 at 5:04 PM, Sinan Kaya wrote: >> On 11/12/2015 4:56 AM, Andy Shevchenko wrote: >>> On Thu, Nov 12, 2015 at 8:14 AM, Sinan Kaya >>> wrote: >>>> - if (acpi_irq_balance || !link->irq.active) { >>>> + if ((acpi_irq_balance || !link->irq.active) && (irq < >>>> ACPI_MAX_IRQS)) { >>>> /* >>> >>>> - * Select the best IRQ. This is done in reverse to >>>> promote >>>> - * the use of IRQs 9, 10, 11, and >15. >>>> + * Select the best IRQ. This is done in reverse to >>>> + * promote the use of IRQs 9, 10, 11, and >15. >>> >>> What was changed here? >> >> See your comments here. >> https://lkml.org/lkml/2015/11/8/231 > > So, you refer to narrow commentary blocks, right? > It was about *new* code, leave as is what was before your patch series. > > -- > With Best Regards, > Andy Shevchenko > This is what it was before. > if (acpi_irq_balance || !link->irq.active) { > - /* > - * Select the best IRQ. This is done in reverse to promote > - * the use of IRQs 9, 10, 11, and >15. > - */ > - for (i = (link->irq.possible_count - 1); i >= 0; i--) { > - if (acpi_irq_penalty[irq] > > - acpi_irq_penalty[link->irq.possible[i]]) > - irq = link->irq.possible[i]; I added a range check for link->irq.possible[i] and irq into this code. -- 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/