From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753565AbdFVRGb (ORCPT ); Thu, 22 Jun 2017 13:06:31 -0400 Received: from terminus.zytor.com ([65.50.211.136]:41583 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753482AbdFVRG3 (ORCPT ); Thu, 22 Jun 2017 13:06:29 -0400 Date: Thu, 22 Jun 2017 10:00:47 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: marc.zyngier@arm.com, hpa@zytor.com, hch@lst.de, keith.busch@intel.com, mpe@ellerman.id.au, mingo@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org, axboe@kernel.dk, tglx@linutronix.de Reply-To: mpe@ellerman.id.au, mingo@kernel.org, axboe@kernel.dk, tglx@linutronix.de, linux-kernel@vger.kernel.org, peterz@infradead.org, hch@lst.de, hpa@zytor.com, marc.zyngier@arm.com, keith.busch@intel.com In-Reply-To: <20170619235446.160866358@linutronix.de> References: <20170619235446.160866358@linutronix.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:irq/core] genirq/proc: Replace ever repeating type cast Git-Commit-ID: c1a80386965e9fa3c2f8d1d57966216fe02c9124 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: c1a80386965e9fa3c2f8d1d57966216fe02c9124 Gitweb: http://git.kernel.org/tip/c1a80386965e9fa3c2f8d1d57966216fe02c9124 Author: Thomas Gleixner AuthorDate: Tue, 20 Jun 2017 01:37:37 +0200 Committer: Thomas Gleixner CommitDate: Thu, 22 Jun 2017 18:21:20 +0200 genirq/proc: Replace ever repeating type cast The proc file setup repeats the same ugly type cast for the irq number over and over. Do it once and hand in the local void pointer. Signed-off-by: Thomas Gleixner Cc: Jens Axboe Cc: Marc Zyngier Cc: Michael Ellerman Cc: Keith Busch Cc: Peter Zijlstra Cc: Christoph Hellwig Link: http://lkml.kernel.org/r/20170619235446.160866358@linutronix.de --- kernel/irq/proc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index eff7c0c..cbc4c5e 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -326,6 +326,7 @@ void register_handler_proc(unsigned int irq, struct irqaction *action) void register_irq_proc(unsigned int irq, struct irq_desc *desc) { static DEFINE_MUTEX(register_lock); + void __maybe_unused *irqp = (void *)(unsigned long) irq; char name [MAX_NAMELEN]; if (!root_irq_dir || (desc->irq_data.chip == &no_irq_chip)) @@ -351,20 +352,19 @@ void register_irq_proc(unsigned int irq, struct irq_desc *desc) #ifdef CONFIG_SMP /* create /proc/irq//smp_affinity */ proc_create_data("smp_affinity", 0644, desc->dir, - &irq_affinity_proc_fops, (void *)(long)irq); + &irq_affinity_proc_fops, irqp); /* create /proc/irq//affinity_hint */ proc_create_data("affinity_hint", 0444, desc->dir, - &irq_affinity_hint_proc_fops, (void *)(long)irq); + &irq_affinity_hint_proc_fops, irqp); /* create /proc/irq//smp_affinity_list */ proc_create_data("smp_affinity_list", 0644, desc->dir, - &irq_affinity_list_proc_fops, (void *)(long)irq); + &irq_affinity_list_proc_fops, irqp); proc_create_data("node", 0444, desc->dir, - &irq_node_proc_fops, (void *)(long)irq); + &irq_node_proc_fops, irqp); #endif - proc_create_data("spurious", 0444, desc->dir, &irq_spurious_proc_fops, (void *)(long)irq);