From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934389AbcBDQnT (ORCPT ); Thu, 4 Feb 2016 11:43:19 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:36005 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752984AbcBDQnQ (ORCPT ); Thu, 4 Feb 2016 11:43:16 -0500 Subject: Re: [PATCH v10 5/5] Watchdog: ARM SBSA Generic Watchdog half timeout panic support To: Mathieu Poirier , fu.wei@linaro.org Cc: Rob Herring , =?UTF-8?Q?Pawe=c5=82_Moll?= , Mark Rutland , Ian Campbell , Kumar Gala , wim@iguana.be, linux@roeck-us.net, Jon Corbet , Catalin Marinas , Will Deacon , Suravee.Suthikulpanit@amd.com, "linux-kernel@vger.kernel.org" , linux-watchdog@vger.kernel.org, linux-doc@vger.kernel.org, "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linaro-acpi@lists.linaro.org, rruigrok@codeaurora.org, harba@codeaurora.org, Christopher Covington , dyoung@redhat.com, panand@redhat.com, graeme.gregory@linaro.org, al.stone@linaro.org, hanjun.guo@linaro.org, jcm@redhat.com, Arnd Bergmann , leo.duran@amd.com, Sudeep Holla References: <1454519923-25230-1-git-send-email-fu.wei@linaro.org> <1454519923-25230-6-git-send-email-fu.wei@linaro.org> From: Timur Tabi Message-ID: <56B37FA0.5000209@codeaurora.org> Date: Thu, 4 Feb 2016 10:43:12 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Firefox/42.0 SeaMonkey/2.39 MIME-Version: 1.0 In-Reply-To: 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 Mathieu Poirier wrote: >> >+#ifdef CONFIG_ARM_SBSA_WATCHDOG_PANIC >> >+ irq = platform_get_irq(pdev, 0); >> >+ if (irq < 0) { >> >+ dev_err(dev, "unable to get ws0 interrupt.\n"); >> >+ return irq; >> >+ } >> >+#endif >> >+ > Can't the driver revert to single stage mode if platform_get_irq() > fails? That way the value of 'irq' can be tested throughout the > _probe() function and the #ifdefs removed. I like that idea. The same can be done with the devm_request_irq() call. It should definitely still display a warning if the command-line option is set but no interrupt is available. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timur Tabi Subject: Re: [PATCH v10 5/5] Watchdog: ARM SBSA Generic Watchdog half timeout panic support Date: Thu, 4 Feb 2016 10:43:12 -0600 Message-ID: <56B37FA0.5000209@codeaurora.org> References: <1454519923-25230-1-git-send-email-fu.wei@linaro.org> <1454519923-25230-6-git-send-email-fu.wei@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Sender: linux-doc-owner@vger.kernel.org To: Mathieu Poirier , fu.wei@linaro.org Cc: Rob Herring , =?UTF-8?Q?Pawe=c5=82_Moll?= , Mark Rutland , Ian Campbell , Kumar Gala , wim@iguana.be, linux@roeck-us.net, Jon Corbet , Catalin Marinas , Will Deacon , Suravee.Suthikulpanit@amd.com, "linux-kernel@vger.kernel.org" , linux-watchdog@vger.kernel.org, linux-doc@vger.kernel.org, "devicetree@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , linaro-acpi@lists.linaro.org, rruigrok@codeaurora.org, harba@codeaurora.org, Christopher Covington , dyoung@redhat.com, panand@redhat.com, graeme.gregory@linaro.org, al.stone@linaro.org, hanjun.guo@linaro.org, jcm@redhat.co List-Id: devicetree@vger.kernel.org Mathieu Poirier wrote: >> >+#ifdef CONFIG_ARM_SBSA_WATCHDOG_PANIC >> >+ irq = platform_get_irq(pdev, 0); >> >+ if (irq < 0) { >> >+ dev_err(dev, "unable to get ws0 interrupt.\n"); >> >+ return irq; >> >+ } >> >+#endif >> >+ > Can't the driver revert to single stage mode if platform_get_irq() > fails? That way the value of 'irq' can be tested throughout the > _probe() function and the #ifdefs removed. I like that idea. The same can be done with the devm_request_irq() call. It should definitely still display a warning if the command-line option is set but no interrupt is available. From mboxrd@z Thu Jan 1 00:00:00 1970 From: timur@codeaurora.org (Timur Tabi) Date: Thu, 4 Feb 2016 10:43:12 -0600 Subject: [PATCH v10 5/5] Watchdog: ARM SBSA Generic Watchdog half timeout panic support In-Reply-To: References: <1454519923-25230-1-git-send-email-fu.wei@linaro.org> <1454519923-25230-6-git-send-email-fu.wei@linaro.org> Message-ID: <56B37FA0.5000209@codeaurora.org> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Mathieu Poirier wrote: >> >+#ifdef CONFIG_ARM_SBSA_WATCHDOG_PANIC >> >+ irq = platform_get_irq(pdev, 0); >> >+ if (irq < 0) { >> >+ dev_err(dev, "unable to get ws0 interrupt.\n"); >> >+ return irq; >> >+ } >> >+#endif >> >+ > Can't the driver revert to single stage mode if platform_get_irq() > fails? That way the value of 'irq' can be tested throughout the > _probe() function and the #ifdefs removed. I like that idea. The same can be done with the devm_request_irq() call. It should definitely still display a warning if the command-line option is set but no interrupt is available.