Skip to contentSkip to conversation

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

PATCH Applied H Hartley Sweeten 2 participants 2 messages May 3, 2012 – May 10, 2012 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: smscufx.c: local functions should not be exposed globally

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?

Cc Steve Glendinning <[email protected]>
Cc Florian Tobias Schandinat <[email protected]>

---

drivers/video/smscufx.c +1 -1
index 9985785..af3ef27 100644
@@ -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);
#1 lore raw
Quoted 10 lines · H Hartley Sweeten

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?

Cc Steve Glendinning <[email protected]>
Cc Florian Tobias Schandinat <[email protected]>

Applied.

Thanks,

Florian Tobias Schandinat

Quoted 17 lines

---

drivers/video/smscufx.c +1 -1
index 9985785..af3ef27 100644
@@ -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);