Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp361383pxb; Wed, 22 Sep 2021 04:03:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj7Al2Buk2DFIE7KNgMfX8vE7IVICQhE2CFvj0Eibm6m4M2M0X5fhoCEyH1r2+TGCW5rYC X-Received: by 2002:a05:6e02:20e8:: with SMTP id q8mr23367938ilv.202.1632308588412; Wed, 22 Sep 2021 04:03:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632308588; cv=none; d=google.com; s=arc-20160816; b=q+epiNy8NU5p/d7c7IM2wxdubHUIOq43gsZsxAKfg/yC6BnkjTs+xA2sfk1h5dPVuG a/O7SgUKiFPBqh+RXzzlzSV61FO9cBIPWPb2LcJE5RvrOUN5LaDzwBUevgsZGEsqWinD pLbTl/Ucm2AgpBeORmB8gv+2/lQnT1BrK59lTSLYkLuIVST5msa22keR/jjNRxNKxSjL kGeYVy0lS/D67Y6a6i5Zm/xymTZxJu0snas+DQtMh+KCCPR7p3iI+rZl3f/UC0+RFL1d 8VmEWiQd8v0MCYefulBgK39nkfHU4ZHslnqC2SLHcuAP3Ki6QoY3TGfszpS/+fIs6yJw fWHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ZHWrmmWN4TZxD38ZjRTWdMilYnPPW7deeIc6pKKkvs4=; b=UJERYmAERKz8LCOaS4XvEBp2lA8G/f0NQy5WrMqMeicH7dS+etB2R4PObmykfcyzsA FZDk09daBsEXIPNbqh8TdAIo4GA/rwP0uEM745zBbx80NJOH1E7BYs2nOBC5TK9N1pGX Z25zy4h7nu+aGXI/fO3hW1QLe7SMuc9fas3Q/kBRAZllxq9r157RBH7rLg6YyrzTfZWe QRwytl9Bstkta7uU1jW75beGm4PZaQZUgx85cBq+sIhvMyoNvmNuqUvG42zOb1BKBIF7 PnYATTvKQ8h0QeY3NNa7XwN0lDx5NW5M3w81zV+Z8stIwWqLvZjlgzuOIGDcXRBFIDQF 9m2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=OpjZWWUb; spf=pass (google.com: 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r1si2129424ilg.125.2021.09.22.04.02.55; Wed, 22 Sep 2021 04:03:08 -0700 (PDT) Received-SPF: pass (google.com: 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; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=OpjZWWUb; spf=pass (google.com: 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235222AbhIVLDO (ORCPT + 99 others); Wed, 22 Sep 2021 07:03:14 -0400 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:61678 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235044AbhIVLDN (ORCPT ); Wed, 22 Sep 2021 07:03:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1632308504; x=1663844504; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=ZHWrmmWN4TZxD38ZjRTWdMilYnPPW7deeIc6pKKkvs4=; b=OpjZWWUbdii/4G3rTZMEYYdMhOhwhdpMRBl8umCOqzZ9/hiSkr+PHUzb hN7fVsecfnjcDp6bghDFAGreASmXLmrtYLda93OAFkvjY08CXoCVDntrO X6naoGvCwUK/H0NTAkYWjxP1HaynYhSeehplo5rQwSxIFpUUZRxr5UkUI o=; X-IronPort-AV: E=Sophos;i="5.85,313,1624320000"; d="scan'208";a="143707804" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-iad-1d-1c3c2014.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-6001.iad6.amazon.com with ESMTP; 22 Sep 2021 11:01:36 +0000 Received: from EX13D01EUB001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-iad-1d-1c3c2014.us-east-1.amazon.com (Postfix) with ESMTPS id 851B1CE3C1; Wed, 22 Sep 2021 11:01:35 +0000 (UTC) Received: from [192.168.18.219] (10.43.162.186) by EX13D01EUB001.ant.amazon.com (10.43.166.194) with Microsoft SMTP Server (TLS) id 15.0.1497.23; Wed, 22 Sep 2021 11:01:31 +0000 Message-ID: <04e09b28-3b0d-ed64-8bec-f07bc0ddf88e@amazon.com> Date: Wed, 22 Sep 2021 14:01:26 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: Re: thermal: thermal_mmio: Constify static struct thermal_mmio_ops Content-Language: en-US To: Rikard Falkeborn , Daniel Lezcano CC: Zhang Rui , Amit Kucheria , Ronen Krupnik , , References: <20210920203849.32136-1-rikard.falkeborn@gmail.com> From: "Shenhar, Talel" In-Reply-To: <20210920203849.32136-1-rikard.falkeborn@gmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.43.162.186] X-ClientProxiedBy: EX13D14UWB003.ant.amazon.com (10.43.161.162) To EX13D01EUB001.ant.amazon.com (10.43.166.194) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The only usage of thermal_mmio_ops is to pass its address to > devm_thermal_zone_of_sensor_register(), which has a pointer to const > struct thermal_zone_of_device_ops as argument. Make it const to allow > the compiler to put it in read-only memory. > > Signed-off-by: Rikard Falkeborn Acked-by: Talel Shenhar > --- > drivers/thermal/thermal_mmio.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/thermal/thermal_mmio.c b/drivers/thermal/thermal_mmio.c > index ded1dd0d4ef7..360b0dfdc3b0 100644 > --- a/drivers/thermal/thermal_mmio.c > +++ b/drivers/thermal/thermal_mmio.c > @@ -34,7 +34,7 @@ static int thermal_mmio_get_temperature(void *private, int *temp) > return 0; > } > > -static struct thermal_zone_of_device_ops thermal_mmio_ops = { > +static const struct thermal_zone_of_device_ops thermal_mmio_ops = { > .get_temp = thermal_mmio_get_temperature, > }; > > -- > 2.33.0 >