Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2019-05-30 | treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 | Thomas Gleixner | 1 | -11/+1 | |
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 <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Richard Fontana <[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]> | |||||
2019-05-09 | platform/x86: alienware-wmi: printing the wrong error code | Dan Carpenter | 1 | -1/+1 | |
The "out_data" variable is uninitialized at the point. Originally, this used to print "status" instead and that seems like the correct thing to print. Fixes: bc2ef884320b ("alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable status") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> | |||||
2019-04-16 | platform/x86: alienware-wmi: fix kfree on potentially uninitialized pointer | Colin Ian King | 1 | -9/+8 | |
Currently the kfree of output.pointer can be potentially freeing an uninitalized pointer in the case where out_data is NULL. Fix this by reworking the case where out_data is not-null to perform the ACPI status check and also the kfree of outpoint.pointer in one block and hence ensuring the pointer is only freed when it has been used. Also replace the if (ptr != NULL) idiom with just if (ptr). Fixes: ff0e9f26288d ("platform/x86: alienware-wmi: Correct a memory leak") Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]> | |||||
2018-09-10 | platform/x86: alienware-wmi: Correct a memory leak | Mario Limonciello | 1 | -0/+1 | |
An ACPI buffer that was allocated was not being freed after use. Signed-off-by: Mario Limonciello <[email protected]> Cc: [email protected] Signed-off-by: Darren Hart (VMware) <[email protected]> | |||||
2018-06-12 | treewide: kzalloc() -> kcalloc() | Kees Cook | 1 | -3/+3 | |
The kzalloc() function has a 2-factor argument form, kcalloc(). This patch replaces cases of: kzalloc(a * b, gfp) with: kcalloc(a * b, gfp) as well as handling cases of: kzalloc(a * b * c, gfp) with: kzalloc(array3_size(a, b, c), gfp) as it's slightly less ugly than: kzalloc_array(array_size(a, b), c, gfp) This does, however, attempt to ignore constant size factors like: kzalloc(4 * 1024, gfp) though any constants defined via macros get caught up in the conversion. Any factors with a sizeof() of "unsigned char", "char", and "u8" were dropped, since they're redundant. The Coccinelle script used for this was: // Fix redundant parens around sizeof(). @@ type TYPE; expression THING, E; @@ ( kzalloc( - (sizeof(TYPE)) * E + sizeof(TYPE) * E , ...) | kzalloc( - (sizeof(THING)) * E + sizeof(THING) * E , ...) ) // Drop single-byte sizes and redundant parens. @@ expression COUNT; typedef u8; typedef __u8; @@ ( kzalloc( - sizeof(u8) * (COUNT) + COUNT , ...) | kzalloc( - sizeof(__u8) * (COUNT) + COUNT , ...) | kzalloc( - sizeof(char) * (COUNT) + COUNT , ...) | kzalloc( - sizeof(unsigned char) * (COUNT) + COUNT , ...) | kzalloc( - sizeof(u8) * COUNT + COUNT , ...) | kzalloc( - sizeof(__u8) * COUNT + COUNT , ...) | kzalloc( - sizeof(char) * COUNT + COUNT , ...) | kzalloc( - sizeof(unsigned char) * COUNT + COUNT , ...) ) // 2-factor product with sizeof(type/expression) and identifier or constant. @@ type TYPE; expression THING; identifier COUNT_ID; constant COUNT_CONST; @@ ( - kzalloc + kcalloc ( - sizeof(TYPE) * (COUNT_ID) + COUNT_ID, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * COUNT_ID + COUNT_ID, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * (COUNT_CONST) + COUNT_CONST, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * COUNT_CONST + COUNT_CONST, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * (COUNT_ID) + COUNT_ID, sizeof(THING) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * COUNT_ID + COUNT_ID, sizeof(THING) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * (COUNT_CONST) + COUNT_CONST, sizeof(THING) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * COUNT_CONST + COUNT_CONST, sizeof(THING) , ...) ) // 2-factor product, only identifiers. @@ identifier SIZE, COUNT; @@ - kzalloc + kcalloc ( - SIZE * COUNT + COUNT, SIZE , ...) // 3-factor product with 1 sizeof(type) or sizeof(expression), with // redundant parens removed. @@ expression THING; identifier STRIDE, COUNT; type TYPE; @@ ( kzalloc( - sizeof(TYPE) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | kzalloc( - sizeof(TYPE) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | kzalloc( - sizeof(TYPE) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | kzalloc( - sizeof(TYPE) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(TYPE)) , ...) | kzalloc( - sizeof(THING) * (COUNT) * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | kzalloc( - sizeof(THING) * (COUNT) * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | kzalloc( - sizeof(THING) * COUNT * (STRIDE) + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) | kzalloc( - sizeof(THING) * COUNT * STRIDE + array3_size(COUNT, STRIDE, sizeof(THING)) , ...) ) // 3-factor product with 2 sizeof(variable), with redundant parens removed. @@ expression THING1, THING2; identifier COUNT; type TYPE1, TYPE2; @@ ( kzalloc( - sizeof(TYPE1) * sizeof(TYPE2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | kzalloc( - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(TYPE2)) , ...) | kzalloc( - sizeof(THING1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | kzalloc( - sizeof(THING1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(THING1), sizeof(THING2)) , ...) | kzalloc( - sizeof(TYPE1) * sizeof(THING2) * COUNT + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) | kzalloc( - sizeof(TYPE1) * sizeof(THING2) * (COUNT) + array3_size(COUNT, sizeof(TYPE1), sizeof(THING2)) , ...) ) // 3-factor product, only identifiers, with redundant parens removed. @@ identifier STRIDE, SIZE, COUNT; @@ ( kzalloc( - (COUNT) * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - COUNT * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - COUNT * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - (COUNT) * (STRIDE) * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - COUNT * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - (COUNT) * STRIDE * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - (COUNT) * (STRIDE) * (SIZE) + array3_size(COUNT, STRIDE, SIZE) , ...) | kzalloc( - COUNT * STRIDE * SIZE + array3_size(COUNT, STRIDE, SIZE) , ...) ) // Any remaining multi-factor products, first at least 3-factor products, // when they're not all constants... @@ expression E1, E2, E3; constant C1, C2, C3; @@ ( kzalloc(C1 * C2 * C3, ...) | kzalloc( - (E1) * E2 * E3 + array3_size(E1, E2, E3) , ...) | kzalloc( - (E1) * (E2) * E3 + array3_size(E1, E2, E3) , ...) | kzalloc( - (E1) * (E2) * (E3) + array3_size(E1, E2, E3) , ...) | kzalloc( - E1 * E2 * E3 + array3_size(E1, E2, E3) , ...) ) // And then all remaining 2 factors products when they're not all constants, // keeping sizeof() as the second factor argument. @@ expression THING, E1, E2; type TYPE; constant C1, C2, C3; @@ ( kzalloc(sizeof(THING) * C2, ...) | kzalloc(sizeof(TYPE) * C2, ...) | kzalloc(C1 * C2 * C3, ...) | kzalloc(C1 * C2, ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * (E2) + E2, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(TYPE) * E2 + E2, sizeof(TYPE) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * (E2) + E2, sizeof(THING) , ...) | - kzalloc + kcalloc ( - sizeof(THING) * E2 + E2, sizeof(THING) , ...) | - kzalloc + kcalloc ( - (E1) * E2 + E1, E2 , ...) | - kzalloc + kcalloc ( - (E1) * (E2) + E1, E2 , ...) | - kzalloc + kcalloc ( - E1 * E2 + E1, E2 , ...) ) Signed-off-by: Kees Cook <[email protected]> | |||||
2017-11-27 | platform/x86: alienware-wmi: lightbar LED support for Dell Inspiron 5675 | Chang Liu | 1 | -0/+17 | |
Inspiron 5675 lightbar compatible with WMI interface on alienware, the difference lies in the zone number and color control. Add Inspiron 5675 DMI quirks to detect by dmi_check_system(). Signed-off-by: Chang Liu <[email protected]> Acked-by: Mario Limonciello <[email protected]> [andy: massaged commit message] Signed-off-by: Andy Shevchenko <[email protected]> | |||||
2017-07-25 | platform/x86: alienware-wmi: fix format string overflow warning | Arnd Bergmann | 1 | -19/+21 | |
gcc points out a possible format string overflow for a large value of 'zone': drivers/platform/x86/alienware-wmi.c: In function 'alienware_wmi_init': drivers/platform/x86/alienware-wmi.c:461:24: error: '%02X' directive writing between 2 and 8 bytes into a region of size 6 [-Werror=format-overflow=] sprintf(buffer, "zone%02X", i); ^~~~ drivers/platform/x86/alienware-wmi.c:461:19: note: directive argument in the range [0, 2147483646] sprintf(buffer, "zone%02X", i); ^~~~~~~~~~ drivers/platform/x86/alienware-wmi.c:461:3: note: 'sprintf' output between 7 and 13 bytes into a destination of size 10 This replaces the 'int' variable with an 'u8' to make sure it always fits, renaming the variable to 'zone' for clarity. Unfortunately, gcc-7.1.1 still warns about it with that change, which seems to be unintended by the gcc developers. I have opened a bug against gcc with a reduced test case. As a workaround, I also change the format string to use "%02hhX", which shuts up the warning in that version. Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81483 Link: https://patchwork.ozlabs.org/patch/788415/ Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> [andy: added empty lines after u8 zone; definitions] Signed-off-by: Andy Shevchenko <[email protected]> | |||||
2017-07-11 | platform/x86: alienware-wmi: constify attribute_group structures. | Arvind Yadav | 1 | -3/+3 | |
attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by <linux/sysfs.h> work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 6932 1016 48 7996 1f3c drivers/platform/x86/alienware-wmi.o File size After adding 'const': text data bss dec hex filename 7060 888 48 7996 1f64 drivers/platform/x86/alienware-wmi.o Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]> | |||||
2017-06-28 | platform/x86: alienware-wmi: Adjust instance of wmi_evaluate_method calls to 0 | Mario Limonciello | 1 | -4/+4 | |
Pali recently noticed that WMI instances are zero indexed. The only reason that these calls all worked properly is because the ASL didn't verify the instance number. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Darren Hart (VMware) <[email protected]> | |||||
2017-02-24 | platform/x86: alienware-wmi: Remove header duplicate | Andy Shevchenko | 1 | -1/+0 | |
No need to #include <linux/acpi.h> twice. Remove second occurrence. Signed-off-by: Andy Shevchenko <[email protected]> | |||||
2016-02-07 | alienware-wmi: whitespace improvements | Mario Limonciello | 1 | -9/+5 | |
These were some items that were pointed out in previous patches that weren't caught be previous reviewers, but should be applied to other parts of the driver as well. Signed-off-by: Mario Limonciello <[email protected]> [dvhart: reverted a couple incorrect line wrapping changes] Signed-off-by: Darren Hart <[email protected]> | |||||
2016-02-07 | alienware-wmi: Add support for two new systems: ASM200 and ASM201. | Mario Limonciello | 1 | -0/+32 | |
Both of these systems support: * 2 lighting control zones * HDMI mux control * deep sleep control (to enable wakup from controller) The ASM201 also supports the external graphics amplifier. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Darren Hart <[email protected]> | |||||
2016-02-07 | alienware-wmi: Add support for deep sleep control. | Mario Limonciello | 1 | -0/+95 | |
Allow for user configuration of BIOS settings that allow the system to be turned on via HID devices. The feature requires hardware architectural modifications and can not be supported on existing systems. Signed-off-by: Mario Limonciello <[email protected]> [dvhart: comment formatting and line length fixes] Signed-off-by: Darren Hart <[email protected]> | |||||
2016-02-07 | alienware-wmi: Add initial support for alienware graphics amplifier. | Mario Limonciello | 1 | -19/+88 | |
The alienware graphics amplifier is a device that provides external access to a full PCIe slot, USB hub, and additional control zone. This patch enables support for reading status whether the cable is plugged in as well as for setting the colors in the new zone on the amplifier. Signed-off-by: Mario Limonciello <[email protected]> [dvhart: minor comment formatting fixes] Signed-off-by: Darren Hart <[email protected]> | |||||
2016-02-07 | alienware-wmi: Add support for new platform: X51-R3 | Mario Limonciello | 1 | -5/+19 | |
The X51-R3 is in the X51 family. It includes 3 internal lighting zones as well as is the first AW desktop that includes support for a graphics amplifier. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Darren Hart <[email protected]> | |||||
2016-02-07 | alienware-wmi: Clean up whitespace for ASM100 platform | Mario Limonciello | 1 | -8/+8 | |
This brings them more in line with the usage of whitespace in other platforms. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Darren Hart <[email protected]> | |||||
2014-10-20 | platform: x86: drop owner assignment from platform_drivers | Wolfram Sang | 1 | -1/+0 | |
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]> | |||||
2014-08-16 | alienware-wmi: make hdmi_mux enabled on case-by-case basis | Mario Limonciello | 1 | -2/+20 | |
Not all HW supporting WMAX method will support the HDMI mux feature. Explicitly quirk the HW that does support it. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> | |||||
2014-08-16 | alienware-wmi: Mark DMI table as __initconst | Mathias Krause | 1 | -2/+2 | |
The DMI table is only ever used during initialization. Mark it as __initconst so its memory can be released appropriately. In turn, the callback function can be marked with __init, too. Signed-off-by: Mathias Krause <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> | |||||
2014-06-10 | alienware-wmi: For WMAX HDMI method, introduce a way to query HDMI cable status | Mario Limonciello | 1 | -30/+88 | |
Since there are now multiple HDMI attributes associated with the WMAX method, create a sysfs group for them instead. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> | |||||
2014-06-09 | alienware-wmi: Update WMAX brightness method limit to 15 | Mario Limonciello | 1 | -2/+1 | |
This more closely reflects what the hardware can actually support. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> | |||||
2014-04-10 | alienware-wmi: cover some scenarios where memory allocations would fail | Mario Limonciello | 1 | -2/+10 | |
Intel test builder caught a few instances that should test if kzalloc failed to allocate memory as well as a scenario that platform_driver wasn't properly initialized. Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> | |||||
2014-04-06 | Add WMI driver for controlling AlienFX features on some Alienware products | Mario Limonciello | 1 | -0/+557 | |
Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Matthew Garrett <[email protected]> |