Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fac69a2b authored by Fabian Frederick's avatar Fabian Frederick Committed by Rafael J. Wysocki
Browse files

PNP / ACPI: use unsigned int in pnpacpi_encode_resources()



use unsigned int for port, irq, dma and mem used for pnp_get_resource()
This fixes gcc warnings of type "conversion to unsigned int
from int may change the sign of the result"

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent bbee06d0
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -873,7 +873,7 @@ int pnpacpi_encode_resources(struct pnp_dev *dev, struct acpi_buffer *buffer)
	/* pnpacpi_build_resource_template allocates extra mem */
	/* pnpacpi_build_resource_template allocates extra mem */
	int res_cnt = (buffer->length - 1) / sizeof(struct acpi_resource) - 1;
	int res_cnt = (buffer->length - 1) / sizeof(struct acpi_resource) - 1;
	struct acpi_resource *resource = buffer->pointer;
	struct acpi_resource *resource = buffer->pointer;
	int port = 0, irq = 0, dma = 0, mem = 0;
	unsigned int port = 0, irq = 0, dma = 0, mem = 0;


	pnp_dbg(&dev->dev, "encode %d resources\n", res_cnt);
	pnp_dbg(&dev->dev, "encode %d resources\n", res_cnt);
	while (i < res_cnt) {
	while (i < res_cnt) {