From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757441AbaIRWj1 (ORCPT ); Thu, 18 Sep 2014 18:39:27 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:49894 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754532AbaIRWjZ (ORCPT ); Thu, 18 Sep 2014 18:39:25 -0400 Date: Fri, 19 Sep 2014 01:39:09 +0300 From: Dan Carpenter To: Rickard Strandqvist Cc: devel@driverdev.osuosl.org, Greg Kroah-Hartman , Peng Tao , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] staging: lustre: lustre: libcfs: debug.c: Cleaning up unnecessary use of memset in conjunction with strncpy Message-ID: <20140918223909.GO17875@mwanda> References: <1410710597-14520-1-git-send-email-rickard_strandqvist@spectrumdigital.se> <20140915082346.GB17875@mwanda> <20140918085105.GB16827@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 18, 2014 at 09:57:17PM +0200, Rickard Strandqvist wrote: > > Should I add this as a patch in lib/string.c or email him first.. What > is customary in these situations? > Just write up a normal patch and try to merge it through the normal methods. It's not that controversial to do: strncpy(dest, src, n); dest[n] = '\0'; That's what we have been open coding all over the place anyway already. regards, dan carpenter