[PATCH] video: smscufx.c: local functions should not be exposed globally

Subsystems: framebuffer layer, the rest

STALE5258d

2 messages, 2 authors, 2012-05-10 · open the first message on its own page

[PATCH] video: smscufx.c: local functions should not be exposed globally

From: H Hartley Sweeten <hidden>
Date: 2012-05-03 00:17:42

Functions not referenced outside of a source file should be marked
static to prevent them from being exposed globally.

Quiets the sparse warnings:

warning: symbol 'ufx_handle_damage' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Steve Glendinning <redacted>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>

---
diff --git a/drivers/video/smscufx.c b/drivers/video/smscufx.c
index 9985785..af3ef27 100644
--- a/drivers/video/smscufx.c
+++ b/drivers/video/smscufx.c
@@ -846,7 +846,7 @@ static void ufx_raw_rect(struct ufx_data *dev, u16 *cmd, int x, int y,
 	}
 }
 
-int ufx_handle_damage(struct ufx_data *dev, int x, int y,
+static int ufx_handle_damage(struct ufx_data *dev, int x, int y,
 	int width, int height)
 {
 	size_t packed_line_len = ALIGN((width * 2), 4);

Re: [PATCH] video: smscufx.c: local functions should not be exposed globally

From: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Date: 2012-05-10 00:11:14

On 05/03/2012 12:17 AM, H Hartley Sweeten wrote:
Functions not referenced outside of a source file should be marked
static to prevent them from being exposed globally.

Quiets the sparse warnings:

warning: symbol 'ufx_handle_damage' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Steve Glendinning <redacted>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Applied.


Thanks,

Florian Tobias Schandinat
quoted hunk
---
diff --git a/drivers/video/smscufx.c b/drivers/video/smscufx.c
index 9985785..af3ef27 100644
--- a/drivers/video/smscufx.c
+++ b/drivers/video/smscufx.c
@@ -846,7 +846,7 @@ static void ufx_raw_rect(struct ufx_data *dev, u16 *cmd, int x, int y,
 	}
 }
 
-int ufx_handle_damage(struct ufx_data *dev, int x, int y,
+static int ufx_handle_damage(struct ufx_data *dev, int x, int y,
 	int width, int height)
 {
 	size_t packed_line_len = ALIGN((width * 2), 4);

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help