31 May, 2019

1 commit

  • Based on 3 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] this program is distributed in the hope that
    it will be useful but without any warranty without even the implied
    warranty of merchantability or fitness for a particular purpose see
    the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] this program is distributed in the hope
    that it will be useful but without any warranty without even the
    implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

16 Apr, 2019

2 commits

  • The following build warning is seen if CONFIG_OF is disabled.

    drivers/hwmon/max6621.c:573:34: warning:
    ‘max6621_of_match’ defined but not used

    Mark max6621_of_match as __maybe_unused to fix the problem.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • The HWMON_CHANNEL_INFO macro simplifies the code, reduces the likelihood
    of errors, and makes the code easier to read.

    The conversion was done automatically with coccinelle. The semantic patch
    used to make this change is as follows.

    @r@
    initializer list elements;
    identifier i;
    @@

    -u32 i[] = {
    - elements,
    - 0
    -};

    @s@
    identifier r.i,j,ty;
    @@

    -struct hwmon_channel_info j = {
    - .type = ty,
    - .config = i,
    -};

    @script:ocaml t@
    ty << s.ty;
    elements << r.elements;
    shorter;
    elems;
    @@

    shorter :=
    make_ident (List.hd(List.rev (Str.split (Str.regexp "_") ty)));
    elems :=
    make_ident
    (String.concat ","
    (List.map (fun x -> Printf.sprintf "\n\t\t\t %s" x)
    (Str.split (Str.regexp " , ") elements)))

    @@
    identifier s.j,t.shorter;
    identifier t.elems;
    @@

    - &j
    + HWMON_CHANNEL_INFO(shorter,elems)

    This patch does not introduce functional changes. Many thanks to
    Julia Lawall for providing the semantic patch.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

30 Oct, 2017

2 commits