Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp269554pxu; Tue, 5 Jan 2021 10:21:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJbvlyAxQszl8Sb2vV81DJXHu9S+VKruc3YwmFE1ocVF7rsHK2f1qP6TtHe8WBMeJKHTK0 X-Received: by 2002:a17:907:c15:: with SMTP id ga21mr372599ejc.472.1609870895242; Tue, 05 Jan 2021 10:21:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609870895; cv=none; d=google.com; s=arc-20160816; b=uQqMtCDl2RdzxWwizBH8dhM3MCNlMDCFxkNpF0V1AL6aDChHJLPDJAwYuJesrQwzAb rS4MVpvGvaPpS9/AtxbJuOLLXLTFmOg29b+mC9p7LEzh+/UfTnioIqgO7+IPE47wJxjn /LPfseQTWvUNqqxrfVrbeYkET1CUT1tlLoBdRLdyeVGFgmh+NaELarqEX5IgvC9Xj+Y5 l3N4qsFwkr1LuqwTUWpSTZ69zymMtI7UWSvnOeCjeWFfa9uaLe7b94x9Nl6YlLCgbQxO seClPBpqSK4vfeiaFwpf6airzjfzOb1ZiylvZ5ot0yCMMphJJkt91Fw8G8EYHh1czBoj hHPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=VwIGxJfdh66GCZse5oXKJXk06mRqoo+l4D6jDJkDDgo=; b=HeOzSBZRnyjYAu2sadR+kOpnpizrNHnD549FK0/rQDf/dCuL9954uYxie6stIM5AYp pkAfsjqC+eT5CjFSRcw8mcjemzElZAL+VqpNvvpFHANd8MU+2J2cEnwMErcdcwWut5ls MIbRDdZkr5c8rs25q0M2TT7S+0HLgYcq04J1hUZv1I0wAz3uDFQpffJzwcblEfq2vnft 3/cMw9qCLD2t/NHAR4eCo9rxXkCW2EyeMluDS6dIitPp1YvGjUQh46Y60hmDKvbo3N4J SAY5XKbcGoNLGSPyFfsvz9SOJebaXzXIEOAyiazwj54fMeTSrMgLoMF2QEwT5x9RFbTT c+NQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e25si201477edq.489.2021.01.05.10.21.11; Tue, 05 Jan 2021 10:21:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728167AbhAESUB (ORCPT + 99 others); Tue, 5 Jan 2021 13:20:01 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:45758 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbhAESUB (ORCPT ); Tue, 5 Jan 2021 13:20:01 -0500 Received: from 89-77-60-66.dynamic.chello.pl (89.77.60.66) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.537) id 3070e0ba3920ff17; Tue, 5 Jan 2021 19:19:19 +0100 From: "Rafael J. Wysocki" To: Linux PM Cc: LKML , Srinivas Pandruvada , Shyam Sundar S K Subject: [PATCH] ACPI: PM: s2idle: Drop unused local variables and related code Date: Tue, 05 Jan 2021 19:19:18 +0100 Message-ID: <3607102.xkEKTzvHZR@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Two local variables in drivers/acpi/x86/s2idle.c are never read, so drop them along with the code updating their values (in vain). Fixes: fef98671194b ("ACPI: PM: s2idle: Move x86-specific code to the x86 directory") Signed-off-by: Rafael J. Wysocki --- drivers/acpi/x86/s2idle.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) Index: linux-pm/drivers/acpi/x86/s2idle.c =================================================================== --- linux-pm.orig/drivers/acpi/x86/s2idle.c +++ linux-pm/drivers/acpi/x86/s2idle.c @@ -105,18 +105,8 @@ static void lpi_device_get_constraints_a for (i = 0; i < out_obj->package.count; i++) { union acpi_object *package = &out_obj->package.elements[i]; - struct lpi_device_info_amd info = { }; - if (package->type == ACPI_TYPE_INTEGER) { - switch (i) { - case 0: - info.revision = package->integer.value; - break; - case 1: - info.count = package->integer.value; - break; - } - } else if (package->type == ACPI_TYPE_PACKAGE) { + if (package->type == ACPI_TYPE_PACKAGE) { lpi_constraints_table = kcalloc(package->package.count, sizeof(*lpi_constraints_table), GFP_KERNEL); @@ -135,12 +125,10 @@ static void lpi_device_get_constraints_a for (k = 0; k < info_obj->package.count; ++k) { union acpi_object *obj = &info_obj->package.elements[k]; - union acpi_object *obj_new; list = &lpi_constraints_table[lpi_constraints_table_size]; list->min_dstate = -1; - obj_new = &obj[k]; switch (k) { case 0: dev_info.enabled = obj->integer.value;