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 X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A39AC4332B for ; Tue, 24 Mar 2020 09:52:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DD14220870 for ; Tue, 24 Mar 2020 09:51:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727066AbgCXJv7 (ORCPT ); Tue, 24 Mar 2020 05:51:59 -0400 Received: from mga11.intel.com ([192.55.52.93]:1981 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726563AbgCXJv7 (ORCPT ); Tue, 24 Mar 2020 05:51:59 -0400 IronPort-SDR: PR0H8e9xald8MDkyJ1E7BqIuDm4t6VmzoBvlnBqSIEj8eISUrDwNbY4cSieuzOf7YbOmuKG6uB bpDz39n69/UQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2020 02:51:59 -0700 IronPort-SDR: n3Yll1s+xmpLGmk3bvv18vmmDQd7u9T6HDCsDAHXBgmUhghFJPxI2TmP79aJ+nnEQxRHyCRCCk LMMcltJtgc9A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,299,1580803200"; d="scan'208";a="357372104" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001.fm.intel.com with ESMTP; 24 Mar 2020 02:51:52 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jGgDx-00CUfr-8G; Tue, 24 Mar 2020 11:51:53 +0200 Date: Tue, 24 Mar 2020 11:51:53 +0200 From: Andy Shevchenko To: Matti Vaittinen Cc: mazziesaccount@gmail.com, Greg Kroah-Hartman , Linus Walleij , Mikko Mutanen , Markus Laine , Andrew Morton , Ard Biesheuvel , Borislav Petkov , Brendan Higgins , Changbin Du , Dan Williams , David Gow , "David S. Miller" , devicetree@vger.kernel.org, Gary Hook , Herbert Xu , Krzysztof Kozlowski , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Mark Rutland , Masahiro Yamada , Masami Hiramatsu , Mikhail Zaslonko , Randy Dunlap , Rob Herring , Sebastian Reichel , Shuah Khan , Tal Gilboa , Thomas Gleixner , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Vincenzo Frascino , Vladimir Oltean , Mark Brown , Liam Girdwood Subject: Re: [PATCH v6 09/10] power: supply: Support ROHM bd99954 charger Message-ID: <20200324095153.GF1922688@smile.fi.intel.com> References: <1bf2431b80489ae412e774519a92616a9aa2bcca.1584977512.git.matti.vaittinen@fi.rohmeurope.com> <20200324095024.GE1922688@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200324095024.GE1922688@smile.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Mar 24, 2020 at 11:50:24AM +0200, Andy Shevchenko wrote: > On Tue, Mar 24, 2020 at 10:32:19AM +0200, Matti Vaittinen wrote: > > +static int bd9995x_get_prop_batt_present(struct bd9995x_device *bd) > > +{ > > + int ret, tmp; > > + > > + ret = regmap_field_read(bd->rmap_fields[F_BATTEMP], &tmp); > > + if (ret) > > + return false; > > + > > > + return (tmp != BATT_OPEN) ? true : false; > > C 101 (I saw somewhere coccinelle script for this): > > return tmp != BATT_OPEN; > > > +} Ah, and even more. Mistype of function and return value. -- With Best Regards, Andy Shevchenko