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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 636F6C433EF for ; Sat, 8 Jan 2022 15:32:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C19186B0072; Sat, 8 Jan 2022 10:32:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BC8F56B0073; Sat, 8 Jan 2022 10:32:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AB7536B0074; Sat, 8 Jan 2022 10:32:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0047.hostedemail.com [216.40.44.47]) by kanga.kvack.org (Postfix) with ESMTP id 97DEC6B0072 for ; Sat, 8 Jan 2022 10:32:08 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 4688D96F0A for ; Sat, 8 Jan 2022 15:32:08 +0000 (UTC) X-FDA: 79007510736.22.FA7E558 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by imf22.hostedemail.com (Postfix) with ESMTP id 5F33AC0011 for ; Sat, 8 Jan 2022 15:32:05 +0000 (UTC) From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=weissschuh.net; s=mail; t=1641655923; bh=g2GUnqBIvgrlm2SSNhFEdepbxYmhapOcA+pRXda4f2U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VUxVpgthQjA9cfO/00wfeJymujjw3rdZTh/x2Oufda0j2x7s0815Vnp7fZG7MQgcn V7qQVQpu5TXh7c3EjhynZTV21k/IdaWkqSbLf2L6MNrPuAeCeZ9RJlBKIMAmK9rdox 4EykuUT4OyA64k9YgcUn97+bzUmpR3a6AfxTz05c= To: Hans de Goede , Sebastian Reichel Cc: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= , kbuild-all@lists.01.org, "Linux Memory Management List" , "Thomas Koch" , =?UTF-8?q?Nicol=C3=B2=20Piazzalunga?= , linux-pm@vger.kernel.org, kernel test robot Subject: [PATCH] power: supply: Provide stubs for charge_behaviour helpers Date: Sat, 8 Jan 2022 16:31:58 +0100 Message-Id: <20220108153158.189489-1-linux@weissschuh.net> X-Mailer: git-send-email 2.34.1 In-Reply-To: <487dd7a3-8f29-de9a-2612-65fe895e676f@redhat.com> References: <487dd7a3-8f29-de9a-2612-65fe895e676f@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=ed25519-sha256; t=1641655915; l=1294; s=20211113; h=from:subject; bh=g2GUnqBIvgrlm2SSNhFEdepbxYmhapOcA+pRXda4f2U=; b=0lEQ05CNE2jyIe1bp1ljJaKx/Kart21q038dg+1tpd03/8qx/K317Eb82rVIgZI4k9qTu2KTWAx0 XYw4Fx5tC1V1fJElrrnc5YnGAq3o3v/Yjk3Gy14Bh+RRwcgAxhJw X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=9LP6KM4vD/8CwHW7nouRBhWLyQLcK1MkP6aTZbzUlj4= X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 5F33AC0011 X-Stat-Signature: jkyr56wpiykftyzjxdw5iot47s8q77h6 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=weissschuh.net header.s=mail header.b=VUxVpgth; spf=pass (imf22.hostedemail.com: domain of linux@weissschuh.net designates 159.69.126.157 as permitted sender) smtp.mailfrom=linux@weissschuh.net; dmarc=none X-HE-Tag: 1641655925-319353 Content-Transfer-Encoding: quoted-printable X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: When CONFIG_SYSFS is not enabled provide stubs for the helper functions to not break their callers. Fixes: 539b9c94ac83 ("power: supply: add helpers for charge_behaviour sys= fs") Reported-by: kernel test robot Signed-off-by: Thomas Wei=C3=9Fschuh --- include/linux/power_supply.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index d92de670d6a7..e218041cc000 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -723,6 +723,21 @@ ssize_t power_supply_charge_behaviour_show(struct de= vice *dev, char *buf); =20 int power_supply_charge_behaviour_parse(unsigned int available_behaviour= s, const char *buf); +#else +static inline +ssize_t power_supply_charge_behaviour_show(struct device *dev, + unsigned int available_behaviours, + enum power_supply_charge_behaviour behaviour, + char *buf) +{ + return -EOPNOTSUPP; +} + +static inline int power_supply_charge_behaviour_parse(unsigned int avail= able_behaviours, + const char *buf) +{ + return -EOPNOTSUPP; +} #endif =20 #endif /* __LINUX_POWER_SUPPLY_H__ */ base-commit: b8170452cd5121b11a5726e3ea8dbdfc2d74e771 --=20 2.34.1