Re: [patch v2 1/2] pinctrl: samsung: don't truncate the last char

2015-07-16 Thread Linus Walleij
On Mon, Jun 22, 2015 at 5:12 PM, Dan Carpenter wrote: > We were allocating enough space because sizeof("-grp") and > sizeof("-mux") are both equal to 5 but in the snprintf() we only allowed > for 4 characters so the last 'p' and 'x' characters were truncated. > > The allocate and sprintf can be

Re: [patch v2 1/2] pinctrl: samsung: don't truncate the last char

2015-07-16 Thread Linus Walleij
On Mon, Jun 22, 2015 at 5:12 PM, Dan Carpenter dan.carpen...@oracle.com wrote: We were allocating enough space because sizeof(-grp) and sizeof(-mux) are both equal to 5 but in the snprintf() we only allowed for 4 characters so the last 'p' and 'x' characters were truncated. The allocate and

Re: [patch v2 1/2] pinctrl: samsung: don't truncate the last char

2015-06-22 Thread Krzysztof Kozlowski
On 23.06.2015 00:12, Dan Carpenter wrote: > We were allocating enough space because sizeof("-grp") and > sizeof("-mux") are both equal to 5 but in the snprintf() we only allowed > for 4 characters so the last 'p' and 'x' characters were truncated. > > The allocate and sprintf can be done in one

[patch v2 1/2] pinctrl: samsung: don't truncate the last char

2015-06-22 Thread Dan Carpenter
We were allocating enough space because sizeof("-grp") and sizeof("-mux") are both equal to 5 but in the snprintf() we only allowed for 4 characters so the last 'p' and 'x' characters were truncated. The allocate and sprintf can be done in one step with the kasprintf(). Signed-off-by: Dan

[patch v2 1/2] pinctrl: samsung: don't truncate the last char

2015-06-22 Thread Dan Carpenter
We were allocating enough space because sizeof(-grp) and sizeof(-mux) are both equal to 5 but in the snprintf() we only allowed for 4 characters so the last 'p' and 'x' characters were truncated. The allocate and sprintf can be done in one step with the kasprintf(). Signed-off-by: Dan Carpenter

Re: [patch v2 1/2] pinctrl: samsung: don't truncate the last char

2015-06-22 Thread Krzysztof Kozlowski
On 23.06.2015 00:12, Dan Carpenter wrote: We were allocating enough space because sizeof(-grp) and sizeof(-mux) are both equal to 5 but in the snprintf() we only allowed for 4 characters so the last 'p' and 'x' characters were truncated. The allocate and sprintf can be done in one step with