24 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 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 you
    should have received a copy of the gnu general public license along
    with this program if not write to the free software foundation inc
    675 mass ave cambridge ma 02139 usa

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

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

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

    Thomas Gleixner
     

16 Apr, 2019

1 commit

  • Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code,
    to improve readbility, and to reduce the chance of inconsistencies.

    Also replace any remaining S_ in the driver with octal values.

    The conversion was done automatically with coccinelle. The semantic patches
    and the scripts used to generate this commit log are available at
    https://github.com/groeck/coccinelle-patches/.

    This patch does not introduce functional changes. It was verified by
    compiling the old and new files and comparing text and data sizes.

    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

03 Jan, 2017

1 commit

  • Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for
    read/write attributes. This simplifies the source code, improves
    readbility, and reduces the chance of inconsistencies.

    The conversion was done automatically using coccinelle. It was validated
    by compiling both the old and the new source code and comparing its text,
    data, and bss size.

    Signed-off-by: Julia Lawall
    [groeck: Updated description]
    Signed-off-by: Guenter Roeck

    Julia Lawall
     

10 Dec, 2016

1 commit

  • Module test reports overflows when writing into temperature and voltage
    limit attributes

    temp1_min: Suspected overflow: [127000 vs. 0]
    temp1_max: Suspected overflow: [127000 vs. 0]
    temp1_offset: Suspected overflow: [127000 vs. 0]
    temp2_min: Suspected overflow: [127000 vs. 0]
    temp2_max: Suspected overflow: [127000 vs. 0]
    temp2_offset: Suspected overflow: [127000 vs. 0]
    temp3_min: Suspected overflow: [127000 vs. 0]
    temp3_max: Suspected overflow: [127000 vs. 0]
    temp3_offset: Suspected overflow: [127000 vs. 0]
    in0_min: Suspected overflow: [3320 vs. 0]
    in0_max: Suspected overflow: [3320 vs. 0]
    in4_min: Suspected overflow: [15938 vs. 0]
    in4_max: Suspected overflow: [15938 vs. 0]
    in6_min: Suspected overflow: [1992 vs. 0]
    in6_max: Suspected overflow: [1992 vs. 0]
    in7_min: Suspected overflow: [2391 vs. 0]
    in7_max: Suspected overflow: [2391 vs. 0]

    The problem is caused by conversions from unsigned long to long and
    from long to int.

    Reviewed-by: Jean Delvare
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     

04 Aug, 2014

2 commits


24 Jul, 2014

1 commit

  • Temperature limit clamps are applied after converting the temperature
    from milli-degrees C to degrees C, so either the clamp limit needs
    to be specified in degrees C, not milli-degrees C, or clamping must
    happen before converting to degrees C. Use the latter method to avoid
    overflows.

    vrm is an u8, so the written value needs to be limited to [0, 255].

    Cc: Axel Lin
    Cc: stable@vger.kernel.org
    Signed-off-by: Guenter Roeck
    Reviewed-by: Jean Delvare

    Guenter Roeck
     

26 Jan, 2013

1 commit

  • SENSORS_LIMIT and the generic clamp_val have the same functionality,
    and clamp_val is more efficient.

    This patch reduces text size by 9052 bytes and bss size by 11624 bytes
    for x86_64 builds.

    Signed-off-by: Guenter Roeck
    Acked-by: George Joseph
    Acked-by: Jean Delvare

    Guenter Roeck
     

22 Jul, 2012

1 commit


19 Mar, 2012

2 commits

  • Fixed:
    ERROR: code indent should use tabs where possible
    ERROR: do not use assignment in if condition
    ERROR: spaces required around that '' (ctx:VxV)
    NOTE: whitespace errors detected, you may wish to use scripts/cleanpatch or
    WARNING: please, no space before tabs
    WARNING: simple_strtol is obsolete, use kstrtol instead
    WARNING: simple_strtoul is obsolete, use kstrtoul instead

    Modify multi-line comments to follow Documentation/CodingStyle.

    Not fixed (false positive):
    ERROR: Macros with multiple statements should be enclosed in a do - while loop

    Cc: Hartmut Rick
    Signed-off-by: Guenter Roeck

    Guenter Roeck
     
  • This patch converts the drivers in drivers/hwmon/* to use the
    module_i2c_driver() macro which makes the code smaller and a bit simpler.

    Signed-off-by: Axel Lin
    Cc: Corentin Labbe
    Cc: Dirk Eibach
    Cc: "Mark M. Hoffman"
    Cc: Steve Glendinning
    Cc: Riku Voipio
    Cc: Guillaume Ligneul
    Cc: David George
    Cc: "Hans J. Koch"
    Cc: Marc Hulsman
    Cc: Rudolf Marek
    Signed-off-by: Guenter Roeck

    Axel Lin
     

15 Dec, 2009

3 commits


10 Dec, 2009

1 commit

  • As kind is now hard-coded to -1, there is room for code clean-ups.

    Signed-off-by: Jean Delvare
    Acked-by: Corentin Labbe
    Cc: "Mark M. Hoffman"
    Cc: Juerg Haefliger
    Cc: Riku Voipio
    Acked-by: "Hans J. Koch"
    Cc: Rudolf Marek

    Jean Delvare
     

17 Jul, 2008

1 commit


19 Feb, 2008

1 commit


08 Feb, 2008

1 commit

  • What was true of reading the VRM value is also true of writing it: not
    being a register value, it doesn't need hardware access, so we don't
    need a reference to the i2c client. This allows for a minor code
    cleanup. As gcc appears to be smart enough to simplify the generated
    code by itself, this cleanup only affects the source code, the
    generated binaries are unchanged.

    Signed-off-by: Jean Delvare
    Signed-off-by: Mark M. Hoffman

    Jean Delvare
     

10 Oct, 2007

2 commits


20 Jul, 2007

2 commits

  • We have the following naming convention documented in
    Documentation/hwmon/sysfs-interface for fault files:

    in[0-*]_input_fault
    fan[1-*]_input_fault
    temp[1-*]_input_fault

    Some drivers follow this convention (lm63, lm83, lm90, smsc47m192).
    However some drivers omit the "input" part and create files named
    fan1_fault (pc87427) or temp1_fault (dme1737). And the new "generic"
    libsensors follows this second (non-standard) convention, so it fails
    to report fault conditions for drivers which follow the standard.

    We want a single naming scheme, and everyone seems to prefer the
    shorter variant, so let's go for it.

    Signed-off-by: Jean Delvare

    Jean Delvare
     
  • Signed-off-by: Jean Delvare

    Jean Delvare
     

08 May, 2007

1 commit


29 Sep, 2006

1 commit


23 Jun, 2006

1 commit