#
5b400006 |
| 18-Sep-2023 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
hwmon: (vt8231) Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do erro
hwmon: (vt8231) Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is ignored (apart from emitting a warning) and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Eventually after all drivers are converted, .remove_new() is renamed to .remove().
Trivially convert this driver from always returning zero in the remove callback to the void returning variant.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20230918085951.1234172-22-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
1e3c3a79 |
| 24-Aug-2023 |
Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> |
hwmon: (vt8231) Do PCI error checks on own line
Instead of if conditions with line splits, use the usual error handling pattern with a separate variable to improve readability.
No functional change
hwmon: (vt8231) Do PCI error checks on own line
Instead of if conditions with line splits, use the usual error handling pattern with a separate variable to improve readability.
No functional changes intended.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230824132832.78705-7-ilpo.jarvinen@linux.intel.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
07619140 |
| 13-Nov-2022 |
Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
hwmon: Remove some useless #include <linux/hwmon-vid.h>
<linux/hwmon-vid.h> is not needed for these drivers. Remove the corresponding #include.
Signed-off-by: Christophe JAILLET <christophe.jaillet
hwmon: Remove some useless #include <linux/hwmon-vid.h>
<linux/hwmon-vid.h> is not needed for these drivers. Remove the corresponding #include.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/41610f64a69bd0245ebc811fcff10ee54e93ac46.1668330765.git.christophe.jaillet@wanadoo.fr Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
ac387b0c |
| 20-Sep-2022 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
hwmon: (vt8231) Reorder symbols to get rid of a few forward declarations
Declarations for static symbols are useless repetition unless there are cyclic dependencies.
Reorder the functions and varia
hwmon: (vt8231) Reorder symbols to get rid of a few forward declarations
Declarations for static symbols are useless repetition unless there are cyclic dependencies.
Reorder the functions and variables to get rid of 5 forward declarations.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220920135617.1046361-2-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
6c7c469c |
| 20-Sep-2022 |
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> |
hwmon: (vt8231) Introduce a #define for the driver name and use it
Make use of the cpp symbol DRIVER_NAME to set the driver's name and use it instead of all explicit usages of the same string. Also
hwmon: (vt8231) Introduce a #define for the driver name and use it
Make use of the cpp symbol DRIVER_NAME to set the driver's name and use it instead of all explicit usages of the same string. Also make use of it instead of vt8231_driver.driver.name which breaks a cyclic dependency between vt8231_probe() and vt8231_driver that in the next commit allows to drop some forward declarations.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20220920135617.1046361-1-u.kleine-koenig@pengutronix.de Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
952a11ca |
| 24-Sep-2021 |
Paul Fertser <fercerpav@gmail.com> |
hwmon: cleanup non-bool "valid" data fields
We have bool so use it consistently in all the drivers.
The following Coccinelle script was used:
@@ identifier T; type t = { char, int }; @@ struct T {
hwmon: cleanup non-bool "valid" data fields
We have bool so use it consistently in all the drivers.
The following Coccinelle script was used:
@@ identifier T; type t = { char, int }; @@ struct T { ... - t valid; + bool valid; ... }
@@ identifier v; @@ ( - v->valid = 0 + v->valid = false | - v->valid = 1 + v->valid = true )
followed by sed to fixup the comments: sed '/bool valid;/{s/!=0/true/;s/zero/false/}'
Few whitespace changes were fixed manually. All modified drivers were compile-tested.
Signed-off-by: Paul Fertser <fercerpav@gmail.com> Link: https://lore.kernel.org/r/20210924195202.27917-1-fercerpav@gmail.com [groeck: Fixed up 'u8 valid' to 'boool valid' in atxp1.c] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
2207515d |
| 01-Aug-2020 |
Saheed O. Bolarinwa <refactormyself@gmail.com> |
hwmon: (i5k_amb, vt8231) Drop uses of pci_read_config_*() return value
The return value of pci_read_config_*() may not indicate a device error. However, the value read by these functions is more lik
hwmon: (i5k_amb, vt8231) Drop uses of pci_read_config_*() return value
The return value of pci_read_config_*() may not indicate a device error. However, the value read by these functions is more likely to indicate this kind of error. This presents two overlapping ways of reporting errors and complicates error checking.
It is possible to move to one single way of checking for error if the dependency on the return value of these functions is removed, then it can later be made to return void.
Remove all uses of the return value of pci_read_config_*(). Check the actual value read for ~0. In this case, ~0 is an invalid value thus it indicates some kind of error.
Suggested-by: Bjorn Helgaas <bjorn@helgaas.com> Signed-off-by: Saheed O. Bolarinwa <refactormyself@gmail.com> Link: https://lore.kernel.org/r/20200801112446.149549-11-refactormyself@gmail.com Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
74ba9207 |
| 20-May-2019 |
Thomas Gleixner <tglx@linutronix.de> |
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61
Based on 1 normalized pattern(s):
this program is free software you can redistribute it and or modify it under the terms of the
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61
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 <tglx@linutronix.de> Reviewed-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc) Reviewed-by: Richard Fontana <rfontana@redhat.com> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190520071858.739733335@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
08ea5a87 |
| 22-Jan-2019 |
Guenter Roeck <linux@roeck-us.net> |
hwmon: (vt8231) Use permission specific SENSOR[_DEVICE]_ATTR variants
Use SENSOR[_DEVICE]_ATTR[_2]_{RO,RW,WO} to simplify the source code, to improve readbility, and to reduce the chance of inconsis
hwmon: (vt8231) Use permission specific SENSOR[_DEVICE]_ATTR variants
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_<PERMS> 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.
Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
d5034db6 |
| 22-Dec-2016 |
Julia Lawall <Julia.Lawall@lip6.fr> |
hwmon: (vt8231) use permission-specific DEVICE_ATTR variants
Use DEVICE_ATTR_RO for read only attributes and DEVICE_ATTR_RW for read/write attributes. This simplifies the source code, improves readb
hwmon: (vt8231) use permission-specific DEVICE_ATTR variants
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 <Julia.Lawall@lip6.fr> [groeck: Updated description] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
2a1ed077 |
| 20-Oct-2014 |
Wolfram Sang <wsa@the-dreams.de> |
hwmon: drop owner assignment from platform_drivers
A platform_driver does not need to set an owner, it will be populated by the driver core.
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
|
#
cd9bb056 |
| 03-Dec-2013 |
Jingoo Han <jg1.han@samsung.com> |
hwmon: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred.
Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Jean Delvare <kha
hwmon: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred.
Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
3806b45b |
| 12-Dec-2013 |
Dan Carpenter <dan.carpenter@oracle.com> |
hwmon: Prevent some divide by zeros in FAN_TO_REG()
The "rpm * div" operations can overflow here, so this patch adds an upper limit to rpm to prevent that. Jean Delvare helped me with this patch.
hwmon: Prevent some divide by zeros in FAN_TO_REG()
The "rpm * div" operations can overflow here, so this patch adds an upper limit to rpm to prevent that. Jean Delvare helped me with this patch.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk> Cc: stable@vger.kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
show more ...
|
#
b55f3757 |
| 10-Jan-2013 |
Guenter Roeck <linux@roeck-us.net> |
hwmon: Fix checkpatch warning 'quoted string split across lines'
Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc
hwmon: Fix checkpatch warning 'quoted string split across lines'
Cc: Corentin Labbe <corentin.labbe@geomatys.fr> Cc: Mark M. Hoffman <mhoffman@lightlink.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Cc: Marc Hulsman <m.hulsman@tudelft.nl> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
2a844c14 |
| 09-Jan-2013 |
Guenter Roeck <linux@roeck-us.net> |
hwmon: Replace SENSORS_LIMIT with clamp_val
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
hwmon: Replace SENSORS_LIMIT with clamp_val
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 <linux@roeck-us.net> Acked-by: George Joseph <george.joseph@fairview5.com> Acked-by: Jean Delvare <khali@linux-fr.org>
show more ...
|
#
281dfd0b |
| 19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
hwmon: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com>
hwmon: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
6c931ae1 |
| 19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
hwmon: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com>
hwmon: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
9e5e9b7a |
| 19-Nov-2012 |
Bill Pemberton <wfp5p@virginia.edu> |
hwmon: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.
hwmon: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed.
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Jean Delvare <khali@linux-fr.org> Cc: Alistair John Strachan <alistair@devzero.co.uk> Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Juerg Haefliger <juergh@gmail.com> Cc: Andreas Herrmann <herrmann.der.user@googlemail.com> Cc: Clemens Ladisch <clemens@ladisch.de> Cc: Rudolf Marek <r.marek@assembler.cz> Cc: Jim Cromie <jim.cromie@gmail.com> Cc: "Mark M. Hoffman" <mhoffman@lightlink.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
show more ...
|
#
7711f1bd |
| 02-Jun-2012 |
Guenter Roeck <linux@roeck-us.net> |
hwmon: (vt8231) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <li
hwmon: (vt8231) Convert to use devm_ functions
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
61ba0318 |
| 19-Jan-2012 |
Guenter Roeck <linux@roeck-us.net> |
hwmon: (vt8231) Fix multi-line comments
Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
|
#
65fe5c79 |
| 15-Jan-2012 |
Guenter Roeck <linux@roeck-us.net> |
hwmon: (vt8231) Fix checkpatch issues
Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: trailing statements should be on next line WARNING:
hwmon: (vt8231) Fix checkpatch issues
Fixed: ERROR: code indent should use tabs where possible ERROR: do not use assignment in if condition ERROR: trailing statements should be on next line WARNING: braces {} are not necessary for any arm of this statement WARNING: line over 80 characters WARNING: please, no space before tabs WARNING: simple_strtol is obsolete, use kstrtol instead WARNING: simple_strtoul is obsolete, use kstrtoul instead
Not fixed (false positive): ERROR: Macros with multiple statements should be enclosed in a do - while loop
Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Acked-by: Roger Lucas <vt8231@hiddenengine.co.uk> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
show more ...
|
#
600151b9 |
| 05-Jan-2012 |
Frans Meulenbroeks <fransmeulenbroeks@gmail.com> |
hwmon: use DEFINE_PCI_DEVICE_TABLE
fix all checkpatch warnings about DEFINE_PCI_DEVICE_TABLE
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.ro
hwmon: use DEFINE_PCI_DEVICE_TABLE
fix all checkpatch warnings about DEFINE_PCI_DEVICE_TABLE
Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
show more ...
|
#
9d72be0d |
| 20-Oct-2010 |
Joe Perches <joe@perches.com> |
hwmon: (vt8231) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats
Signed-off-by: Joe Pe
hwmon: (vt8231) Use pr_fmt and pr_<level>
Added #define pr_fmt KBUILD_MODNAME ": " fmt Converted printks to pr_<level> Coalesced any long formats Removed prefixes from formats
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
show more ...
|
#
4cae7878 |
| 05-Mar-2010 |
Joe Perches <joe@perches.com> |
drivers/hwmon/vt8231.c: fix continuation line formats
String constants that are continued on subsequent lines with \ will cause spurious whitespace in the resulting output.
Signed-off-by: Joe Perch
drivers/hwmon/vt8231.c: fix continuation line formats
String constants that are continued on subsequent lines with \ will cause spurious whitespace in the resulting output.
Signed-off-by: Joe Perches <joe@perches.com> Cc: Roger Lucas <vt8231@hiddenengine.co.uk> Cc: Jean Delvare <khali@linux-fr.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
show more ...
|
#
3dd3a156 |
| 10-Jan-2010 |
Márton Németh <nm127@freemail.hu> |
hwmon: Make PCI device ids constant
The id_table field of the struct pci_driver is constant in <linux/pci.h> so it is worth to make pci_device_id also constant.
The semantic match that finds this k
hwmon: Make PCI device ids constant
The id_table field of the struct pci_driver is constant in <linux/pci.h> so it is worth to make pci_device_id also constant.
The semantic match that finds this kind of pattern is as follows: (http://coccinelle.lip6.fr/)
// <smpl> @r@ identifier I1, I2, x; @@ struct I1 { ... const struct I2 *x; ... }; @s@ identifier r.I1, y; identifier r.x, E; @@ struct I1 y = { .x = E, }; @c@ identifier r.I2; identifier s.E; @@ const struct I2 E[] = ... ; @depends on !c@ identifier r.I2; identifier s.E; @@ + const struct I2 E[] = ...; // </smpl>
Signed-off-by: Márton Németh <nm127@freemail.hu> Cc: Julia Lawall <julia@diku.dk> Signed-off-by: Jean Delvare <khali@linux-fr.org>
show more ...
|