diff mbox

[1/1] mtip32xx: restrict variables visible in current code module

Message ID 1451990344-22307-1-git-send-email-zyjzyj2000@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Zhu Yanjun Jan. 5, 2016, 10:39 a.m. UTC
From: Zhu Yanjun <zyjzyj2000@gmail.com>

The modified variables are only used in the file mtip32xx.c.
As such, the static keyword is inserted to define that object
to be only visible to the current code module during compilation.

Signed-off-by: Zhu Yanjun <zyjzyj2000@gmail.com>
---
 drivers/block/mtip32xx/mtip32xx.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Jens Axboe Jan. 8, 2016, 6:48 p.m. UTC | #1
On 01/05/2016 03:39 AM, zyjzyj2000@gmail.com wrote:
> From: Zhu Yanjun <zyjzyj2000@gmail.com>
>
> The modified variables are only used in the file mtip32xx.c.
> As such, the static keyword is inserted to define that object
> to be only visible to the current code module during compilation.

Applied for 4.5, thanks.
diff mbox

Patch

diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 3457ac8..2641a98 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -104,9 +104,9 @@ 
 /* Device instance number, incremented each time a device is probed. */
 static int instance;
 
-struct list_head online_list;
-struct list_head removing_list;
-spinlock_t dev_lock;
+static struct list_head online_list;
+static struct list_head removing_list;
+static spinlock_t dev_lock;
 
 /*
  * Global variable used to hold the major block device number