From patchwork Tue Oct 30 15:15:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 10661271 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4827314E2 for ; Tue, 30 Oct 2018 16:18:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2F2FB287A2 for ; Tue, 30 Oct 2018 16:18:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 232E22A2F7; Tue, 30 Oct 2018 16:18:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D5A94287A2 for ; Tue, 30 Oct 2018 16:18:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XRqj4DfmJ+9wiM0mmsV5dxWjwL4LGWCn+U3JRxc5Up4=; b=lRuVilvqO8kdTF4BxqdeSul8w4 wVwxYQvm2tpbR+yeN3FcTC2SeTSXbruLJEv15/LX4ONVC566sl6QfJ1qN7kM0d/Fi3twtP8FValRd sZOnDyWniEL/JSJNMJ0a1aOhQIRY58LQV5vRL2rg7Su4ApvW8cKOfhowLncrJmN7YK1XY06cuG0s2 ItylrDh2s4VF4Mi1lDDogj225GAHYOgiSQIKCPsOb6sqbOfwEmFpLGBS+BIiD2DM0aqntmfew8nGu uh7bxBmwhEcLVq6OEfwe83e7KEVSz5eoGHcfBXKbKfl6DEOxNcKYsognJGiOhKXe85Nup9YnFVaeP Q1FY9jRQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHWiQ-0004NS-NR; Tue, 30 Oct 2018 16:18:02 +0000 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gHWHw-0006rY-6R for linux-arm-kernel@lists.infradead.org; Tue, 30 Oct 2018 15:50:42 +0000 X-IronPort-AV: E=Sophos;i="5.54,445,1534802400"; d="scan'208";a="283843925" Received: from palace.rsr.lip6.fr (HELO palace.lip6.fr) ([132.227.105.202]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA256; 30 Oct 2018 16:50:20 +0100 From: Julia Lawall To: Markus Mayer Subject: [PATCH 2/2] thermal: broadcom: constify thermal_zone_of_device_ops structure Date: Tue, 30 Oct 2018 16:15:00 +0100 Message-Id: <1540912500-21941-3-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1540912500-21941-1-git-send-email-Julia.Lawall@lip6.fr> References: <1540912500-21941-1-git-send-email-Julia.Lawall@lip6.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181030_085040_559263_0379D010 X-CRM114-Status: GOOD ( 12.42 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Fainelli , linux-pm@vger.kernel.org, Daniel Lezcano , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Eduardo Valentin , bcm-kernel-feedback-list@broadcom.com, Gregory Fong , Zhang Rui , Brian Norris , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The thermal_zone_of_device_ops structure can be const as it is only passed as the last argument of thermal_zone_of_sensor_register and the corresponding parameter is declared as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall Reviewed-by: Daniel Lezcano --- Unrelated to this change, is there a reason not to use devm_thermal_zone_of_sensor_register? drivers/thermal/broadcom/brcmstb_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -u -p a/drivers/thermal/broadcom/brcmstb_thermal.c b/drivers/thermal/broadcom/brcmstb_thermal.c --- a/drivers/thermal/broadcom/brcmstb_thermal.c +++ b/drivers/thermal/broadcom/brcmstb_thermal.c @@ -299,7 +299,7 @@ static int brcmstb_set_trips(void *data, return 0; } -static struct thermal_zone_of_device_ops of_ops = { +static const struct thermal_zone_of_device_ops of_ops = { .get_temp = brcmstb_get_temp, .set_trips = brcmstb_set_trips, };