Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp672948pxk; Wed, 23 Sep 2020 12:57:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnePKPNw7EqXs1u1bLroNdM5aoGc4Y59J2BEWD4az2ZnWaCtgtzn12BLKdotDCtCCRqJLA X-Received: by 2002:aa7:d805:: with SMTP id v5mr998572edq.29.1600891078858; Wed, 23 Sep 2020 12:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600891078; cv=none; d=google.com; s=arc-20160816; b=o8CjuiMIdZ4Y5/SkMY/mfThVf1D2NS++krEqLRBTfr8jblvVkvqdyidHGIk0oiwbdd fC/RQPbM0/isUZ3PaQdTFCWno6VgEsXJQM63zDH2V+k+yQ7blGJiPV+UKaVBhJ3g2197 eBB/0fvkYUE1S/cvV9CY/5d2jzU2LSU7AOwtzckJXaWbbPp/BxmioaGLG/noGyI5X4hO WCx1pJaf3mHOHw7JQTRGalO5hekKC59+K1tih9EVlIrIN6liIlF6O638NUm05UaXTEwH ufLaMCUjbou3qPEzPdoQOjUsdhQdqxKW45syHpRLyxK+zEyFZz2FxtLoWD2c7JNjMXbn TMvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=EgOu6x7GAwdUxnLx9ooW1ej1nC+rfMpk0MLLw6MQEuI=; b=L5JbHZHg57TmzVCZM/yvqw1lEEXglGnwYX8yk0mREunKCdosQs3siTuqcS5+6xI3Fm +ChOPM42pe5AOKjqoPTkYbBJgJoXATGcBki3TZnnqVzxw67MRu4PRkoJIBDSiRkQex+L lfKr1pnxr4SHjY7VeiYXGl3jbgT6ofIdqp4HTmtX8MUzbQ3xwPAyOJ9rSP3M0VN8JoYj 7nVuLXk9NAPLubJKciG5gGhAte4UwH/vwYxtmUvNjga3CTUhUfRCiFrtWP/LMqXmZL3X cMjfEF3/OOZrxbS2CSM02yACvjBBazWUAF2jHHXiUu4VwID7VynsjxUjGoCjWe6VleON 8PAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0Hg7LsU8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mb24si597578ejb.583.2020.09.23.12.57.34; Wed, 23 Sep 2020 12:57:58 -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=@kernel.org header.s=default header.b=0Hg7LsU8; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726466AbgIWT4T (ORCPT + 99 others); Wed, 23 Sep 2020 15:56:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:43586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726199AbgIWT4T (ORCPT ); Wed, 23 Sep 2020 15:56:19 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AA4292193E; Wed, 23 Sep 2020 19:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600890979; bh=mxvUIgxbMdOtM98Zj0ZF4L5vRovN1v+avpv1s/xqETk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=0Hg7LsU8BJaPaTkZjRyO168stZhxPxy5L+BIuGGKVpPqKebCgwK35jGTbQ/fFiZpj lnQqnysuvnqBYqfeu84vA9XijGkgbLex6ar7JAkqJ1NvPisVPQ8OpaWJSow79mtI+J FnYrp6EVr8WRm7CbIzbkuru4hwgQNPSkO5/KFaHU= Date: Wed, 23 Sep 2020 20:56:13 +0100 From: Jonathan Cameron To: William Breathitt Gray Cc: Rikard Falkeborn , Jonathan Cameron , Kamel Bouhara , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] counter: microchip-tcb-capture: Constify mchp_tc_ops Message-ID: <20200923205613.74061332@archlinux> In-Reply-To: <20200923014838.GA3267@shinobu> References: <20200922201941.41328-1-rikard.falkeborn@gmail.com> <20200923014838.GA3267@shinobu> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 22 Sep 2020 21:48:38 -0400 William Breathitt Gray wrote: > On Tue, Sep 22, 2020 at 10:19:41PM +0200, Rikard Falkeborn wrote: > > The only usage of mchp_tc_ops is to assign its address to the ops field > > in the counter_device struct which is a const pointer. Make it const to > > allow the compiler to put it in read-only memory. > > > > Signed-off-by: Rikard Falkeborn > > Acked-by: William Breathitt Gray Applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke at it. I'm not sure if I'll get another pull request out this cycle, so it may have to wait for 5.11. Thanks, Jonathan > > > --- > > drivers/counter/microchip-tcb-capture.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/counter/microchip-tcb-capture.c b/drivers/counter/microchip-tcb-capture.c > > index b7b252c5addf..039c54a78aa5 100644 > > --- a/drivers/counter/microchip-tcb-capture.c > > +++ b/drivers/counter/microchip-tcb-capture.c > > @@ -253,7 +253,7 @@ static struct counter_count mchp_tc_counts[] = { > > }, > > }; > > > > -static struct counter_ops mchp_tc_ops = { > > +static const struct counter_ops mchp_tc_ops = { > > .signal_read = mchp_tc_count_signal_read, > > .count_read = mchp_tc_count_read, > > .function_get = mchp_tc_count_function_get, > > -- > > 2.28.0 > >