From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7F22C636CC for ; Fri, 17 Feb 2023 02:30:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229493AbjBQCaF convert rfc822-to-8bit (ORCPT ); Thu, 16 Feb 2023 21:30:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229460AbjBQCaE (ORCPT ); Thu, 16 Feb 2023 21:30:04 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3BDC4FC9B; Thu, 16 Feb 2023 18:30:02 -0800 (PST) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id B5F2024E287; Fri, 17 Feb 2023 10:30:01 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 17 Feb 2023 10:29:59 +0800 Received: from [192.168.125.128] (183.27.98.67) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 17 Feb 2023 10:29:58 +0800 Message-ID: Date: Fri, 17 Feb 2023 10:30:28 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.7.2 Subject: Re: [PATCH v2 2/3] drivers: watchdog: Add StarFive Watchdog driver To: Guenter Roeck CC: , , , Wim Van Sebroeck , Krzysztof Kozlowski , Rob Herring , Paul Walmsley , "Palmer Dabbelt" , Albert Ou , "Philipp Zabel" , Samin Guo , References: <20221219094233.179153-1-xingyu.wu@starfivetech.com> <20221219094233.179153-3-xingyu.wu@starfivetech.com> <20230201224619.GA3194283@roeck-us.net> <1f18bfdc-7a04-4914-d970-7ef1d4f99653@starfivetech.com> Content-Language: en-US From: Xingyu Wu In-Reply-To: Content-Type: text/plain; charset="UTF-8" X-Originating-IP: [183.27.98.67] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 2023/2/16 22:57, Guenter Roeck wrote: > On 2/15/23 23:11, Xingyu Wu wrote: >> On 2023/2/2 6:46, Guenter Roeck wrote: >>> On Mon, Dec 19, 2022 at 05:42:32PM +0800, Xingyu Wu wrote: >>>> Add watchdog driver for the StarFive JH7110 SoC. >>>> >>>> Signed-off-by: Xingyu Wu >>>> + >>>> [...] >>>> + >>>> +static const struct watchdog_info starfive_wdt_ident = { >>>> +    .options = OPTIONS, >>>> +    .firmware_version = 0, >>> >>> It is not necessary to initilize a static variable with 0. >>> >>>> +    .identity = "StarFive Watchdog", >>>> +}; >> >> Hi Guenter, >> >> It would be a compilation error if drop the '0'. I found that other files > > No. > >> initialize this static variable as well. >> > > Ah, the old "others do it, so do I" argument. > Sorry, that is not a valid argument. > Can I assign ‘firmware_version’ to a macro definition in the probe? Best regards, Xingyu Wu