From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756187AbcHCF5S (ORCPT ); Wed, 3 Aug 2016 01:57:18 -0400 Received: from eddie.linux-mips.org ([148.251.95.138]:38406 "EHLO cvs.linux-mips.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753967AbcHCF5F (ORCPT ); Wed, 3 Aug 2016 01:57:05 -0400 Date: Wed, 3 Aug 2016 07:56:53 +0200 From: Ralf Baechle To: Paul Gortmaker Cc: linux-kernel@vger.kernel.org, Jon Hunter , Kevin Hilman , Marc Zyngier , John Crispin , Thomas Gleixner , linux-mips@linux-mips.org, Sudip Mukherjee Subject: Re: [PATCH] mips: lantiq: fix irq_chip name to not land in new parent field Message-ID: <20160803055653.GG15910@linux-mips.org> References: <20160802185447.3831-1-paul.gortmaker@windriver.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160802185447.3831-1-paul.gortmaker@windriver.com> User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 02, 2016 at 02:54:47PM -0400, Paul Gortmaker wrote: > As of commit be45beb2df69 ("genirq: Add runtime power management > support for IRQ chips") the irq_chip struct got a struct *device > parent_device field added to it. However, it was added at the > beginning of the struct, which previously was the "name" entry. > > The driver here was using a mix of ordered struct init entries and > named init entries. It was supplying the name assuming it was the 1st > in the order, and hence when that became a struct *device we get: > > arch/mips/lantiq/irq.c:209:2: warning: initialization from incompatible pointer type [enabled by default] > arch/mips/lantiq/irq.c:209:2: warning: (near initialization for 'ltq_irq_type.parent_device') [enabled by default] > arch/mips/lantiq/irq.c:219:2: warning: initialization from incompatible pointer type [enabled by default] > arch/mips/lantiq/irq.c:219:2: warning: (near initialization for 'ltq_eiu_type.parent_device') [enabled by default] > > While not runtime tested, I can't imagine trying to dereference a > a struct device field from a char string will end well. > > Here we've used named element init entries for the name string as well > to fix it. > > Fixes: be45beb2df69 ("genirq: Add runtime power management support for IRQ chips") > Cc: Jon Hunter > Cc: Kevin Hilman > Cc: Marc Zyngier > Cc: John Crispin > Cc: Ralf Baechle > Cc: Thomas Gleixner > Cc: linux-mips@linux-mips.org > Signed-off-by: Paul Gortmaker Thanks for the patch but I've already applied the identical patch https://patchwork.linux-mips.org/patch/13684/. Ralf