DriverDev-Devel Archive on lore.kernel.org
 help / color / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: MugilRaj <dmugil2000@gmail.com>
Cc: devel@driverdev.osuosl.org, Kirk Reiser <kirk@reisers.ca>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	speakup@linux-speakup.org, linux-kernel@vger.kernel.org,
	Chris Brannon <chris@the-brannons.com>
Subject: Re: [PATCH] taging: speakup: remove volatile
Date: Fri, 22 May 2020 11:21:46 +0200
Message-ID: <20200522092146.6ijoma4re7ijai7a@function> (raw)
In-Reply-To: <1590138989-6091-1-git-send-email-dmugil2000@gmail.com>

Hello,

MugilRaj, le ven. 22 mai 2020 14:46:28 +0530, a ecrit:
> fix checkpatch.pl warning, which is Use of volatile is usually wrong: see
> Documentation/process/volatile-considered-harmful.rst

Yes, but the proper fix is usually not to just remove the volatile
qualifier, which will not fix anything and potentially break things.

Fixing this requires really understanding what is at stake here, between
the read_buff_add function and the use of synth_full(). That goes
through interrupt handlers, tty disciplines, and the actual behavior
expected by speakup. Not a simple task, henceforth :)

> Signed-off-by: MugilRaj <dmugil2000@gmail.com>
> ---
>  drivers/staging/speakup/speakup_decext.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/speakup/speakup_decext.c b/drivers/staging/speakup/speakup_decext.c
> index ddbb7e9..22baaeb 100644
> --- a/drivers/staging/speakup/speakup_decext.c
> +++ b/drivers/staging/speakup/speakup_decext.c
> @@ -21,7 +21,7 @@
>  #define SYNTH_CLEAR 0x03
>  #define PROCSPEECH 0x0b
>  
> -static volatile unsigned char last_char;
> +static unsigned char last_char;
>  
>  static void read_buff_add(u_char ch)
>  {
> -- 
> 2.7.4
> 
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-22  9:16 MugilRaj
2020-05-22  9:21 ` Samuel Thibault [this message]
2020-05-22  9:37 ` Greg Kroah-Hartman
2020-05-22 10:34 ` Dan Carpenter
2020-05-22 16:36   ` Joe Perches
2020-05-22 17:13     ` Samuel Thibault
2020-05-22 17:22       ` Joe Perches
2020-05-22 17:25         ` Samuel Thibault
2020-05-22 17:50       ` Dan Carpenter

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=20200522092146.6ijoma4re7ijai7a@function \
    --to=samuel.thibault@ens-lyon.org \
    --cc=chris@the-brannons.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=dmugil2000@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kirk@reisers.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=speakup@linux-speakup.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

DriverDev-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/driverdev-devel/0 driverdev-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 driverdev-devel driverdev-devel/ https://lore.kernel.org/driverdev-devel \
		driverdev-devel@linuxdriverproject.org devel@driverdev.osuosl.org
	public-inbox-index driverdev-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.linuxdriverproject.driverdev-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git