From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Subject: Re: [patch v2 1/2] pinctrl: samsung: don't truncate the last char Date: Thu, 16 Jul 2015 10:21:02 +0200 Message-ID: References: <20150619085203.GO28762@mwanda> <20150622151223.GA14156@mwanda> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from mail-oi0-f43.google.com ([209.85.218.43]:36391 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754269AbbGPIVE (ORCPT ); Thu, 16 Jul 2015 04:21:04 -0400 Received: by oibn4 with SMTP id n4so45666467oib.3 for ; Thu, 16 Jul 2015 01:21:03 -0700 (PDT) In-Reply-To: <20150622151223.GA14156@mwanda> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Dan Carpenter Cc: Tomasz Figa , Thomas Abraham , Kukjin Kim , Krzysztof Kozlowski , "linux-arm-kernel@lists.infradead.org" , linux-samsung-soc , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , kernel-janitors@vger.kernel.org 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 done in one step with the kasprintf(). > > Signed-off-by: Dan Carpenter Patch applied with Krzysztof's review tag. Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754427AbbGPIVV (ORCPT ); Thu, 16 Jul 2015 04:21:21 -0400 Received: from mail-oi0-f50.google.com ([209.85.218.50]:35341 "EHLO mail-oi0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754253AbbGPIVE (ORCPT ); Thu, 16 Jul 2015 04:21:04 -0400 MIME-Version: 1.0 In-Reply-To: <20150622151223.GA14156@mwanda> References: <20150619085203.GO28762@mwanda> <20150622151223.GA14156@mwanda> Date: Thu, 16 Jul 2015 10:21:02 +0200 Message-ID: Subject: Re: [patch v2 1/2] pinctrl: samsung: don't truncate the last char From: Linus Walleij To: Dan Carpenter Cc: Tomasz Figa , Thomas Abraham , Kukjin Kim , Krzysztof Kozlowski , "linux-arm-kernel@lists.infradead.org" , linux-samsung-soc , "linux-gpio@vger.kernel.org" , "linux-kernel@vger.kernel.org" , kernel-janitors@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 done in one step with the kasprintf(). > > Signed-off-by: Dan Carpenter Patch applied with Krzysztof's review tag. Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: Linus Walleij Date: Thu, 16 Jul 2015 08:21:02 +0000 Subject: Re: [patch v2 1/2] pinctrl: samsung: don't truncate the last char Message-Id: List-Id: References: <20150619085203.GO28762@mwanda> <20150622151223.GA14156@mwanda> In-Reply-To: <20150622151223.GA14156@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-arm-kernel@lists.infradead.org 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 done in one step with the kasprintf(). > > Signed-off-by: Dan Carpenter Patch applied with Krzysztof's review tag. Yours, Linus Walleij From mboxrd@z Thu Jan 1 00:00:00 1970 From: linus.walleij@linaro.org (Linus Walleij) Date: Thu, 16 Jul 2015 10:21:02 +0200 Subject: [patch v2 1/2] pinctrl: samsung: don't truncate the last char In-Reply-To: <20150622151223.GA14156@mwanda> References: <20150619085203.GO28762@mwanda> <20150622151223.GA14156@mwanda> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 done in one step with the kasprintf(). > > Signed-off-by: Dan Carpenter Patch applied with Krzysztof's review tag. Yours, Linus Walleij