Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752100AbcJ1EEn (ORCPT ); Fri, 28 Oct 2016 00:04:43 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:33447 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750708AbcJ1EEl (ORCPT ); Fri, 28 Oct 2016 00:04:41 -0400 Subject: Re: [PATCH 7/7] mfd: tps65217: Fix mismatched interrupt number To: Lee Jones References: <20161021140106.21531-1-woogyom.kim@gmail.com> <20161021140106.21531-8-woogyom.kim@gmail.com> <20161026135631.GC13127@dell> Cc: bcousson@baylibre.com, Tony Lindgren , linux-omap@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org From: Milo Kim Message-ID: <08151892-96b0-2a9b-5b5a-b91bec94e247@gmail.com> Date: Fri, 28 Oct 2016 13:04:33 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20161026135631.GC13127@dell> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 693 Lines: 23 On 10/26/2016 10:56 PM, Lee Jones wrote: >> diff --git a/include/linux/mfd/tps65217.h b/include/linux/mfd/tps65217.h >> > index 4ccda89..75a3a5f 100644 >> > --- a/include/linux/mfd/tps65217.h >> > +++ b/include/linux/mfd/tps65217.h >> > @@ -235,9 +235,9 @@ struct tps65217_bl_pdata { >> > }; >> > >> > enum tps65217_irq_type { >> > - TPS65217_IRQ_PB, >> > - TPS65217_IRQ_AC, >> > TPS65217_IRQ_USB, >> > + TPS65217_IRQ_AC, >> > + TPS65217_IRQ_PB, >> > TPS65217_NUM_IRQ >> > }; > This is why using enum for these types of assignments is sometimes > dangerous. It's probably best to be explicit. I agree with you. Let me fix in v2 - use #define instead of enum type. Best regards, Milo