From patchwork Thu Apr 2 14:57:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 11470967 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C35C092A for ; Thu, 2 Apr 2020 14:57:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0D5D20757 for ; Thu, 2 Apr 2020 14:57:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="Mi0V/TvN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388689AbgDBO5c (ORCPT ); Thu, 2 Apr 2020 10:57:32 -0400 Received: from rere.qmqm.pl ([91.227.64.183]:19534 "EHLO rere.qmqm.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388781AbgDBO5E (ORCPT ); Thu, 2 Apr 2020 10:57:04 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 48tR3y3r2gzpX; Thu, 2 Apr 2020 16:57:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1585839422; bh=K+vbcp79f0yG60D3y6nK9BE+zeYjqGJsmkCt6t37wr0=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=Mi0V/TvNKwA1OLrLq3LGyPRuGDs77F1SP7rPgrZKFFOXlPOdjDMIsD9EHg5ADdUuO ExdV36+kU3N3uloYaKuKi0TDUiR0TPDJTdqZv5/4je2ujMN/jmkYnmYqbgR+Cw5PR5 AxOxyMn89Z2AyD77CgmVk7KN3WCLJiOWfMRXZUHV9AUfatiQcwDmh+GkUA6b8Xhmu9 1VshBE7unV6uiVXimKYQHNBLZH2LgKLw0SHbWagLYkinCwVmOroaPBsenlfUCGPptK sXUuGRKnnin97NRusN1Q5DzIaV+pZogkle33k+9pcel22pVUw+c7yV1oKRf24NyWAO 0Vuip3IDQmDVw== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.2 at mail Date: Thu, 02 Apr 2020 16:57:02 +0200 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH 2/7] power: supply: core: allow to constify property lists MIME-Version: 1.0 To: Andrey Smirnov , Guenter Roeck , Sebastian Reichel Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Since tables pointed to by power_supply_desc->properties and ->usb_types are not expected to change after registration, mark the pointers accordingly Signed-off-by: Michał Mirosław Reported-by: kbuild test robot Reported-by: kbuild test robot --- include/linux/power_supply.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index dcd5a71e6c67..6a34df65d4d1 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h @@ -223,9 +223,9 @@ struct power_supply_config { struct power_supply_desc { const char *name; enum power_supply_type type; - enum power_supply_usb_type *usb_types; + 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; /*