All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Elise Lennion <elise.lennion@gmail.com>
Cc: sudipm.mukherjee@gmail.com, teddy.wang@siliconmotion.com,
	outreachy-kernel@googlegroups.com
Subject: Re: [PATCH] staging: sm750fb: Make variable read only after initialization.
Date: Mon, 17 Oct 2016 09:44:04 +0200	[thread overview]
Message-ID: <20161017074404.GA7010@kroah.com> (raw)
In-Reply-To: <20161017023216.GA17876@lennorien.com>

On Mon, Oct 17, 2016 at 12:32:16AM -0200, Elise Lennion wrote:
> Use __ro_after_init to protect variable, initialized in several steps,
> from overwrite during runtime.
> 
> Signed-off-by: Elise Lennion <elise.lennion@gmail.com>
> ---
>  drivers/staging/sm750fb/sm750.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c
> index 0663ec0..5c02ad8 100644
> --- a/drivers/staging/sm750fb/sm750.c
> +++ b/drivers/staging/sm750fb/sm750.c
> @@ -719,7 +719,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)
>  	return ret;
>  }
>  
> -static struct fb_ops lynxfb_ops = {
> +static __ro_after_init struct fb_ops lynxfb_ops = {
>  	.owner = THIS_MODULE,
>  	.fb_check_var =  lynxfb_ops_check_var,
>  	.fb_set_par = lynxfb_ops_set_par,

How did you "prove" or test this?  I don't think it is correct to mark
this code this way at all, but would be glad to reconsider the patch if
you can prove me otherwise :)

thanks,

greg k-h


  reply	other threads:[~2016-10-17  7:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17  2:32 [PATCH] staging: sm750fb: Make variable read only after initialization Elise Lennion
2016-10-17  7:44 ` Greg KH [this message]
2016-10-18 21:46   ` Elise Lennion
2016-10-19  6:00     ` [Outreachy kernel] " Julia Lawall
2016-10-19  6:48       ` Greg KH
2016-10-20 23:23         ` Elise Lennion

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=20161017074404.GA7010@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=elise.lennion@gmail.com \
    --cc=outreachy-kernel@googlegroups.com \
    --cc=sudipm.mukherjee@gmail.com \
    --cc=teddy.wang@siliconmotion.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.