From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandra Sava Subject: Re: [PATCH] libxl: Cleanup, use LOG*, GCSPRINTF and CTX macros in libxl_device.c Date: Tue, 5 Nov 2013 16:34:30 +0200 Message-ID: References: <1383588404-14328-1-git-send-email-alexandrasava18@gmail.com> <9afa7710aa5abd6bbf961c02c599a11d85012d08.1383600818.git.alexandrasava18@gmail.com> <1383659774.13961.72.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1383659774.13961.72.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: George Dunlap , Anthony PERARD , Ian Jackson , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On 5 November 2013 15:56, Ian Campbell wrote: > On Tue, 2013-11-05 at 11:48 +0000, George Dunlap wrote: >> > bad_format: >> > - LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Disk vdev=%s, backend %s" >> > - " unsuitable due to format %s", >> > - a->disk->vdev, >> > - libxl_disk_backend_to_string(backend), >> > - libxl_disk_format_to_string(a->disk->format)); >> > + LOG(DEBUG, "Disk vdev=%s, backend %s unsuitable due to format %s", >> > + a->disk->vdev, >> > + libxl_disk_backend_to_string(backend), >> > + libxl_disk_format_to_string(a->disk->format)); >> >> Given that in existing places, the LOG macro has formatted variables >> aligned to the beginning of the quote rather than to the open paren, > > There's a bit of a mixture and the indented version is more prevalent. > But there's only 7 multiline uses of LOG* in that file (the split is 5:2 > in favour of indentation). > > I'd object to just reindenting but if the line is changing anyway I have > no strong feelings on the style used. > > The non-indented variant does have the benefit that formatting helpers > (e.g. emacs' c-mode) do it that way for you... > > Ian. > > Hi guys, Thanks for the review. I will update the patch based on your suggestions: * fix indentation stuff * break lines up to 80 characters when necessary * change commit message with: Use new LOG* and GCSPRINTF macros in libxl_device.c Replace libxl__sprintf, LIBXL__LOG and LIBXL__LOG_ERRNO with new "Convenience macros": GCSPRINTF, LOG, LOGE Thanks, Alexandra