From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751246AbdAYCne (ORCPT ); Tue, 24 Jan 2017 21:43:34 -0500 Received: from bh-25.webhostbox.net ([208.91.199.152]:49834 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751071AbdAYCnc (ORCPT ); Tue, 24 Jan 2017 21:43:32 -0500 Subject: Re: [PATCH v5 3/3] watchdog: zx2967: add watchdog controller driver for ZTE's zx2967 family To: Baoyou Xie References: <1485248322-24299-1-git-send-email-baoyou.xie@linaro.org> <1485248322-24299-3-git-send-email-baoyou.xie@linaro.org> <35dcd00f-a4bd-a313-0d6f-932a3f5888f0@roeck-us.net> Cc: Jun Nie , wim@iguana.be, Rob Herring , Mark Rutland , Mathieu Poirier , linux-arm Mailing List , linux-watchdog@vger.kernel.org, devicetree , Linux Kernel Mailing List , Shawn Guo , "xie.baoyou" , chen.chaokai@zte.com.cn, wang.qiang01@zte.com.cn From: Guenter Roeck Message-ID: <74bfcbb3-a9ce-8228-77d3-db4defa79df5@roeck-us.net> Date: Tue, 24 Jan 2017 18:43:21 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/24/2017 06:16 PM, Baoyou Xie wrote: > [ ... ] > + > + ret = of_parse_phandle_with_fixed_args(dev->of_node, > + "zte,wdt-reset-sysctrl", 3, 0, &out_args); > + if (ret) > + return; > + > + offset = out_args.args[0]; > + config = out_args.args[1]; > + mask = out_args.args[2]; > + > + regmap = syscon_node_to_regmap(out_args.np ); > + if (IS_ERR(regmap)) > + return; > + > + regmap_update_bits(regmap, offset, mask, config); > > > Another comment suggested adding > of_node_put(out_args.np ); > here. > > > is it really? most of the driver that call this function don't call of_node_put. but it seems harmless to call of_node_put. > > Even if everyone else is doing things wrong, that doesn't mean that you should do the same, nor is it a good idea to use it as argument. Guenter