lkml.org 
[lkml]   [2016]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH 2/7] efi: Document #define FOO_PROTOCOL_GUID layout
From
Date
On Mon, 2016-06-27 at 12:49 +0200, Ingo Molnar wrote:
> * Matt Fleming <matt@codeblueprint.co.uk> wrote:
[]
> > + * EFI Configuration Table and GUID definitions
> > + *
> > + * These should be formatted roughly like the ones in the UEFI SPEC has
> > + * them.  It makes them easier to grep for, and they look the same when
> > + * you're staring at them.
[]
> Btw., another possible way to organize the GUIDs would be to ignore checkpatch (we 
> should ignore checkpatch when it's wrong)

Completely agree. checkpatch is brainless.

> and go for a nice table format:

> #define NULL_GUID EFI_GUID(0x00000000, 0x0000, 0x0000,  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00)

Much nicer.

There are a few more files that use EFI_GUID.
It'd be good to standardize.

$ git grep --name-only -w EFI_GUID
arch/ia64/include/asm/sal.h
arch/ia64/kernel/esi.c
arch/x86/platform/efi/quirks.c
block/partitions/efi.h
drivers/infiniband/hw/hfi1/efivar.c
drivers/scsi/isci/probe_roms.h
include/linux/efi.h

Maybe a checkpatch line-length exclusion:
---
 scripts/checkpatch.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 4904ced..cc787e6 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2764,6 +2764,10 @@ sub process {
   $line =~ /^\+\s*#\s*define\s+\w+\s+$String$/) {
  $msg_type = "";
 
+ # EFI_GUID is another special case
+ } elsif ($line =~ /^\+.*\bEFI_GUID\s*\(/) {
+ $msg_type = "";
+
  # Otherwise set the alternate message types
 
  # a comment starts before $max_line_length

\
 
 \ /
  Last update: 2016-06-27 14:01    [W:0.101 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site