Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp848760iol; Thu, 9 Jun 2022 15:47:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgt+8Rvu47rnvSBpv6+1wKOVx0a/ge2azEnsVPRCp9aesxTdFl+XCbA5UrT1/0uXoxM7ou X-Received: by 2002:a17:902:efc6:b0:167:8177:60a7 with SMTP id ja6-20020a170902efc600b00167817760a7mr21748441plb.110.1654814825711; Thu, 09 Jun 2022 15:47:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654814825; cv=none; d=google.com; s=arc-20160816; b=tMepLBTOYHYxsJtqa14hzAG2i5XRJoaFnss1OowAgnHNlxLlK+4dhDNinZjWwftZ85 +SVhZqWu+L2kBlnz+Lt37YXwYv49hgAXdCOXcOl04jAubYUkHQUp9xjrHCpzLNfy3ovi IlZwMEinULgbWXOqClTEVPgaOKgvihTi98sICuGFj7Q12Ltpz+LKhRQyzI3OpAFP22Fd dSVyNdIVkrh3bPdaQP2o9HSN2AN0ZOnXaTSt9B/UYdOZALqcMBXd8Gu+zfvZGbjADDPe TisAtKF89tpqgFhwDYinf8duVLpJroeXFEHmci9mOXFQRT8iqsKSZbIvpEkaKMihSIlI 3Ytw== 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:dkim-signature; bh=VtmBCpNp1KP0Wih0wNtSn6S6eDN4r8qEfTH0S3sfDvI=; b=QOETBZRwcNJBGp3rnu4nyBAw4sX1e8/qz6TWFPYCcFBuHovFw2EfgbXxsGbj2GnjdM wxtr5Ku9tVrRaRbr2e2QnKCJhtOAaqKkCyh2wBV28M/hx9ss15oyd4pYUw2XxFWaVK5o XjTtWL/rWoKO1Rg0yZ07TkHVcMIMusVtHpu4b32dBcD5IhQw4W+DOGgti7qCtlyvDfsw Mo4X3Cf/ttCOqAKZSV6YBcxRl0sWul9fXnzcyPhcnwjsKX6h0EwXiRSUlN6v1K1JKD5T 8B3Juy+9xJ9rTM23cI3Fu/8fSta+DCXFhiekZKB/tRyRP8sX8IWTBfgQYhySdoySGKcI y+bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=k5UJiPwa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d12-20020a170902cecc00b00163f8ddf15asi37055592plg.478.2022.06.09.15.46.52; Thu, 09 Jun 2022 15:47:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=k5UJiPwa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 S1345593AbiFIWTy (ORCPT + 99 others); Thu, 9 Jun 2022 18:19:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345677AbiFIWTt (ORCPT ); Thu, 9 Jun 2022 18:19:49 -0400 Received: from mail-pg1-x549.google.com (mail-pg1-x549.google.com [IPv6:2607:f8b0:4864:20::549]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4C544BFC7 for ; Thu, 9 Jun 2022 15:19:33 -0700 (PDT) Received: by mail-pg1-x549.google.com with SMTP id 37-20020a630a25000000b003fdcbe1ffc8so6689759pgk.11 for ; Thu, 09 Jun 2022 15:19:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=VtmBCpNp1KP0Wih0wNtSn6S6eDN4r8qEfTH0S3sfDvI=; b=k5UJiPwakkG5FRIZZ5lAwSHv1cl5CV0HckKotKPvFRLB2rm04skCRUAH92Ocj74nI8 VRgM32h5RM5BUgSugbEFBV15QskHdJF/UARg45aXgMXIqpE44JaqgZSOgpAQZ1jpikDb GULMqiClDzX4kfuE9w7o93QGAbqsh6kUT85oC3PEd1vaEzeRnphtmpPAmbhnAhgk6lx0 LnkSW18ZNlDn2dA0I8HZDUuV5QwUSYnjU7SGR9fWBj1oQGC+opt0AKeg9qvISijvMYMC exN/sa9O/SGU7ijyDd9mK0GdtUUcbGfySNVXrOfDrxnggsEQ+nfu/2kYPptx+0sLFFrT DcWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=VtmBCpNp1KP0Wih0wNtSn6S6eDN4r8qEfTH0S3sfDvI=; b=sefVy2076AcGSw517pYX8KBuyHyBHgzukhie9G6CEQ30/AHvPmFqmTiqiWEKwbef6N tBUQ0qy/anx4wh33JA/G17WDSyyps2/K5JA1p6zl/k0QAKfnSqDbrHV4apID+s/ZtYID id/KASOt/QxTm6crSTANMD+1tBIff5SzRanl4tA2elGpPJxqRjAIX2VvmVhg5hQPbr25 5iCiI4oOy7jB7Rw1s2cLP9A7kc9aDYVD72gxO5kIAWz2OX/XIoWQ3yPA14PvSiU0X5Zw dpCphpSavDaklzFjFuXjxV4bI5wPIjgOr1Uo/y04JiKlVN5KVcls7einPfmLrG9OKAiv NlgQ== X-Gm-Message-State: AOAM532+oC5M4IyiplXD3DpyfRQeCxR3/P41N8JoDLFG5d37NqS4vPRU qPJJUMyZar8+T783wF9Xd++OGSIB X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a63:4722:0:b0:3fb:94a7:9986 with SMTP id u34-20020a634722000000b003fb94a79986mr36618043pga.531.1654813173379; Thu, 09 Jun 2022 15:19:33 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:25 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-7-morbo@google.com> Mime-Version: 1.0 References: <20220609221702.347522-1-morbo@google.com> X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog Subject: [PATCH 06/12] PNP: use correct format characters From: Bill Wendling To: isanbard@gmail.com Cc: Tony Luck , Borislav Petkov , Thomas Gleixner , Ingo Molnar , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Phillip Potter , Arnd Bergmann , Greg Kroah-Hartman , "Rafael J. Wysocki" , Jan Kara , Andrew Morton , Pablo Neira Ayuso , Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Jaroslav Kysela , Takashi Iwai , Nathan Chancellor , Nick Desaulniers , Tom Rix , Ross Philipson , Daniel Kiper , linux-edac@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, alsa-devel@alsa-project.org, llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: drivers/pnp/interface.c:273:22: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] pnp_printf(buffer, pnp_resource_type_name(res)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- drivers/pnp/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c index 44efcdb87e6f..553221a0c89a 100644 --- a/drivers/pnp/interface.c +++ b/drivers/pnp/interface.c @@ -270,7 +270,7 @@ static ssize_t resources_show(struct device *dmdev, list_for_each_entry(pnp_res, &dev->resources, list) { res = &pnp_res->res; - pnp_printf(buffer, pnp_resource_type_name(res)); + pnp_printf(buffer, "%s", pnp_resource_type_name(res)); if (res->flags & IORESOURCE_DISABLED) { pnp_printf(buffer, " disabled\n"); -- 2.36.1.255.ge46751e96f-goog