diff options
author | David Brownell <david-b@pacbell.net> | 2007-05-25 23:40:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-12 19:29:51 -0400 |
commit | b29dbbd811b006deea85275e37fc1a09e8983d48 (patch) | |
tree | 0a81aa33d58a3ba0dc0b44339c03efbdc312dc2f /drivers/usb/gadget/serial.c | |
parent | 715f9527c1c1edd1a9c7a55ab4535211279c9374 (diff) |
USB: usb serial gadget, sparse fixes
Fix a few serial gadget issues reported by the latest "sparse":
some functions should have been defined as static, not just
declared that way.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/serial.c')
-rw-r--r-- | drivers/usb/gadget/serial.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c index f847c3414be3..dd33ff0ae4ce 100644 --- a/drivers/usb/gadget/serial.c +++ b/drivers/usb/gadget/serial.c | |||
@@ -2215,7 +2215,7 @@ static struct gs_buf *gs_buf_alloc(unsigned int size, gfp_t kmalloc_flags) | |||
2215 | * | 2215 | * |
2216 | * Free the buffer and all associated memory. | 2216 | * Free the buffer and all associated memory. |
2217 | */ | 2217 | */ |
2218 | void gs_buf_free(struct gs_buf *gb) | 2218 | static void gs_buf_free(struct gs_buf *gb) |
2219 | { | 2219 | { |
2220 | if (gb) { | 2220 | if (gb) { |
2221 | kfree(gb->buf_buf); | 2221 | kfree(gb->buf_buf); |
@@ -2228,7 +2228,7 @@ void gs_buf_free(struct gs_buf *gb) | |||
2228 | * | 2228 | * |
2229 | * Clear out all data in the circular buffer. | 2229 | * Clear out all data in the circular buffer. |
2230 | */ | 2230 | */ |
2231 | void gs_buf_clear(struct gs_buf *gb) | 2231 | static void gs_buf_clear(struct gs_buf *gb) |
2232 | { | 2232 | { |
2233 | if (gb != NULL) | 2233 | if (gb != NULL) |
2234 | gb->buf_get = gb->buf_put; | 2234 | gb->buf_get = gb->buf_put; |
@@ -2241,7 +2241,7 @@ void gs_buf_clear(struct gs_buf *gb) | |||
2241 | * Return the number of bytes of data available in the circular | 2241 | * Return the number of bytes of data available in the circular |
2242 | * buffer. | 2242 | * buffer. |
2243 | */ | 2243 | */ |
2244 | unsigned int gs_buf_data_avail(struct gs_buf *gb) | 2244 | static unsigned int gs_buf_data_avail(struct gs_buf *gb) |
2245 | { | 2245 | { |
2246 | if (gb != NULL) | 2246 | if (gb != NULL) |
2247 | return (gb->buf_size + gb->buf_put - gb->buf_get) % gb->buf_size; | 2247 | return (gb->buf_size + gb->buf_put - gb->buf_get) % gb->buf_size; |
@@ -2255,7 +2255,7 @@ unsigned int gs_buf_data_avail(struct gs_buf *gb) | |||
2255 | * Return the number of bytes of space available in the circular | 2255 | * Return the number of bytes of space available in the circular |
2256 | * buffer. | 2256 | * buffer. |
2257 | */ | 2257 | */ |
2258 | unsigned int gs_buf_space_avail(struct gs_buf *gb) | 2258 | static unsigned int gs_buf_space_avail(struct gs_buf *gb) |
2259 | { | 2259 | { |
2260 | if (gb != NULL) | 2260 | if (gb != NULL) |
2261 | return (gb->buf_size + gb->buf_get - gb->buf_put - 1) % gb->buf_size; | 2261 | return (gb->buf_size + gb->buf_get - gb->buf_put - 1) % gb->buf_size; |
@@ -2271,7 +2271,8 @@ unsigned int gs_buf_space_avail(struct gs_buf *gb) | |||
2271 | * | 2271 | * |
2272 | * Return the number of bytes copied. | 2272 | * Return the number of bytes copied. |
2273 | */ | 2273 | */ |
2274 | unsigned int gs_buf_put(struct gs_buf *gb, const char *buf, unsigned int count) | 2274 | static unsigned int |
2275 | gs_buf_put(struct gs_buf *gb, const char *buf, unsigned int count) | ||
2275 | { | 2276 | { |
2276 | unsigned int len; | 2277 | unsigned int len; |
2277 | 2278 | ||
@@ -2309,7 +2310,8 @@ unsigned int gs_buf_put(struct gs_buf *gb, const char *buf, unsigned int count) | |||
2309 | * | 2310 | * |
2310 | * Return the number of bytes copied. | 2311 | * Return the number of bytes copied. |
2311 | */ | 2312 | */ |
2312 | unsigned int gs_buf_get(struct gs_buf *gb, char *buf, unsigned int count) | 2313 | static unsigned int |
2314 | gs_buf_get(struct gs_buf *gb, char *buf, unsigned int count) | ||
2313 | { | 2315 | { |
2314 | unsigned int len; | 2316 | unsigned int len; |
2315 | 2317 | ||