Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp125017ybz; Wed, 15 Apr 2020 05:47:59 -0700 (PDT) X-Google-Smtp-Source: APiQypJDQDisotIrCGf1WMJ8JAAuhYlEt1399j5RF3PJQ+iVWYQ4DIIdbMWK+3P7eCtgZYqKZKnS X-Received: by 2002:a17:907:43c2:: with SMTP id i2mr4851796ejs.185.1586954878948; Wed, 15 Apr 2020 05:47:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586954878; cv=none; d=google.com; s=arc-20160816; b=hLEN/YU2zxD/dUaGsY3d84K27OQFfc83O6dMClD3ANkRdxPk7so9Fv2eXX/YeooHTs IviAAGP61BUheIfR0Ms7vDGeh4b2cXEBVWkHcSEtvV/pAQ0bPqE3u0EgGBRtDjzjw8sG kVJ1iiC5J80xnZkQu5OhGMolZfjwmrFbM7oQoWEFk2Ybe8fRDeWmveDdKUXbrDtuYUcv /fIb3uRkDZGqWcX96pKrUGuZ9VPT/Pt+AgHlIznizz4gS9nv0BDsXGbklE+UQHJLNU0A zo8Ch5lDlkxCVFkjogkcB634oXIhLg22MBcY6fUPS4jTdE/RkBEQd+qCFn7mp1w5F+MF 99Dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=qE6VxXNVny126SGwK/ZQaENaon+nhmYYUF70aj1LC1Y=; b=JPo+cfLfBJk0FObaUdcCjXPpYkKlEQ2awZc8CsFZzMRixcZoOJCLmrG64GmZm0LTJ0 lAxNfsEnwaYDSrM9wrbiHw4Uy2lRnkQhXwauPqSBJ3l1Ub3PLCwECqRf11svPZqOY6Ti r19BfBWOtNYc5RjAjrlDviQv6/SqRaRfmkH2qk1XOC1QQaTJnr8Wnj4DCOYTGnG3EJN+ sd/Ru0TwLoUSeZlYyxELydLkuXMpsLSst3yLHhkziIbAegUEhkF2jw0/zOaCRAA5J60P Do5lYW0YpjDMHk0bQhE2pQA/ntzjKJdfrYnZoXwY1O8wkV5SM6EePHUF7PVcWygzCWrs rHbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s16si9888742ejr.170.2020.04.15.05.47.31; Wed, 15 Apr 2020 05:47:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391152AbgDNP56 (ORCPT + 99 others); Tue, 14 Apr 2020 11:57:58 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:45264 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732332AbgDNP5t (ORCPT ); Tue, 14 Apr 2020 11:57:49 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id D5F312A04F7 Subject: Re: [PATCH 4/4] power: supply: core: Constify properties To: Sebastian Reichel , Sebastian Reichel Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com References: <20200413183853.1088823-1-sebastian.reichel@collabora.com> <20200413183853.1088823-5-sebastian.reichel@collabora.com> From: Enric Balletbo i Serra Message-ID: <48f5fbce-2eb3-a4dc-8f0f-bde0be0bea6f@collabora.com> Date: Tue, 14 Apr 2020 17:57:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200413183853.1088823-5-sebastian.reichel@collabora.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Sebastian, On 13/4/20 20:38, Sebastian Reichel wrote: > properties is a list of properties supported by the > driver. It is not modified by the power-supply core > and drivers are not supposed to change it once the > list has been registered. Let's mark it as const for > improved security. > > Signed-off-by: Sebastian Reichel Reviewed-by: Enric Balletbo i Serra > --- > include/linux/power_supply.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h > index 0392c9cc8f1c..6a34df65d4d1 100644 > --- a/include/linux/power_supply.h > +++ b/include/linux/power_supply.h > @@ -225,7 +225,7 @@ struct power_supply_desc { > enum power_supply_type type; > const enum power_supply_usb_type *usb_types; > size_t num_usb_types; > - enum power_supply_property *properties; > + const enum power_supply_property *properties; > size_t num_properties; > > /* >