Age | Commit message (Collapse) | Author | Files | Lines |
|
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 <[email protected]>
Signed-off-by: Saheed O. Bolarinwa <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 <[email protected]>
Reviewed-by: Michael Ellerman <[email protected]> (powerpc)
Reviewed-by: Richard Fontana <[email protected]>
Reviewed-by: Allison Randal <[email protected]>
Reviewed-by: Kate Stewart <[email protected]>
Cc: [email protected]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 <[email protected]>
[groeck: Updated description]
Signed-off-by: Guenter Roeck <[email protected]>
|
|
A platform_driver does not need to set an owner, it will be populated by the
driver core.
Signed-off-by: Wolfram Sang <[email protected]>
|
|
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Jean Delvare <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 <[email protected]>
Acked-by: Roger Lucas <[email protected]>
Cc: [email protected]
Signed-off-by: Jean Delvare <[email protected]>
|
|
Cc: Corentin Labbe <[email protected]>
Cc: Mark M. Hoffman <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Rudolf Marek <[email protected]>
Cc: Jim Cromie <[email protected]>
Cc: Roger Lucas <[email protected]>
Cc: Marc Hulsman <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 <[email protected]>
Acked-by: George Joseph <[email protected]>
Acked-by: Jean Delvare <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Alistair John Strachan <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Cc: Rudolf Marek <[email protected]>
Cc: Jim Cromie <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Roger Lucas <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Alistair John Strachan <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Cc: Rudolf Marek <[email protected]>
Cc: Jim Cromie <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Roger Lucas <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Alistair John Strachan <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Andreas Herrmann <[email protected]>
Cc: Clemens Ladisch <[email protected]>
Cc: Rudolf Marek <[email protected]>
Cc: Jim Cromie <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Roger Lucas <[email protected]>
Acked-by: Guenter Roeck <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Convert to use devm_ functions to reduce code size and simplify the code.
Cc: Roger Lucas <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
Cc: Roger Lucas <[email protected]>
Acked-by: Roger Lucas <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 <[email protected]>
Acked-by: Roger Lucas <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
fix all checkpatch warnings about DEFINE_PCI_DEVICE_TABLE
Signed-off-by: Frans Meulenbroeks <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
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 <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
|
|
String constants that are continued on subsequent lines with \ will cause
spurious whitespace in the resulting output.
Signed-off-by: Joe Perches <[email protected]>
Cc: Roger Lucas <[email protected]>
Cc: Jean Delvare <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
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 <[email protected]>
Cc: Julia Lawall <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
Drivers should be including <linux/io.h> instead of <asm/io.h>.
Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Alistair John Strachan <[email protected]>
Cc: Nicolas Boichat <[email protected]>
Cc: Juerg Haefliger <[email protected]>
Cc: Frank Seidel <[email protected]>
Acked-by: Jim Cromie <[email protected]>
Cc: "Mark M. Hoffman" <[email protected]>
Cc: Roger Lucas <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
Check for ACPI resource conflicts in hwmon drivers. I've included
all Super-I/O and PCI drivers.
I've voluntarily left out:
* Vendor-specific drivers: if they conflicted on any system, this would
pretty much mean that they conflict on all systems, and we would know
by now.
* Legacy ISA drivers (lm78 and w83781d): they only support chips found
on old designs were ACPI either wasn't supported or didn't deal with
thermal management.
* Drivers accessing the I/O resources indirectly (e.g. through SMBus):
the checks are already done where they belong, i.e. in the bus drivers.
Signed-off-by: Jean Delvare <[email protected]>
Acked-by: David Hubbard <[email protected]>
|
|
Signed-off-by: Roger Lucas <[email protected]>
(modified MAINTAINERS entry also - MMH)
Signed-off-by: Mark M. Hoffman <[email protected]>
|
|
The new libsensors needs these individual alarm files.
Signed-off-by: Jean Delvare <[email protected]>
CC: Roger Lucas <[email protected]>
Acked-by: Juerg Haefliger <juergh at gmail.com>
Signed-off-by: Mark M. Hoffman <[email protected]>
|
|
Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Mark M. Hoffman <[email protected]>
|
|
Signed-off-by: Mark M. Hoffman <[email protected]>
|
|
Convert from class_device to device for hwmon_device_register/unregister
Signed-off-by: Tony Jones <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Kay Sievers <[email protected]>
Signed-off-by: Mark M. Hoffman <[email protected]>
|
|
On Sun, 22 Jul 2007 00:30:56 +0200, Gabriel C wrote:
> I noticed this warnings on current git:
>
> drivers/hwmon/pc87360.c:1082: warning: 'pc87360_remove' defined but not used
> drivers/hwmon/sis5595.c:580: warning: 'sis5595_remove' defined but not used
> drivers/hwmon/smsc47m1.c:608: warning: 'smsc47m1_remove' defined but not used
> drivers/hwmon/via686a.c:648: warning: 'via686a_remove' defined but not used
> drivers/hwmon/vt8231.c:755: warning: 'vt8231_remove' defined but not used
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Mark M. Hoffman <[email protected]>
|
|
Fix a potential race condition when some hardware monitoring platform
drivers are being unloaded. I believe that the driver data pointer
shouldn't be cleared before all the sysfs files are removed, otherwise
a sysfs callback might attempt to dereference a NULL pointer. I'm not
sure exactly what the driver core protects drivers against, so let's
play it safe.
While we're here, clear the driver data pointer when probe fails, so
as to not leave an invalid pointer behind us.
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Mark M. Hoffman <[email protected]>
|
|
Convert the vt8231 driver from the nonsensical i2c-isa hack to a
regular platform driver.
Signed-off-by: Roger Lucas <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Mark M. Hoffman <[email protected]>
|
|
Remove a superfluous initialization from the vt8231 hwmon driver; the
i2c core does this, and the source field will be vanishing soon.
Signed-off-by: David Brownell <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
|
|
vt8231: Fix unchecked return status
Check the return status from device_create_file() and also use
the newer and cleaner sysfs creation functions.
Signed-off-by: Roger Lucas <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
i2c-isa: Restore driver owner
Commit 2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 back in January
2006 was a bit overzealous. It removed .owner from all i2c drivers,
including i2c-isa ones, while they still need it.
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
convert drivers/hwmon/*.c semaphore use to mutexes.
the conversion was generated via scripts, and the result was validated
automatically via a script as well.
all affected hwmon drivers were build-tested.
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The VT8231 low temperature limits are actually hysteresis temperatures
to the high limits.
Signed-off-by: Jean Delvare <[email protected]>
Cc: Roger Lucas <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Replace obsolete pci_module_init() with pci_register_driver().
Signed-off-by: Richard Knutsson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Now that i2c_add_driver() doesn't need the module owner to be set by
hand, we can delete it from the drivers. This patch catches all of the
drivers that I found in the current tree (if a driver sets the .owner by
hand, it's not a problem, just not needed.)
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Cc: Jean Delvare <[email protected]>
|
|
We should use the i2c_driver.driver's .name and .owner fields
instead of the i2c_driver's ones.
This patch updates the hwmon drivers.
Signed-off-by: Laurent Riffard <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Port the vt8231 hardware monitoring driver from lm_sensors CVS to
Linux 2.6.
Signed-off-by: Roger Lucas <[email protected]>
Signed-off-by: Jean Delvare <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|