From patchwork Sat Nov 7 08:49:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 320895 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp231009ilc; Sat, 7 Nov 2020 00:49:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJw7jOUBGxECC1tgv4FuAlQny++ax7gLlhbV8wbvvPRkjXUmPRPBOV69LpEXQXqqy1PWXGa8 X-Received: by 2002:a17:906:13cd:: with SMTP id g13mr6326468ejc.394.1604738993780; Sat, 07 Nov 2020 00:49:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604738993; cv=none; d=google.com; s=arc-20160816; b=K3CQ5wUy89eeU5qRiHc512tZYA/d8OM8qXnxHAxDNtKXuCLtzQ9oMsQNkd/Zdcnc6V erzkjuYdQnK6T3NFddAQ6Het30GOJCJBRrc0huidOw+CvkqRQl695KsXd2H9j7c24pXY KrTpyaDw5ZVcVVGCFKnXCWGzxNHfUoM1pt1pCGMesM2h+mMEnQsUzQdNF7znxq6Fq8+n Oc/GDJkKEGLB/u3yIkIN8/pTHrg4EsrempZiHLxUTo+pSm+0pVnR7fJEUTfNHDfo+ncQ Jqkp2UxK5ENKSEbuIcpeICPSWK8u2kbfO2RfF1SAX4MHXPjmxNltjUk1KYHRF9UoUexf AdGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:sender:dkim-signature; bh=6WU5XJ/qlfBh5YZsFPkg9rhMeyoErIKJCIfbV8EW5YE=; b=QZT6j8fghWgBJfrg13Bpc0To9IIuh8DRU52Fkcfs92fycv7fpcReb3+Y3Qm0t7Ic7m Dbx4/Ti2Wy/A3Q1Z/M43IGLnDOCWz+FQKag5xiJW+TJ9j6ayc6S8pDPkNP5I2oWjc3xW IMcoyOf8u327OgwqlCCL8hwUMLMJS0cJaaYYEYhrkf/s90yTuUmK7YzhB5DBcDQK6PFs Xp5FdMLG5GAhTNqVTebYHQ+Ok3hYSk+jjamEk7vvCr3h6s3eHOdFB0/HqYQadR9izYVl dnAf+IFpIyDjEzbihIfpl2e62qEIZnonpFkZjiGu/ziD/pL1ysgyZDHe+VTAXZWiMjqN ZJPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="dD9J/n8G"; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dj4si2871980edb.64.2020.11.07.00.49.49; Sat, 07 Nov 2020 00:49:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="dD9J/n8G"; spf=pass (google.com: domain of linux-acpi-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-acpi-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728074AbgKGItt (ORCPT + 7 others); Sat, 7 Nov 2020 03:49:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45732 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727886AbgKGItt (ORCPT ); Sat, 7 Nov 2020 03:49:49 -0500 Received: from mail-yb1-xb49.google.com (mail-yb1-xb49.google.com [IPv6:2607:f8b0:4864:20::b49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9B33C0613CF for ; Sat, 7 Nov 2020 00:49:48 -0800 (PST) Received: by mail-yb1-xb49.google.com with SMTP id q83so4544978ybq.17 for ; Sat, 07 Nov 2020 00:49:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=6WU5XJ/qlfBh5YZsFPkg9rhMeyoErIKJCIfbV8EW5YE=; b=dD9J/n8G7DJiDwk4rEqBIeBWf32Gb+p1BKwuSv6yg96ucvQmYVFCsRDdSlkwibS1sE vPyCIx1hZ0qWhZV5w52bbGcZkVGWm/SUddyRyVZ/oi1ttKt6h9pRHwkIzrgqDjbV+Ad6 lbc3ZNGMQrH/srcf1Z+e4ajxyJTsdIMB/b5Ify3Riowa+xpccCWmS8jmsdvSNeLNUysU HtkF6iq2a06S9t/IEgfNd4wUvQLOEvSPYL61vslWy2sFYZYH3NBKoeFoM07Xf31CIg4J igW5BREAIj2RF32EduPaw4ARttk2oBAtxDR0Hjg5wp7nOtTpCf1f052oAmsMMCJoYae9 ahug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=6WU5XJ/qlfBh5YZsFPkg9rhMeyoErIKJCIfbV8EW5YE=; b=tTGNPxhtb/WTkfvKrV4r9Nrx9J/3sS+Q9JdL69TV91+VuAcxpc4iTCG5h4kVQlA97X xgI7LwdU7ZIM4GAPiYmJzROdjCrOIhSEmrB6LBWQqbyEn6ueX86hIKCX3CBhC8W4Sj78 1cCzcO0xrTZgy+r7juzE6PQtoGxhl+CY+nHkaITowts07971KGStkg85yXgSDBxqfSWA Q2wM/1KNsfO1ZkMdc3Rz+OX/EUcxkcvCItvheQ4Cd8smPLL/hNNLo5V0RJGBYh0ibuNH 2JqU8cYZIAuy2GmdbipeaKG4zG8IXkBPuziRj3EolMYfnBTTp4PSsRZ2jofhlN6DZal6 rRFw== X-Gm-Message-State: AOAM531oK/S0hnZg3a+SE6nYNcXRwvwxpQrrcetdfQh+kQjsVdDOwFkG VsP2e+uHK8Xy+fWw1Cqte4YPtguKXRxDDJyPPGI= Sender: "ndesaulniers via sendgmr" X-Received: from ndesaulniers1.mtv.corp.google.com ([2620:15c:211:202:f693:9fff:fef4:4d25]) (user=ndesaulniers job=sendgmr) by 2002:a25:8404:: with SMTP id u4mr3292320ybk.48.1604738988042; Sat, 07 Nov 2020 00:49:48 -0800 (PST) Date: Sat, 7 Nov 2020 00:49:39 -0800 In-Reply-To: Message-Id: <20201107084939.3512560-1-ndesaulniers@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.29.2.222.g5d2a92d10f8-goog Subject: [PATCH v2] ACPI: GED: fix -Wformat From: Nick Desaulniers To: "Rafael J . Wysocki" , Len Brown Cc: Ard Biesheuvel , Nick Desaulniers , Nathan Chancellor , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Clang is more aggressive about -Wformat warnings when the format flag specifies a type smaller than the parameter. It turns out that gsi is an int. Fixes: drivers/acpi/evged.c:105:48: warning: format specifies type 'unsigned char' but the argument has type 'unsigned int' [-Wformat] trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi); ^~~ Link: https://github.com/ClangBuiltLinux/linux/issues/378 Fixes: ea6f3af4c5e6 ("ACPI: GED: add support for _Exx / _Lxx handler methods") Acked-by: Ard Biesheuvel Signed-off-by: Nick Desaulniers --- drivers/acpi/evged.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.29.2.222.g5d2a92d10f8-goog diff --git a/drivers/acpi/evged.c b/drivers/acpi/evged.c index b1a7f8d6965e..fe6b6792c8bb 100644 --- a/drivers/acpi/evged.c +++ b/drivers/acpi/evged.c @@ -101,7 +101,7 @@ static acpi_status acpi_ged_request_interrupt(struct acpi_resource *ares, switch (gsi) { case 0 ... 255: - sprintf(ev_name, "_%c%02hhX", + sprintf(ev_name, "_%c%02X", trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi); if (ACPI_SUCCESS(acpi_get_handle(handle, ev_name, &evt_handle)))