public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vikul Gupta <guptav@linux.vnet.ibm.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Cc: Lior Dotan" <liodot@gmail.com>,
	Christopher Harrer <charrer@alacritech.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging:slicoss:slicoss.h remove volatile variables
Date: Fri, 26 Jun 2015 12:57:32 -0700	[thread overview]
Message-ID: <558DAEAC.3000800@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150626191057.GA20142@kroah.com>

I am a high school student trying to become familiar with the opensource 
process and linux kernel. This is my first submission to the mailing list.

I fixed the slicoss sub-system. The TODO file asks to remove volatile 
variables - also, checkpatch.pl warnings included volatile variables.

I removed "volatile" from the variables /isr /and /linkstatus/ in the 
header file, because they are not needed. The two variables are used in 
the slicoss.c file, where /isr/ is used as function parameters, string 
outputs, pointers, logic, and one assignment, while /linkstatus /is used 
as pointers, logic, and one assignment. All but the assignments will not 
change these variables, and the assignment does not warrant a volatile 
qualifier.

To make sure the changes were correct, I ran the files with 
checkpatch.pl again, test built it, and rebooted it.

Signed-off-by: Vikul Gupta <guptav@linux.vnet.ibm.com>

diff --git a/drivers/staging/slicoss/slic.h b/drivers/staging/slicoss/slic.h
index 3a5aa88..f19f86a 100644
--- a/drivers/staging/slicoss/slic.h
+++ b/drivers/staging/slicoss/slic.h
@@ -357,8 +357,8 @@ struct base_driver {
  };

  struct slic_shmem {
-    volatile u32          isr;
-    volatile u32          linkstatus;
+    u32          isr;
+    u32          linkstatus;
      volatile struct slic_stats     inicstats;
  };


       reply	other threads:[~2015-06-26 19:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <558DA29F.3020404@linux.vnet.ibm.com>
     [not found] ` <20150626191057.GA20142@kroah.com>
2015-06-26 19:57   ` Vikul Gupta [this message]
2015-06-26 20:09     ` [PATCH] staging:slicoss:slicoss.h remove volatile variables Greg Kroah-Hartman
2015-06-26 23:10     ` David Matlack

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=558DAEAC.3000800@linux.vnet.ibm.com \
    --to=guptav@linux.vnet.ibm.com \
    --cc=charrer@alacritech.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=liodot@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox