Skip to content

Commit a7ece53

Browse files
committed
Merge branches 'acpi-misc', 'acpi-tools' and 'acpi-docs'
Merge miscellaneous ACPI material, ACPI tools changes and ACPI documentation updates for 6.1-rc1: - Drop references to non-functional 01.org/linux-acpi web site from MAINTAINERS and Kconfig help texts (Rafael Wysocki). - Replace strlcpy() with unused retval with strscpy() in the ACPI support code (Wolfram Sang). - Do not initialize ret in main() in the pfrut utility (Shi junming). - Drop useless ACPI DSDT override documentation (Rafael Wysocki). - Fix a few typos and wording mistakes in the ACPI device enumeration documentation (Jean Delvare). * acpi-misc: MAINTAINERS: Drop records pointing to 01.org/linux-acpi ACPI: Kconfig: Drop link to https://01.org/linux-acpi ACPI: DPTF: Drop stale link from Kconfig help ACPI: move from strlcpy() with unused retval to strscpy() * acpi-tools: ACPI: tools: pfrut: Do not initialize ret in main() * acpi-docs: ACPI: docs: Drop useless DSDT override documentation ACPI: docs: enumeration: Fix a few typos and wording mistakes
4 parents 7b4baa3 + 67ef3d7 + 4008373 + d206cef commit a7ece53

File tree

9 files changed

+18
-41
lines changed

9 files changed

+18
-41
lines changed

Documentation/admin-guide/acpi/dsdt-override.rst

Lines changed: 0 additions & 13 deletions
This file was deleted.

Documentation/firmware-guide/acpi/enumeration.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ possible we decided to do following:
2121
- Devices behind real busses where there is a connector resource
2222
are represented as struct spi_device or struct i2c_device. Note
2323
that standard UARTs are not busses so there is no struct uart_device,
24-
although some of them may be represented by sturct serdev_device.
24+
although some of them may be represented by struct serdev_device.
2525

2626
As both ACPI and Device Tree represent a tree of devices (and their
2727
resources) this implementation follows the Device Tree way as much as
@@ -205,7 +205,7 @@ Here is what the ACPI namespace for a SPI slave might look like::
205205
}
206206
...
207207

208-
The SPI device drivers only need to add ACPI IDs in a similar way than with
208+
The SPI device drivers only need to add ACPI IDs in a similar way to
209209
the platform device drivers. Below is an example where we add ACPI support
210210
to at25 SPI eeprom driver (this is meant for the above ACPI snippet)::
211211

@@ -362,7 +362,7 @@ These GPIO numbers are controller relative and path "\\_SB.PCI0.GPI0"
362362
specifies the path to the controller. In order to use these GPIOs in Linux
363363
we need to translate them to the corresponding Linux GPIO descriptors.
364364

365-
There is a standard GPIO API for that and is documented in
365+
There is a standard GPIO API for that and it is documented in
366366
Documentation/admin-guide/gpio/.
367367

368368
In the above example we can get the corresponding two GPIO descriptors with
@@ -538,8 +538,8 @@ information.
538538
PCI hierarchy representation
539539
============================
540540

541-
Sometimes could be useful to enumerate a PCI device, knowing its position on the
542-
PCI bus.
541+
Sometimes it could be useful to enumerate a PCI device, knowing its position on
542+
the PCI bus.
543543

544544
For example, some systems use PCI devices soldered directly on the mother board,
545545
in a fixed position (ethernet, Wi-Fi, serial ports, etc.). In this conditions it
@@ -550,7 +550,7 @@ To identify a PCI device, a complete hierarchical description is required, from
550550
the chipset root port to the final device, through all the intermediate
551551
bridges/switches of the board.
552552

553-
For example, let us assume to have a system with a PCIe serial port, an
553+
For example, let's assume we have a system with a PCIe serial port, an
554554
Exar XR17V3521, soldered on the main board. This UART chip also includes
555555
16 GPIOs and we want to add the property ``gpio-line-names`` [1] to these pins.
556556
In this case, the ``lspci`` output for this component is::
@@ -593,8 +593,8 @@ of the chipset bridge (also called "root port") with address::
593593

594594
Bus: 0 - Device: 14 - Function: 1
595595

596-
To find this information is necessary disassemble the BIOS ACPI tables, in
597-
particular the DSDT (see also [2])::
596+
To find this information, it is necessary to disassemble the BIOS ACPI tables,
597+
in particular the DSDT (see also [2])::
598598

599599
mkdir ~/tables/
600600
cd ~/tables/

MAINTAINERS

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,6 @@ M: "Rafael J. Wysocki" <[email protected]>
348348
R: Len Brown <[email protected]>
349349
350350
S: Supported
351-
W: https://01.org/linux-acpi
352351
Q: https://patchwork.kernel.org/project/linux-acpi/list/
353352
B: https://bugzilla.kernel.org
354353
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
@@ -427,7 +426,6 @@ M: Rafael J. Wysocki <[email protected]>
427426
R: Zhang Rui <[email protected]>
428427
429428
S: Supported
430-
W: https://01.org/linux-acpi
431429
B: https://bugzilla.kernel.org
432430
F: drivers/acpi/*thermal*
433431

@@ -10378,7 +10376,6 @@ INTEL MENLOW THERMAL DRIVER
1037810376
M: Sujith Thomas <[email protected]>
1037910377
1038010378
S: Supported
10381-
W: https://01.org/linux-acpi
1038210379
F: drivers/thermal/intel/intel_menlow.c
1038310380

1038410381
INTEL P-Unit IPC DRIVER

drivers/acpi/Kconfig

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ menuconfig ACPI
2727
Management (APM) specification. If both ACPI and APM support
2828
are configured, ACPI is used.
2929

30-
The project home page for the Linux ACPI subsystem is here:
31-
<https://01.org/linux-acpi>
32-
3330
Linux support for ACPI is based on Intel Corporation's ACPI
3431
Component Architecture (ACPI CA). For more information on the
3532
ACPI CA, see:
@@ -347,7 +344,6 @@ config ACPI_CUSTOM_DSDT_FILE
347344
depends on !STANDALONE
348345
help
349346
This option supports a custom DSDT by linking it into the kernel.
350-
See Documentation/admin-guide/acpi/dsdt-override.rst
351347

352348
Enter the full path name to the file which includes the AmlCode
353349
or dsdt_aml_code declaration.

drivers/acpi/bus.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ static bool acpi_of_modalias(struct acpi_device *adev,
802802

803803
str = obj->string.pointer;
804804
chr = strchr(str, ',');
805-
strlcpy(modalias, chr ? chr + 1 : str, len);
805+
strscpy(modalias, chr ? chr + 1 : str, len);
806806

807807
return true;
808808
}
@@ -822,7 +822,7 @@ void acpi_set_modalias(struct acpi_device *adev, const char *default_id,
822822
char *modalias, size_t len)
823823
{
824824
if (!acpi_of_modalias(adev, modalias, len))
825-
strlcpy(modalias, default_id, len);
825+
strscpy(modalias, default_id, len);
826826
}
827827
EXPORT_SYMBOL_GPL(acpi_set_modalias);
828828

drivers/acpi/dptf/Kconfig

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ menuconfig ACPI_DPTF
1111
a coordinated approach for different policies to effect the hardware
1212
state of a system.
1313

14-
For more information see:
15-
<https://01.org/intel%C2%AE-dynamic-platform-and-thermal-framework-dptf-chromium-os/overview>
16-
1714
if ACPI_DPTF
1815

1916
config DPTF_POWER

drivers/acpi/processor_idle.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr)
787787

788788
state = &drv->states[count];
789789
snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i);
790-
strlcpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
790+
strscpy(state->desc, cx->desc, CPUIDLE_DESC_LEN);
791791
state->exit_latency = cx->latency;
792792
state->target_residency = cx->latency * latency_factor;
793793
state->enter = acpi_idle_enter;
@@ -956,7 +956,7 @@ static int acpi_processor_evaluate_lpi(acpi_handle handle,
956956

957957
obj = pkg_elem + 9;
958958
if (obj->type == ACPI_TYPE_STRING)
959-
strlcpy(lpi_state->desc, obj->string.pointer,
959+
strscpy(lpi_state->desc, obj->string.pointer,
960960
ACPI_CX_DESC_LEN);
961961

962962
lpi_state->index = state_idx;
@@ -1022,7 +1022,7 @@ static bool combine_lpi_states(struct acpi_lpi_state *local,
10221022
result->arch_flags = parent->arch_flags;
10231023
result->index = parent->index;
10241024

1025-
strlcpy(result->desc, local->desc, ACPI_CX_DESC_LEN);
1025+
strscpy(result->desc, local->desc, ACPI_CX_DESC_LEN);
10261026
strlcat(result->desc, "+", ACPI_CX_DESC_LEN);
10271027
strlcat(result->desc, parent->desc, ACPI_CX_DESC_LEN);
10281028
return true;
@@ -1196,7 +1196,7 @@ static int acpi_processor_setup_lpi_states(struct acpi_processor *pr)
11961196

11971197
state = &drv->states[i];
11981198
snprintf(state->name, CPUIDLE_NAME_LEN, "LPI-%d", i);
1199-
strlcpy(state->desc, lpi->desc, CPUIDLE_DESC_LEN);
1199+
strscpy(state->desc, lpi->desc, CPUIDLE_DESC_LEN);
12001200
state->exit_latency = lpi->wake_latency;
12011201
state->target_residency = lpi->min_residency;
12021202
if (lpi->arch_flags)

drivers/acpi/utils.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ bool acpi_dev_present(const char *hid, const char *uid, s64 hrv)
878878
struct acpi_dev_match_info match = {};
879879
struct device *dev;
880880

881-
strlcpy(match.hid[0].id, hid, sizeof(match.hid[0].id));
881+
strscpy(match.hid[0].id, hid, sizeof(match.hid[0].id));
882882
match.uid = uid;
883883
match.hrv = hrv;
884884

@@ -911,7 +911,7 @@ acpi_dev_get_next_match_dev(struct acpi_device *adev, const char *hid, const cha
911911
struct acpi_dev_match_info match = {};
912912
struct device *dev;
913913

914-
strlcpy(match.hid[0].id, hid, sizeof(match.hid[0].id));
914+
strscpy(match.hid[0].id, hid, sizeof(match.hid[0].id));
915915
match.uid = uid;
916916
match.hrv = hrv;
917917

@@ -961,7 +961,7 @@ EXPORT_SYMBOL(acpi_video_backlight_string);
961961

962962
static int __init acpi_backlight(char *str)
963963
{
964-
strlcpy(acpi_video_backlight_string, str,
964+
strscpy(acpi_video_backlight_string, str,
965965
sizeof(acpi_video_backlight_string));
966966
return 1;
967967
}

tools/power/acpi/tools/pfrut/pfrut.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ int main(int argc, char *argv[])
190190
void *addr_map_capsule;
191191
struct stat st;
192192
char *log_buf;
193-
int ret = 0;
193+
int ret;
194194

195195
if (getuid() != 0) {
196196
printf("Please run the tool as root - Exiting.\n");

0 commit comments

Comments
 (0)