Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 216FAC433F5 for ; Mon, 29 Nov 2021 22:48:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236316AbhK2Wvk (ORCPT ); Mon, 29 Nov 2021 17:51:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235660AbhK2WuJ (ORCPT ); Mon, 29 Nov 2021 17:50:09 -0500 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 477B0C08E835 for ; Mon, 29 Nov 2021 11:02:29 -0800 (PST) Received: by mail-ed1-x533.google.com with SMTP id x6so75867876edr.5 for ; Mon, 29 Nov 2021 11:02:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vHIcZ4ajJxCRfp6TfnnK3m4uOLsqq/PnoEl1uZz7+2M=; b=LHqpOuZ9bbPhm6BAEqNPiFiqNjqndKV4zQZgjWjGtAQXoprCwWKIcC6/fyMFaSBQ6N k+M+udaeBPxQSV/sqCPS8gOOdZr6WhSxUEYATlnHbqTy8naDBiledHzWmwVMy0eMdV+o X5fV9bcsNEZcXKYY4M9flL9DfU4JNrNc6Wi7tlanU/9oSP6XRf2M7zmjO2MmRwlLoDOr l81B3g2OMpp7EXMM9gbQ8nJGhZw5Emg0VQ/KMNogBPSu8XxQJOS5ddNYZXRxAQ4FwNN+ lE8Wv32IPzfNJ+SGajHs4GHojQXuYFahcQ72Q/jolrV3T85hGnbS+/eM/1yqCW1k9cfP kAaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vHIcZ4ajJxCRfp6TfnnK3m4uOLsqq/PnoEl1uZz7+2M=; b=torUjWgKmM/jZYZgk6IgQeSRZEE2yAjZFDCwPpQYRHJkMnhQiyFkR/1qNHU0xa/CKR Chau//yB+Vq/1yhkIHGk2keW9Q6THU+ricItUyf3HwbLBZsN6WhSm3CtNLSHKSWR/cit 27xFASCnI66dFUxU2CXRLVWfL0vq/6Xk+ScyrpRfPOaxSLVdcSPau2/8/sIrp19n9Npj a9EsGXWC1FowZUBFgYTlxhwiqSIlgTylj+vf9Ywze8dr4ML8E7Evhad3W3Q9DIcQwyL5 UdxleIEiRpyQr2fn6cSY1PFQC/KYGKtfvNYJSkuevIEHLMw+V+yBoQ632Z+0KblVz28h Jg8g== X-Gm-Message-State: AOAM531Ue8a0ZUHI5aC4nhrCl760ba5S6YT9WyJXkMLjTv+OwMpuEFgO MWysa6dEI5109jtDWs4mgYlD95jiuRe6kCt6/L0= X-Google-Smtp-Source: ABdhPJxGlKZy56+YMwTdyV8+MSNj2EB5bGzBFj/T14hqS9VsMurjSEHNZMxWqn+sj4E8NhGcq44MS8KxUYhtEUSU9i4= X-Received: by 2002:aa7:c846:: with SMTP id g6mr76715007edt.75.1638212547798; Mon, 29 Nov 2021 11:02:27 -0800 (PST) MIME-Version: 1.0 References: <20211128201916.10230-1-rikard.falkeborn@gmail.com> In-Reply-To: <20211128201916.10230-1-rikard.falkeborn@gmail.com> From: Christian Gmeiner Date: Mon, 29 Nov 2021 20:02:16 +0100 Message-ID: Subject: Re: [PATCH] drm/etnaviv: constify static struct cooling_ops To: Rikard Falkeborn Cc: Lucas Stach , David Airlie , Daniel Vetter , Russell King , The etnaviv authors , DRI mailing list , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am So., 28. Nov. 2021 um 21:20 Uhr schrieb Rikard Falkeborn : > > The only usage of cooling_ops is to pass its address to > thermal_of_cooling_device_register(), which takes a pointer to const > struct thermal_cooling_device_ops as input. Make it const to allow the > compiler to put it in read-only memory. > > Signed-off-by: Rikard Falkeborn Reviewed-by: Christian Gmeiner > --- > drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > index 06bde46df451..37018bc55810 100644 > --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c > @@ -1658,7 +1658,7 @@ etnaviv_gpu_cooling_set_cur_state(struct thermal_cooling_device *cdev, > return 0; > } > > -static struct thermal_cooling_device_ops cooling_ops = { > +static const struct thermal_cooling_device_ops cooling_ops = { > .get_max_state = etnaviv_gpu_cooling_get_max_state, > .get_cur_state = etnaviv_gpu_cooling_get_cur_state, > .set_cur_state = etnaviv_gpu_cooling_set_cur_state, > -- > 2.34.1 > -- greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy