From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Date: Wed, 19 Jun 2019 01:10:40 +0000 Subject: Re: [PATCH] scsi: tcmu: Simplify 'tcmu_update_uio_info()' Message-Id: List-Id: References: <20190616070220.24189-1-christophe.jaillet@wanadoo.fr> In-Reply-To: <20190616070220.24189-1-christophe.jaillet@wanadoo.fr> (Christophe JAILLET's message of "Sun, 16 Jun 2019 09:02:20 +0200") MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Christophe JAILLET Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Christophe, > Use 'kasprintf()' instead of: > - snprintf(NULL, 0... > - kmalloc(... > - snprintf(... > > This is less verbose and saves 7 bytes (i.e. the space for '/(null)') if > 'udev->dev_config' is NULL. Applied to 5.3/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Martin K. Petersen" Subject: Re: [PATCH] scsi: tcmu: Simplify 'tcmu_update_uio_info()' Date: Tue, 18 Jun 2019 21:10:40 -0400 Message-ID: References: <20190616070220.24189-1-christophe.jaillet@wanadoo.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <20190616070220.24189-1-christophe.jaillet@wanadoo.fr> (Christophe JAILLET's message of "Sun, 16 Jun 2019 09:02:20 +0200") Sender: linux-kernel-owner@vger.kernel.org To: Christophe JAILLET Cc: martin.petersen@oracle.com, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org List-Id: linux-scsi@vger.kernel.org Christophe, > Use 'kasprintf()' instead of: > - snprintf(NULL, 0... > - kmalloc(... > - snprintf(... > > This is less verbose and saves 7 bytes (i.e. the space for '/(null)') if > 'udev->dev_config' is NULL. Applied to 5.3/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering