Skip to content

Commit

Permalink
Merge branches 'acpi-misc', 'acpi-tools' and 'acpi-docs'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Rafael J. Wysocki committed Oct 3, 2022
4 parents 7b4baa3 + 67ef3d7 + 4008373 + d206cef commit a7ece53
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 41 deletions.
13 changes: 0 additions & 13 deletions Documentation/admin-guide/acpi/dsdt-override.rst

This file was deleted.

16 changes: 8 additions & 8 deletions Documentation/firmware-guide/acpi/enumeration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ possible we decided to do following:
- Devices behind real busses where there is a connector resource
are represented as struct spi_device or struct i2c_device. Note
that standard UARTs are not busses so there is no struct uart_device,
although some of them may be represented by sturct serdev_device.
although some of them may be represented by struct serdev_device.

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

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

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

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

In the above example we can get the corresponding two GPIO descriptors with
Expand Down Expand Up @@ -538,8 +538,8 @@ information.
PCI hierarchy representation
============================

Sometimes could be useful to enumerate a PCI device, knowing its position on the
PCI bus.
Sometimes it could be useful to enumerate a PCI device, knowing its position on
the PCI bus.

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

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

Bus: 0 - Device: 14 - Function: 1

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

mkdir ~/tables/
cd ~/tables/
Expand Down
3 changes: 0 additions & 3 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,6 @@ M: "Rafael J. Wysocki" <rafael@kernel.org>
R: Len Brown <lenb@kernel.org>
L: linux-acpi@vger.kernel.org
S: Supported
W: https://01.org/linux-acpi
Q: https://patchwork.kernel.org/project/linux-acpi/list/
B: https://bugzilla.kernel.org
T: git git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Expand Down Expand Up @@ -427,7 +426,6 @@ M: Rafael J. Wysocki <rafael@kernel.org>
R: Zhang Rui <rui.zhang@intel.com>
L: linux-acpi@vger.kernel.org
S: Supported
W: https://01.org/linux-acpi
B: https://bugzilla.kernel.org
F: drivers/acpi/*thermal*

Expand Down Expand Up @@ -10378,7 +10376,6 @@ INTEL MENLOW THERMAL DRIVER
M: Sujith Thomas <sujith.thomas@intel.com>
L: linux-pm@vger.kernel.org
S: Supported
W: https://01.org/linux-acpi
F: drivers/thermal/intel/intel_menlow.c

INTEL P-Unit IPC DRIVER
Expand Down
4 changes: 0 additions & 4 deletions drivers/acpi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ menuconfig ACPI
Management (APM) specification. If both ACPI and APM support
are configured, ACPI is used.

The project home page for the Linux ACPI subsystem is here:
<https://01.org/linux-acpi>

Linux support for ACPI is based on Intel Corporation's ACPI
Component Architecture (ACPI CA). For more information on the
ACPI CA, see:
Expand Down Expand Up @@ -347,7 +344,6 @@ config ACPI_CUSTOM_DSDT_FILE
depends on !STANDALONE
help
This option supports a custom DSDT by linking it into the kernel.
See Documentation/admin-guide/acpi/dsdt-override.rst

Enter the full path name to the file which includes the AmlCode
or dsdt_aml_code declaration.
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ static bool acpi_of_modalias(struct acpi_device *adev,

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

return true;
}
Expand All @@ -822,7 +822,7 @@ void acpi_set_modalias(struct acpi_device *adev, const char *default_id,
char *modalias, size_t len)
{
if (!acpi_of_modalias(adev, modalias, len))
strlcpy(modalias, default_id, len);
strscpy(modalias, default_id, len);
}
EXPORT_SYMBOL_GPL(acpi_set_modalias);

Expand Down
3 changes: 0 additions & 3 deletions drivers/acpi/dptf/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ menuconfig ACPI_DPTF
a coordinated approach for different policies to effect the hardware
state of a system.

For more information see:
<https://01.org/intel%C2%AE-dynamic-platform-and-thermal-framework-dptf-chromium-os/overview>

if ACPI_DPTF

config DPTF_POWER
Expand Down
8 changes: 4 additions & 4 deletions drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr)

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

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

lpi_state->index = state_idx;
Expand Down Expand Up @@ -1022,7 +1022,7 @@ static bool combine_lpi_states(struct acpi_lpi_state *local,
result->arch_flags = parent->arch_flags;
result->index = parent->index;

strlcpy(result->desc, local->desc, ACPI_CX_DESC_LEN);
strscpy(result->desc, local->desc, ACPI_CX_DESC_LEN);
strlcat(result->desc, "+", ACPI_CX_DESC_LEN);
strlcat(result->desc, parent->desc, ACPI_CX_DESC_LEN);
return true;
Expand Down Expand Up @@ -1196,7 +1196,7 @@ static int acpi_processor_setup_lpi_states(struct acpi_processor *pr)

state = &drv->states[i];
snprintf(state->name, CPUIDLE_NAME_LEN, "LPI-%d", i);
strlcpy(state->desc, lpi->desc, CPUIDLE_DESC_LEN);
strscpy(state->desc, lpi->desc, CPUIDLE_DESC_LEN);
state->exit_latency = lpi->wake_latency;
state->target_residency = lpi->min_residency;
if (lpi->arch_flags)
Expand Down
6 changes: 3 additions & 3 deletions drivers/acpi/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ bool acpi_dev_present(const char *hid, const char *uid, s64 hrv)
struct acpi_dev_match_info match = {};
struct device *dev;

strlcpy(match.hid[0].id, hid, sizeof(match.hid[0].id));
strscpy(match.hid[0].id, hid, sizeof(match.hid[0].id));
match.uid = uid;
match.hrv = hrv;

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

strlcpy(match.hid[0].id, hid, sizeof(match.hid[0].id));
strscpy(match.hid[0].id, hid, sizeof(match.hid[0].id));
match.uid = uid;
match.hrv = hrv;

Expand Down Expand Up @@ -961,7 +961,7 @@ EXPORT_SYMBOL(acpi_video_backlight_string);

static int __init acpi_backlight(char *str)
{
strlcpy(acpi_video_backlight_string, str,
strscpy(acpi_video_backlight_string, str,
sizeof(acpi_video_backlight_string));
return 1;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/power/acpi/tools/pfrut/pfrut.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ int main(int argc, char *argv[])
void *addr_map_capsule;
struct stat st;
char *log_buf;
int ret = 0;
int ret;

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

0 comments on commit a7ece53

Please sign in to comment.