From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 48AA31CFEDF; Tue, 3 Sep 2024 07:04:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725347096; cv=none; b=S012kAYHRrEu/NurFrVsc5ces7rCQ8SBa1ZI+O3A1MsI7dabU18n3FOe668dLedHG6ufcq7c1HRfsdN+NkXUOHnvAPFH89YGQcM3jRZZ8CIh7TGBuwzoJ3IhfBYtUbUCrCayDvbIvjelLLipa4sGNCuPInx9nJIW6qwNDWJhvoY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725347096; c=relaxed/simple; bh=KfpUJwPIkdByyK2eQ8JyzjZah5wqNhIliyGW7R4pti0=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=eL1fxtRyzFAROfsnFxB8R9erL0snD0NE9RMCFSOGMK3sIQwHDKAXvZn3SY0DjnxgaXTQmzYgphSWfHUBAyRMmncF01ZfJLCVEOpC5hLYRFvZjal78CgxEvPXFJA/duyArt7F+8UEEQGMjpc2NwJntu/MtBMbYf2V+9Gva4wJHV4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wjtvTAJc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="wjtvTAJc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E3FFC4CEC5; Tue, 3 Sep 2024 07:04:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1725347095; bh=KfpUJwPIkdByyK2eQ8JyzjZah5wqNhIliyGW7R4pti0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=wjtvTAJc1Xo+M62VHxjD7poicRHGhMge/exUMWMO+hA/aFjeuvc6b94ebwwS9oFai YLTyEqKqSHsEDs397XoDynvmjE6DBCd1tB+zkAc0JmqYSje8X98CjVOznC+0k4CdNL jFREm1GEf476vvHy4CO9OrtTB/KAq+WXbpPTgVOg= Date: Tue, 3 Sep 2024 09:04:52 +0200 From: Greg Kroah-Hartman To: Hans de Goede Cc: Sebastian Reichel , Thomas =?iso-8859-1?Q?Wei=DFschuh?= , MyungJoo Ham , Chanwoo Choi , Heikki Krogerus , Vinod Koul , Kishon Vijay Abraham I , Enric Balletbo Serra , Andrey Smirnov , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, linux-phy@lists.infradead.org Subject: Re: [PATCH 6/6] power: supply: Change usb_types from an array into a bitmask Message-ID: <2024090340-mumbo-worsening-9a55@gregkh> References: <20240831142039.28830-1-hdegoede@redhat.com> <20240831142039.28830-7-hdegoede@redhat.com> Precedence: bulk X-Mailing-List: linux-pm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240831142039.28830-7-hdegoede@redhat.com> On Sat, Aug 31, 2024 at 04:20:39PM +0200, Hans de Goede wrote: > The bit_types array just hold a list of valid enum power_supply_usb_type > values which map to 0 - 9. This can easily be represented as a bitmap. > > This reduces the size of struct power_supply_desc and further reduces > the data section size by drivers no longer needing to store the array. > > This also unifies how usb_types are handled with charge_behaviours, > which allows power_supply_show_usb_type() to be removed. > > Signed-off-by: Hans de Goede Nice! Reviewed-by: Greg Kroah-Hartman