Bug 591078 - Add skip_spaces() function implementation (linux/string.h) from upstream
Add skip_spaces() function implementation (linux/string.h) from upstream
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Jaroslav Kysela
Evan McNabb
:
Depends On:
Blocks: 554559 591083
  Show dependency treegraph
 
Reported: 2010-05-11 07:43 EDT by Jaroslav Kysela
Modified: 2010-11-11 11:12 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-11 11:12:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Original patch in upstream (1.74 KB, patch)
2010-05-11 07:43 EDT, Jaroslav Kysela
no flags Details | Diff
Second version of skip_spaces() patch including kernel optimalizations (27.34 KB, patch)
2010-05-12 13:47 EDT, Jaroslav Kysela
no flags Details | Diff

  None (edit)
Description Jaroslav Kysela 2010-05-11 07:43:07 EDT
Created attachment 413113 [details]
Original patch in upstream

commit f653398c86a1c104f0992bd788dd4bb065449be4
Author: André Goddard Rosa <andre.goddard@gmail.com>
Date:   Mon Dec 14 18:01:04 2009 -0800

    string: factorize skip_spaces and export it to be generally available
    
    On the following sentence:
        while (*s && isspace(*s))
            s++;
    
    If *s == 0, isspace() evaluates to ((_ctype[*s] & 0x20) != 0), which
    evaluates to ((0x08 & 0x20) != 0) which equals to 0 as well.
    If *s == 1, we depend on isspace() result anyway. In other words,
    "a char equals zero is never a space", so remove this check.
    
    Also, *s != 0 is most common case (non-null string).
    
    Fixed const return as noticed by Jan Engelhardt and James Bottomley.
    Fixed unnecessary extra cast on strstrip() as noticed by Jan Engelhardt.
    
    Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Comment 2 RHEL Product and Program Management 2010-05-11 09:12:24 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 3 Jaroslav Kysela 2010-05-12 13:47:28 EDT
Created attachment 413502 [details]
Second version of skip_spaces() patch including kernel optimalizations
Comment 5 Aristeu Rozanski 2010-05-18 17:13:35 EDT
Patch(es) available on kernel-2.6.32-27.el6
Comment 10 releng-rhel@redhat.com 2010-11-11 11:12:20 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.