Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp771173lqs; Tue, 5 Mar 2024 16:39:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWmWz3MEisGN7FNJ2Gym0M5RQJZ4nUU8An+vU8UmMHLh5JLSjEGT/+jhsT3JzteBEhz9OIQ7ecV2r9u+IRTBNv7yLvvSF4fYV0DKTg1iw== X-Google-Smtp-Source: AGHT+IEf3Cehcc+H0uQFG7Qndfcl4cF1J+Nyz/MLUU/w82C+MukII6zzQ9Iqjod2FVpD9Nfkbi0S X-Received: by 2002:a0c:cd10:0:b0:68f:ea42:4404 with SMTP id b16-20020a0ccd10000000b0068fea424404mr3581751qvm.27.1709685586902; Tue, 05 Mar 2024 16:39:46 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709685586; cv=pass; d=google.com; s=arc-20160816; b=Kx7EgfDfAVRulnffA2AEm7nm7gIdNt4wK1fgx1NBJnyoLCKG+UUlSaMIq3/h969He5 Ujv5JQ70LmH448Wa9jbPTSu/C7giZDp5IeUSMA4p7UAepj+Skb18OhLadhvVBw+MboOq dhCBfNnA4NhyueGu7FnQhmvnHJYkfwlUPiHlZDaKq45TWo563y3Vp4tCfe2ge+64lF0Y BzH93L9aTb+rybkLlcZ8jSNZ71lLkwrLIF0dZ8ktPnFyVoUCNF1smTSO4YwpZMx3qgVW mIe93yAw93tcY3ex40pH/AlplDTl9Jcj3O0VhCrUJGqwBPYQHT0mfDouBzmZK/XJanMT h4ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=1YzpsBUm75FGqnB2WjjtIc9zezGDAujuNcamHCdCLZs=; fh=y6RTuAplwTQxFKt27kVXqZAtWN/aDi225HLB4X+LteA=; b=CbbfzHNpKywZ/DAH1nr11EnVMX2k/ao9xqBfzxzakTCm/O4F18PRq5WxRMcmaBnE9A s3vcGb0IbC5rDX4fGdVGRjS9XzMd5x0gS6G14ZIoOUolIfh5ESkWiNy74UaQ9uidN5Gw 7faN3KsSqJ/j4ApBMrYZ7SbSWF1szi8C7ykIOgXMzm7Vg6eCRUTVhLldR4gWB6FtwPYp edCR0UShRn8ylYuy5syNBItaATPdWKx2fNIGNf5M70Voo85pw6ShqcDTuNlRfim+HKaX PGJiYpPYCCF9BjcTMDgp4QtoYx9cTRkNc/M+3hg+JpYRLIMQuq9/liT1i/23HpADIrXO ju5A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=yuY25cTV; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-93173-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93173-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id kc24-20020a056214411800b0069004ec1263si13556333qvb.300.2024.03.05.16.39.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 05 Mar 2024 16:39:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-93173-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=yuY25cTV; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-93173-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-93173-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9FE4D1C23579 for ; Wed, 6 Mar 2024 00:39:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 466FC6FAF; Wed, 6 Mar 2024 00:39:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="yuY25cTV" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0896A6FAD; Wed, 6 Mar 2024 00:39:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709685578; cv=none; b=DMP2mpacRLoZvd9cE0iy5IbL/h23g4/WYjI23MwJsqs/JxHsa9gr3W4ufYsXAEPB/8yDIAyfweoZUybOScKOwwMDfKm9fiyzkEH8tuwDbX8v6gRxG1QoyQdJRHsid5WxKNB8YpUBypwQ8Ivk0Gw7EjbxB4Oe4oiG/3r1EekU4a8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709685578; c=relaxed/simple; bh=bOWzR8XghyOe5aPHPUVDP6xFazsPPhArmXtjefaKB08=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pwO9orKN3BP+8XaHat3et4fnBTbQ9ap2nxZRGMTlBqQQK9gme4o5jpNmW10SzYilsIIoiZ/3Jcsh4bs5xXlNQSI35rbj4gLft/903tIf+5lSoMebFoVvA5v4+UKB7pkqiNNzuDTbdwGUg4A6NSpX7dptf+iue8KdSjk+8TSdIeo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=yuY25cTV; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1709685575; bh=bOWzR8XghyOe5aPHPUVDP6xFazsPPhArmXtjefaKB08=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=yuY25cTVwO7esko/gQb3NvL0qOEjt+bfU8JcFtxOyRhFHh6+FPMzZN/SwWVL5hu8P 8m7fT6MBmcOmHuVJ1If7gTJEJK1XCj1qtEf9QsWmGovrpNOKvVjLVl1nsSft9XXvXJ XxR1S3x13Q/Zw4U7aO6muOf/fav/vk0U58fOzhON21k0Vurx2djdfZdzThrdOeg2ao ZekyvzIkKin1UAAa5ionPvfA6pfkIHLT2QMUEdZpUIQb8kR974TpksCdva5oYCpWUi hfR4wqIwnMhHSqVuSSsE7H9NyiXbVAZEz1kZlgmdtsFbIYyWtQVlE+Fd32ZEsBUm97 m6/BP6hO/o/mw== Received: from mercury (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: sre) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 2D12B3781FDF; Wed, 6 Mar 2024 00:39:35 +0000 (UTC) Received: by mercury (Postfix, from userid 1000) id 98E8D1061BCB; Wed, 6 Mar 2024 01:39:34 +0100 (CET) Date: Wed, 6 Mar 2024 01:39:34 +0100 From: Sebastian Reichel To: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= Cc: Hans de Goede , Konrad Dybcio , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 4/4] power: supply: test-power: implement charge_behaviour property Message-ID: References: <20240303-power_supply-charge_behaviour_prop-v2-0-8ebb0a7c2409@weissschuh.net> <20240303-power_supply-charge_behaviour_prop-v2-4-8ebb0a7c2409@weissschuh.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bdnqhngrcjnbq5uu" Content-Disposition: inline In-Reply-To: <20240303-power_supply-charge_behaviour_prop-v2-4-8ebb0a7c2409@weissschuh.net> --bdnqhngrcjnbq5uu Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Sun, Mar 03, 2024 at 04:31:16PM +0100, Thomas Wei=DFschuh wrote: > To validate the special formatting of the "charge_behaviour" sysfs > property add it to the example driver. >=20 > Signed-off-by: Thomas Wei=DFschuh > --- Thanks for your patch. > drivers/power/supply/test_power.c | 31 +++++++++++++++++++++++++++++++ > 1 file changed, 31 insertions(+) >=20 [...] > +static int test_power_set_battery_property(struct power_supply *psy, > + enum power_supply_property psp, > + const union power_supply_propval *val) > +{ > + switch (psp) { > + case POWER_SUPPLY_PROP_CHARGE_BEHAVIOUR: > + battery_charge_behaviour =3D val->intval; > + break; This should check if user supplied val->intval is valid, otherwise LGTM. -- Sebastian --bdnqhngrcjnbq5uu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmXnuz0ACgkQ2O7X88g7 +prxlw/+MZ7eBwygN9cFXZWBZu9B0eFeUfDek+fFVvWShalFLghtMR2ltdjagntC hZv5MCqSKPkONEsZ9H9R9K0H0vlArdN1UL5/R9yll9vE6ym+Vohu0VocoxxjQFMy W+ecSgV3mdeBe/OMIlgW9IKndo+VUQW4jDwLhTvj4FlNRaqEEQqa4uX+UlCACq3k UFSriJqcAkGwHyXtS7/dLRfDSK8nebUgerf6puohc0MIYYCNrqJsEVNb1UMPBdy4 mTEjE/VIpU8VmbK31AfFvlcIEsTZcOJG/YcgN2Yje6GSleEYl/bAXdRQk30XQiTm zUFNcfv5vK4bxmCuBOSFi+8PlW24A5e/oPTKDHWe01SWaYJFj6iUOi+Pnm4DOsAA P7Ktr26rHFvq796UrAbEPyJL22+m17uS/mKrUKuoQTD9P1eNHE7RnRbBuq+SffzI wyG7BdFWFFH0fPlK5oL3yKn7tPF4J5DF00ro6PjHkkiMQpVPCV7HU9g6Awjy2MuG JHxA488cO4D9O3/NORGI5OtRi/rmAKXio4Cw4G2h6CBzuJnXWb0aHrmyk0VyTNwB gfBRMm6xmNYhpmJK3/XbbWvglgRelD/t3BV0US2mmHRntZbAFCZaiW/wxK0F0mMo F8qnlHjdNsjmBnlxjYMNPG3DfB39HZqxoRDfb/MgcmlgRmrWzso= =D3ng -----END PGP SIGNATURE----- --bdnqhngrcjnbq5uu--