From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755934AbbEUNOk (ORCPT ); Thu, 21 May 2015 09:14:40 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:42716 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753915AbbEUNOg (ORCPT ); Thu, 21 May 2015 09:14:36 -0400 Date: Thu, 21 May 2015 15:14:29 +0200 From: Ralf Baechle To: Joe Perches Cc: linux-mips , LKML , Gabor Juhos , Manuel Lauss , John Crispin Subject: Re: [PATCH] mips: irq: Use DECLARE_BITMAP Message-ID: <20150521131429.GA8177@linux-mips.org> References: <1432125894.2870.284.camel@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1432125894.2870.284.camel@perches.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 20, 2015 at 05:44:54AM -0700, Joe Perches wrote: > Use the generic mechanism to declare a bitmap instead of unsigned long. > > This could fix an overwrite defect of whatever follows irq_map. > > Not all "#define NR_IRQS " are a multiple of BITS_PER_LONG so > using DECLARE_BITMAP allocates the proper number of longs required > for the possible bits. > > For instance: > > arch/mips/include/asm/mach-ath79/irq.h:#define NR_IRQS 51 > arch/mips/include/asm/mach-db1x00/irq.h:#define NR_IRQS 152 > arch/mips/include/asm/mach-lantiq/falcon/irq.h:#define NR_IRQS 328 This only matters to user of the allocate_irqno() API and there is only on such platform, the IP27 which fortunately uses a NR_IRQS value that is a multiple of 64, so no impact. Thanks anyway! Ralf