Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176386
b: refs/heads/master
c: ca54cb8
h: refs/heads/master
v: v3
  • Loading branch information
KOSAKI Motohiro authored and Linus Torvalds committed Dec 15, 2009
1 parent 9e51c96 commit 494a389
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 925ede0bf4ecef96fc2d939b16619530111aa16e
refs/heads/master: ca54cb8c9eb38095dc420b73c6380ce1dbeb10fa
4 changes: 2 additions & 2 deletions trunk/drivers/scsi/ipr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1333,7 +1333,7 @@ static void ipr_log_enhanced_dual_ioa_error(struct ipr_ioa_cfg *ioa_cfg,

error = &hostrcb->hcam.u.error.u.type_17_error;
error->failure_reason[sizeof(error->failure_reason) - 1] = '\0';
strstrip(error->failure_reason);
strim(error->failure_reason);

ipr_hcam_err(hostrcb, "%s [PRC: %08X]\n", error->failure_reason,
be32_to_cpu(hostrcb->hcam.u.error.prc));
Expand All @@ -1359,7 +1359,7 @@ static void ipr_log_dual_ioa_error(struct ipr_ioa_cfg *ioa_cfg,

error = &hostrcb->hcam.u.error.u.type_07_error;
error->failure_reason[sizeof(error->failure_reason) - 1] = '\0';
strstrip(error->failure_reason);
strim(error->failure_reason);

ipr_hcam_err(hostrcb, "%s [PRC: %08X]\n", error->failure_reason,
be32_to_cpu(hostrcb->hcam.u.error.prc));
Expand Down
9 changes: 8 additions & 1 deletion trunk/include/linux/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ extern char * strnchr(const char *, size_t, int);
extern char * strrchr(const char *,int);
#endif
extern char * __must_check skip_spaces(const char *);
extern char * __must_check strstrip(char *);

extern char *strim(char *);

static inline __must_check char *strstrip(char *str)
{
return strim(str);
}

#ifndef __HAVE_ARCH_STRSTR
extern char * strstr(const char *,const char *);
#endif
Expand Down
6 changes: 3 additions & 3 deletions trunk/lib/string.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,14 +352,14 @@ char *skip_spaces(const char *str)
EXPORT_SYMBOL(skip_spaces);

/**
* strstrip - Removes leading and trailing whitespace from @s.
* strim - Removes leading and trailing whitespace from @s.
* @s: The string to be stripped.
*
* Note that the first trailing whitespace is replaced with a %NUL-terminator
* in the given string @s. Returns a pointer to the first non-whitespace
* character in @s.
*/
char *strstrip(char *s)
char *strim(char *s)
{
size_t size;
char *end;
Expand All @@ -376,7 +376,7 @@ char *strstrip(char *s)

return s;
}
EXPORT_SYMBOL(strstrip);
EXPORT_SYMBOL(strim);

#ifndef __HAVE_ARCH_STRLEN
/**
Expand Down

0 comments on commit 494a389

Please sign in to comment.