public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: Jean Delvare <jdelvare@suse.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>
Subject: Re: [PATCH] i2c: i801: Annotate apanel_addr as __ro_after_init
Date: Mon, 15 Apr 2024 23:20:31 +0200	[thread overview]
Message-ID: <b23344c6-7bca-4b83-a5de-5718dcfcff76@gmail.com> (raw)
In-Reply-To: <hezbbhcsjewtn7xbpfsbp34qczx5xw7swk4pthic4bguj6cumo@umb5mkckaxj6>

On 15.04.2024 23:05, Andi Shyti wrote:
> Hi Heiner,
> 
> On Fri, Apr 12, 2024 at 12:21:58PM +0200, Heiner Kallweit wrote:
>> Annotate this variable as __ro_after_init to protect it from being
>> overwritten later.
> 
> What is the reason behind this patch? Where is the risk of
> overwriting this variable?
> 
The annotation makes clear that this variable is to be written
by init code only, w/o having to check all usage in the driver.
Currently the variable isn't written later, however the annotation
protects from any such potential attempt in the future.
The original commit message has more arguments for using this
annotation. https://lwn.net/Articles/676145/

> Andi

Heiner


  reply	other threads:[~2024-04-15 21:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-12 10:21 [PATCH] i2c: i801: Annotate apanel_addr as __ro_after_init Heiner Kallweit
2024-04-12 10:30 ` Wolfram Sang
2024-04-12 10:48   ` Heiner Kallweit
2024-04-12 10:57     ` Wolfram Sang
2024-04-15 21:05 ` Andi Shyti
2024-04-15 21:20   ` Heiner Kallweit [this message]
2024-04-16 22:46 ` Andi Shyti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b23344c6-7bca-4b83-a5de-5718dcfcff76@gmail.com \
    --to=hkallweit1@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=jdelvare@suse.com \
    --cc=linux-i2c@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox