31 May, 2019

1 commit

  • Based on 1 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

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

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

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

    Thomas Gleixner
     

16 Apr, 2019

2 commits

  • If CONFIG_OF is not enabled, the following build warning is observed.

    drivers/hwmon/w83773g.c:47:34: warning:
    ‘w83773_of_match’ defined but not used

    Mark w83773_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
     

03 Jan, 2018

2 commits

  • Smatch reports:

    drivers/hwmon/w83773g.c:105
    get_fault() warn: shift has higher precedence than mask

    Code analysis shows that the code is indeed wrong.
    Fix it, and while we are at it, drop unnecessary typecast.

    Fixes: 86a10c802362 ("hwmon: Add W83773G driver")
    Cc: Lei YU
    Reviewed-by: Lei YU
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • Nuvoton W83773G is a hardware monitor IC providing one local
    temperature and two remote temperature sensors.

    Signed-off-by: Lei YU
    Signed-off-by: Guenter Roeck

    Lei YU