Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp867417rdb; Fri, 17 Nov 2023 15:37:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFaOJBLoqTtrWx6GLp1vhORnjaKKEvS3wtJSoEJaKnmzJQ8dXb79JhRgIW1AYwZzMGqtqyJ X-Received: by 2002:a17:902:ecc3:b0:1cf:50e0:505d with SMTP id a3-20020a170902ecc300b001cf50e0505dmr167773plh.1.1700264220172; Fri, 17 Nov 2023 15:37:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700264220; cv=none; d=google.com; s=arc-20160816; b=giWV7LxQuEHD2TPiAYxo4U20epts6njV+Lh8rlaoB6mTzbEp4M+JDfeBigkwvvFDO2 kVF0RcfnfAR+/HXLx0vUYqKtbmubcyTAKLUcH3t/rhbxvJsujzFJAbEvN41LzTy5KB63 gjWwDPRqaNTeYikajp0Wk/+5lxpJIqS5RGH54QyXdjLtxQcft9py81E5hXK/PBbghlRn 1m/Cxy+yggTLrv3qwCTmd/2WYDqzEJ/PA/may9vt5uQ4q1bFKO5MkRdfazGb2jGRh6Ln OF7ecnptBWahqJTChu5jq7eWvSrBMHiTW+d8a418OGVI8gzMofVa6/7bN9xs9S5Qw3Ei Jhgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=D9qNCEpN9tV4OA/IjVzX3FD26FjmpjuQwgfoGVnG3ls=; fh=w/PggTu6OZMhjwVz/BVfyB5mT4h3PzSbXPozA3siLFQ=; b=Skg5P5/hrYW0ReQ5/xEVM9eu2iUoM7jpJqL26VsSogvMyPrhxzkgYvg5kAy8+1Ax0T 2OIwMnCZiXkiJfHZJGDuHZnQSxXDfFkx5N77lr++CHoG4pfk+PGnk4IpWN/j6DVRtZ+F 5fzVh7uOTfbGRaDM9jv/m9mJ2NMRuKvdsI3C4iK75nYezUfKjuHQxoDf1GHilpjcsviK IsLgx1ud+uNcOHZo+X67rtNPhSgykjacR69iwW5dwsTPyV7uw/L0vVV4s07Uz4xtUi0c 8ORK52gyzmZSYjn1Qtw3fn1e1sWGwFcdzOfnnZZTC/ike17hsqpkH0+lu2GcTjcs4Gnb ga8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PWXkDy+e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id l18-20020a170902eb1200b001bf1d1d99b0si2742282plb.568.2023.11.17.15.36.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 15:37:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PWXkDy+e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 4CCD8806137D; Fri, 17 Nov 2023 15:36:29 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346284AbjKQXgZ (ORCPT + 99 others); Fri, 17 Nov 2023 18:36:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229737AbjKQXgY (ORCPT ); Fri, 17 Nov 2023 18:36:24 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26ABFD6D; Fri, 17 Nov 2023 15:36:21 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6c3363a2b93so2455638b3a.3; Fri, 17 Nov 2023 15:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700264180; x=1700868980; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=D9qNCEpN9tV4OA/IjVzX3FD26FjmpjuQwgfoGVnG3ls=; b=PWXkDy+e7HVH2GGLNmelsS/SYz1ewvikUqDUiOk9u3Vn7PWhFSqm18Bf64g5Ua/DZs ikZKo9UJmt7y0r7PfPpVPy5OjEm2EjrDn5aNzprP/XHvK5SIU3+C57xxAt0CgTac6qzO w5eSyqVDmt0TKLYjiayXlcz2k9wEPjZBHMKacrw8Mrrmmq4PzJBTkmQPLaFcYYpzqWcz 6AaOOGy86q+RF09XBvjSyivNIXT8Mk1DnZy+ws4bn3WCrbxE9B1KE/6/ePQvhO0attbB gN0SiAhN15K99XoPHNfZIaKp1A3Jk12YGHViyjY+7QTZFGlF9gvOE8qy4/N/56wx2GQo iFIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700264180; x=1700868980; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=D9qNCEpN9tV4OA/IjVzX3FD26FjmpjuQwgfoGVnG3ls=; b=L098r8Ei+G/GldQDFStken7TL0vTvGFajiPilhqZ9Gq7JTN+hLkyFpn5ZSERNz53xf LIag1ZPJOAY28uSeKWOxmaYjx2Az6qtThMCJ0YfFrs6ovKkRr0PUGjRTh76miYMlL4Ff ZR2CMNYHtWxPek0cpc5dATagE1aAcrYFVxrs9e3IU7Z4K3FHVLYCNlXyrJdRIuqRlSGJ tx0rwYkADPnMiGL6z+9fYmPYBZwbo1Tcz7+xxRM1emRNetU3LMlYgl+x4z1o3FJTP+ci HnUtQ0sk8y2O7IEHRkMlN+K5mr/18MkyzHOmLGn9AlAERjzT6bGyNLXSxQrg5aeDi8Jg 6LWg== X-Gm-Message-State: AOJu0Yx3oZ5fo0dKxrIx1tk8kE3QZMeMmslhte8VClRp8W7E/ol9XLTW 51bCK548vYOw9st4vhPFwUM= X-Received: by 2002:a05:6a00:1d89:b0:6bf:50df:2df5 with SMTP id z9-20020a056a001d8900b006bf50df2df5mr1267005pfw.13.1700264180517; Fri, 17 Nov 2023 15:36:20 -0800 (PST) Received: from archie.me ([103.131.18.64]) by smtp.gmail.com with ESMTPSA id o14-20020a056a001b4e00b006c33bf9905fsm1915488pfv.25.2023.11.17.15.36.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Nov 2023 15:36:20 -0800 (PST) Received: by archie.me (Postfix, from userid 1000) id 5355B102070AC; Sat, 18 Nov 2023 06:36:17 +0700 (WIB) Date: Sat, 18 Nov 2023 06:36:16 +0700 From: Bagas Sanjaya To: Charalampos Mitrodimas , Sebastian Reichel , "Rafael J. Wysocki" , Mario Limonciello , qinyu , Nick Alcock , Greg Kroah-Hartman , Huacai Chen , Kai-Heng Feng , Andreas Kemnade , Ian Molton , Szabolcs Gyurko , Anton Vorontsov Cc: Linux Power Management , Linux Kernel Mailing List Subject: Re: [PATCH] power: supply: Fix indentation and some other warnings Message-ID: References: <20231117230658.65809-1-charmitro@posteo.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+tJVt8GoTANVf/9m" Content-Disposition: inline In-Reply-To: <20231117230658.65809-1-charmitro@posteo.net> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 17 Nov 2023 15:36:29 -0800 (PST) --+tJVt8GoTANVf/9m Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 17, 2023 at 11:06:58PM +0000, Charalampos Mitrodimas wrote: > These were mentioned by checkpatch: > Errors: > (1) code indent should use tabs where possible > (2) switch and case should be at the same indent > Warnings: > (1) quoted string split across lines > (2) Missing a blank line after declarations >=20 > Based on this comment from "include/linux/module.h", modules with > multiple authors should use multiple MODULE_AUTHOR() statements. > /* > * Author(s), use "Name " or just "Name", for multiple > * authors use multiple MODULE_AUTHOR() statements/lines. > */ > #define MODULE_AUTHOR(_author) MODULE_INFO(author, _author) Shouldn't MODULE_AUTHOR fix be separate patch? >=20 > Signed-off-by: Charalampos Mitrodimas > --- > drivers/power/supply/power_supply_core.c | 167 ++++++++++++----------- > 1 file changed, 84 insertions(+), 83 deletions(-) >=20 > diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/sup= ply/power_supply_core.c > index 73265001dd4b..ecef35ac3b7e 100644 > --- a/drivers/power/supply/power_supply_core.c > +++ b/drivers/power/supply/power_supply_core.c > @@ -861,44 +861,44 @@ const size_t power_supply_battery_info_properties_s= ize =3D ARRAY_SIZE(power_supply > EXPORT_SYMBOL_GPL(power_supply_battery_info_properties_size); > =20 > bool power_supply_battery_info_has_prop(struct power_supply_battery_info= *info, > - enum power_supply_property psp) > + enum power_supply_property psp) Looks OK. > { > if (!info) > return false; > =20 > switch (psp) { > - case POWER_SUPPLY_PROP_TECHNOLOGY: > - return info->technology !=3D POWER_SUPPLY_TECHNOLOGY_UNKNOWN; > - case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN: > - return info->energy_full_design_uwh >=3D 0; > - case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: > - return info->charge_full_design_uah >=3D 0; > - case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: > - return info->voltage_min_design_uv >=3D 0; > - case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: > - return info->voltage_max_design_uv >=3D 0; > - case POWER_SUPPLY_PROP_PRECHARGE_CURRENT: > - return info->precharge_current_ua >=3D 0; > - case POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT: > - return info->charge_term_current_ua >=3D 0; > - case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX: > - return info->constant_charge_current_max_ua >=3D 0; > - case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX: > - return info->constant_charge_voltage_max_uv >=3D 0; > - case POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MIN: > - return info->temp_ambient_alert_min > INT_MIN; > - case POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MAX: > - return info->temp_ambient_alert_max < INT_MAX; > - case POWER_SUPPLY_PROP_TEMP_ALERT_MIN: > - return info->temp_alert_min > INT_MIN; > - case POWER_SUPPLY_PROP_TEMP_ALERT_MAX: > - return info->temp_alert_max < INT_MAX; > - case POWER_SUPPLY_PROP_TEMP_MIN: > - return info->temp_min > INT_MIN; > - case POWER_SUPPLY_PROP_TEMP_MAX: > - return info->temp_max < INT_MAX; > - default: > - return false; > + case POWER_SUPPLY_PROP_TECHNOLOGY: > + return info->technology !=3D POWER_SUPPLY_TECHNOLOGY_UNKNOWN; > + case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN: > + return info->energy_full_design_uwh >=3D 0; > + case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: > + return info->charge_full_design_uah >=3D 0; > + case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: > + return info->voltage_min_design_uv >=3D 0; > + case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: > + return info->voltage_max_design_uv >=3D 0; > + case POWER_SUPPLY_PROP_PRECHARGE_CURRENT: > + return info->precharge_current_ua >=3D 0; > + case POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT: > + return info->charge_term_current_ua >=3D 0; > + case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX: > + return info->constant_charge_current_max_ua >=3D 0; > + case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX: > + return info->constant_charge_voltage_max_uv >=3D 0; > + case POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MIN: > + return info->temp_ambient_alert_min > INT_MIN; > + case POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MAX: > + return info->temp_ambient_alert_max < INT_MAX; > + case POWER_SUPPLY_PROP_TEMP_ALERT_MIN: > + return info->temp_alert_min > INT_MIN; > + case POWER_SUPPLY_PROP_TEMP_ALERT_MAX: > + return info->temp_alert_max < INT_MAX; > + case POWER_SUPPLY_PROP_TEMP_MIN: > + return info->temp_min > INT_MIN; > + case POWER_SUPPLY_PROP_TEMP_MAX: > + return info->temp_max < INT_MAX; > + default: > + return false; > } This one LGTM. > } > EXPORT_SYMBOL_GPL(power_supply_battery_info_has_prop); > @@ -914,53 +914,53 @@ int power_supply_battery_info_get_prop(struct power= _supply_battery_info *info, > return -EINVAL; > =20 > switch (psp) { > - case POWER_SUPPLY_PROP_TECHNOLOGY: > - val->intval =3D info->technology; > - return 0; > - case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN: > - val->intval =3D info->energy_full_design_uwh; > - return 0; > - case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: > - val->intval =3D info->charge_full_design_uah; > - return 0; > - case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: > - val->intval =3D info->voltage_min_design_uv; > - return 0; > - case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: > - val->intval =3D info->voltage_max_design_uv; > - return 0; > - case POWER_SUPPLY_PROP_PRECHARGE_CURRENT: > - val->intval =3D info->precharge_current_ua; > - return 0; > - case POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT: > - val->intval =3D info->charge_term_current_ua; > - return 0; > - case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX: > - val->intval =3D info->constant_charge_current_max_ua; > - return 0; > - case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX: > - val->intval =3D info->constant_charge_voltage_max_uv; > - return 0; > - case POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MIN: > - val->intval =3D info->temp_ambient_alert_min; > - return 0; > - case POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MAX: > - val->intval =3D info->temp_ambient_alert_max; > - return 0; > - case POWER_SUPPLY_PROP_TEMP_ALERT_MIN: > - val->intval =3D info->temp_alert_min; > - return 0; > - case POWER_SUPPLY_PROP_TEMP_ALERT_MAX: > - val->intval =3D info->temp_alert_max; > - return 0; > - case POWER_SUPPLY_PROP_TEMP_MIN: > - val->intval =3D info->temp_min; > - return 0; > - case POWER_SUPPLY_PROP_TEMP_MAX: > - val->intval =3D info->temp_max; > - return 0; > - default: > - return -EINVAL; > + case POWER_SUPPLY_PROP_TECHNOLOGY: > + val->intval =3D info->technology; > + return 0; > + case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN: > + val->intval =3D info->energy_full_design_uwh; > + return 0; > + case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN: > + val->intval =3D info->charge_full_design_uah; > + return 0; > + case POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN: > + val->intval =3D info->voltage_min_design_uv; > + return 0; > + case POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN: > + val->intval =3D info->voltage_max_design_uv; > + return 0; > + case POWER_SUPPLY_PROP_PRECHARGE_CURRENT: > + val->intval =3D info->precharge_current_ua; > + return 0; > + case POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT: > + val->intval =3D info->charge_term_current_ua; > + return 0; > + case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX: > + val->intval =3D info->constant_charge_current_max_ua; > + return 0; > + case POWER_SUPPLY_PROP_CONSTANT_CHARGE_VOLTAGE_MAX: > + val->intval =3D info->constant_charge_voltage_max_uv; > + return 0; > + case POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MIN: > + val->intval =3D info->temp_ambient_alert_min; > + return 0; > + case POWER_SUPPLY_PROP_TEMP_AMBIENT_ALERT_MAX: > + val->intval =3D info->temp_ambient_alert_max; > + return 0; > + case POWER_SUPPLY_PROP_TEMP_ALERT_MIN: > + val->intval =3D info->temp_alert_min; > + return 0; > + case POWER_SUPPLY_PROP_TEMP_ALERT_MAX: > + val->intval =3D info->temp_alert_max; > + return 0; > + case POWER_SUPPLY_PROP_TEMP_MIN: > + val->intval =3D info->temp_min; > + return 0; > + case POWER_SUPPLY_PROP_TEMP_MAX: > + val->intval =3D info->temp_max; > + return 0; > + default: > + return -EINVAL; And this one too. > @@ -1636,6 +1637,6 @@ subsys_initcall(power_supply_class_init); > module_exit(power_supply_class_exit); > =20 > MODULE_DESCRIPTION("Universal power supply monitor class"); > -MODULE_AUTHOR("Ian Molton , " > - "Szabolcs Gyurko, " > - "Anton Vorontsov "); > +MODULE_AUTHOR("Ian Molton "); > +MODULE_AUTHOR("Szabolcs Gyurko"); > +MODULE_AUTHOR("Anton Vorontsov "); And also this one. Thanks. --=20 An old man doll... just what I always wanted! - Clara --+tJVt8GoTANVf/9m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCZVf47QAKCRD2uYlJVVFO o0etAP9SgY3bzx/cimWhS/4zcERQn9QAUE305M86+AupreQdeAD/Vpi5jdF9ahGN NYDkY6/YfcM0vAf7sCO8EC3+OJRRcgA= =MrqQ -----END PGP SIGNATURE----- --+tJVt8GoTANVf/9m--