From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754354AbdBHRYH convert rfc822-to-8bit (ORCPT ); Wed, 8 Feb 2017 12:24:07 -0500 Received: from aserp1050.oracle.com ([141.146.126.70]:17498 "EHLO aserp1050.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751618AbdBHRYF (ORCPT ); Wed, 8 Feb 2017 12:24:05 -0500 Subject: Re: [PATCH] xenbus: Neaten xenbus_va_dev_error To: Joe Perches , linux-kernel@vger.kernel.org References: <595b1e96-3bec-aaa5-e548-b40dd1265fae@oracle.com> <1486569942.27834.15.camel@perches.com> Cc: Juergen Gross , xen-devel@lists.xenproject.org From: Boris Ostrovsky Message-ID: <7a52ce1c-d570-ce1d-16a5-e4785bcef95f@oracle.com> Date: Wed, 8 Feb 2017 12:14:04 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <1486569942.27834.15.camel@perches.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8BIT X-Source-IP: aserp1040.oracle.com [141.146.126.69] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/08/2017 11:05 AM, Joe Perches wrote: > On Wed, 2017-02-08 at 10:33 -0500, Boris Ostrovsky wrote: >> On 02/08/2017 06:33 AM, Joe Perches wrote: >>> This function error patch can be simplified, so do so. >>> >>> Remove fail: label and somewhat obfuscating, used once "error_path" >>> function. > btw: I left it alone, but likely > > #define PRINTF_BUFFER_SIZE 4096 > > is probably excessive as the maximum printk > buffer is 1024. > > The xenbus_write might be longer though so > maybe it's OK to use 4096, but there is some > inequivalence there. > xenbus_write() handles writes up to 4K. However we are filling the buffer with sprintf() which I assume is limited to 1K too so it indeed doesn't seem useful to have PRINTF_BUFFER_SIZE set to 4. -boris