From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752170AbdFOQ5W (ORCPT ); Thu, 15 Jun 2017 12:57:22 -0400 Received: from casper.infradead.org ([85.118.1.10]:36136 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751803AbdFOQ5U (ORCPT ); Thu, 15 Jun 2017 12:57:20 -0400 Date: Thu, 15 Jun 2017 17:57:14 +0100 (BST) From: James Simmons To: Joe Perches cc: Greg Kroah-Hartman , devel@driverdev.osuosl.org, Andreas Dilger , Oleg Drokin , Linux Kernel Mailing List , Lustre Development List Subject: Re: [PATCH 1/6] staging: lustre: lustre: resolve "use spaces between elements" checkpatch errors In-Reply-To: <1497543584.14396.8.camel@perches.com> Message-ID: References: <1497452481-31124-1-git-send-email-jsimmons@infradead.org> <1497452481-31124-2-git-send-email-jsimmons@infradead.org> <1497463820.18751.57.camel@perches.com> <1497543584.14396.8.camel@perches.com> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170615_175714_773253_61A18405 X-CRM114-Status: GOOD ( 14.91 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on casper.infradead.org summary: Content analysis details: (-1.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 NO_RELAYS Informational: message was not relayed via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Thu, 2017-06-15 at 17:03 +0100, James Simmons wrote: > > > On Wed, 2017-06-14 at 11:01 -0400, James Simmons wrote: > > > > Due to the way the DFID was embedded in our debug strings checkpatch > > > > would report the following error: > > > > > > unrelated trivia > > > > > > > diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h > > > > > > [] > > > > @@ -532,7 +532,7 @@ static inline void obd_uuid2fsname(char *buf, char *uuid, int buflen) > > > > #define FID_NOBRACE_LEN 40 > > > > #define FID_LEN (FID_NOBRACE_LEN + 2) > > > > #define DFID_NOBRACE "%#llx:0x%x:0x%x" > > > > > > It's odd to use a mixture of %#x and 0x%x. > > > > > > Using > > > #define DFID_NOBRACE "%#llx:%#x:%#x" > > > would also save a couple bytes per use. > > > > Changing that format would break things very badly. This is used in user > > land utilities and the kernel code. > > Really? Why would anything break? It shouldn't break anything but I'm paranoid. In the past I have change "simple" things to have it blow up. I pushed the change to our test harness just to make sure. > $ cat fmt.c > #include > #include > > int main(int argc, char **argv) > { > printf("%#llx:0x%x:0x%x\n", (unsigned long long)1, 2, 3); > printf("%#llx:%#x:%#x\n", (unsigned long long)1, 2, 3); > return 0; > } > > $ gcc fmt.c > $ ./a.out > 0x1:0x2:0x3 > 0x1:0x2:0x3 > >