Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp860904iol; Thu, 9 Jun 2022 16:04:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxg8FC8W3vDoCyPwkPU+hl0XU39upl+CjQJLMl8o+ElGtmeuYpa6Pz2VWA53cX0zYBUdheZ X-Received: by 2002:a17:906:e2d3:b0:711:d2e5:cc48 with SMTP id gr19-20020a170906e2d300b00711d2e5cc48mr19366100ejb.9.1654815896603; Thu, 09 Jun 2022 16:04:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654815896; cv=none; d=google.com; s=arc-20160816; b=g0PDEvrci3JjfpH+jWsaHAiMUibjs5aVcVsKcGm0UdBzr9BzOHGcZy05fkExC9XxqR Zdob7qopdt9t2uW0fDHuF1kWwL2Oz9n/WBPz8sHTLpbSPqOxIfd79VQk/t/BfVhjuIh5 LzcBzNciyOwkNqJQ/8NuC4wx7sseUVAT+/spMzEHIoN4JLqVnKRKaCxjhAYG9tdUWWPG FSHYamCKCXhdefOpe0QEpBzTOAGGixS/6CzuqaI5DIbw9dDO3JDu0xpZLKfppqikZAKT 4YK4wAbO262Q868llEkB27jngEKG+RfCGZ2xgn9B800+VqIOdopEiJzubmu+CmQAitoD r2yA== 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=qfaKip6DwFGW+guGsE2/HUgOUCf7B/ryBL2HyFI8yyY=; b=Wh33XS7rez3ysAtgxURmGhn5veGgBHGwZqq92pTh44q/HVRq4YCCLejtXIfMoblzMy zl1MHcM/1wBEccBzdvCoK+dDVsZhIPtZxZORtUOqITKqNi1PlPT+oXZrnENUd3TUKilY BRlmJn4rlZLmcnBxEp70RA690Swci+1RImmEWyr96sXwbxOSJeovGeJfguL/GtX8j/gv B1rrVOzJHc5vY4wrS1ErfslCNTrw2vZREnxqME2aCKoRdPOXPzUZta9QunIooa/oMAro s2AOciZl8Mpsibz61trlLsv6Bmeri6LnjBdY0hdFJ+gynf+8NFTsG2qng4ZUcLn/pC6S huEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=rmDrQmu6; 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 t2-20020a1709066bc200b006ff0fb360ffsi5676338ejs.10.2022.06.09.16.04.27; Thu, 09 Jun 2022 16:04:56 -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=rmDrQmu6; 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 S1345783AbiFIWUV (ORCPT + 99 others); Thu, 9 Jun 2022 18:20:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54004 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345729AbiFIWUO (ORCPT ); Thu, 9 Jun 2022 18:20:14 -0400 Received: from mail-pf1-x44a.google.com (mail-pf1-x44a.google.com [IPv6:2607:f8b0:4864:20::44a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFF419D4C7 for ; Thu, 9 Jun 2022 15:19:56 -0700 (PDT) Received: by mail-pf1-x44a.google.com with SMTP id u67-20020a627946000000b0051b9c1256b0so12978782pfc.9 for ; Thu, 09 Jun 2022 15:19:56 -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=qfaKip6DwFGW+guGsE2/HUgOUCf7B/ryBL2HyFI8yyY=; b=rmDrQmu6i0rMhVWryy+1sSregBQbx8EzAhxguI/zyywENeaveJeync1WHxdDli/I7V XVFwNwX1LL/Eb2t1qJzoo+LZL4V651eslhmMESIosQ4CzFZqJ/XMZIcgfWh+ijuJ9S4U DE9dfzo5xGMJQHKyVBlVHIJPFhw5ayon8gNdeY1wYxrm/5naZOHI7yvxx4lN8IU/5Vsd Jrf74AJMKR+h5WOopQkEY05HkO30nH18xX4D85TjTMQIbL0iAHDhYHUPur2amaBP1CL6 RS8eMppIKQevbuQilaLP804yNxwZ9Wuv+YrNiMwDfjRjNIKBMBVfcgDhrLJV95/xQEbr 74gA== 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=qfaKip6DwFGW+guGsE2/HUgOUCf7B/ryBL2HyFI8yyY=; b=CoYqJ4eKC1oKQTA7VRKNgenQFfvthb/Oo5RSVu9dYzFFyIv1zOYSQM8aB9z+yKL5Yk gBDGZZyr6IMo8eANcJJh/UYSKCUNrelz6N+NNyslnY9AFSJ+kmKYi1q/8oOhnYszWL3g oWGCCzM1YqVrfqTDKFh9WGC4StH+nKZTWDsCfSvZHsY+YAYC2I/pxswkkeMOO8oaMSRW N6u5FLo05zvEu6xY0ggZmTZVQCjeP6GniYAPTUus75ol0myLZPp3TeOD92ukNwIfLBWN m0CE3IBAoNkpRkOfFEP8ZjHmmJXrUv6GxmYkNCcJoLfa3ddFcrjhLabCWd+BV1q66mPR vNdQ== X-Gm-Message-State: AOAM5335cxOqB2yHaInMUjoDq0uXT7FmRaxFmtAUKHEJFAofKD52x7gz SBzF2zkhfQgq1h4lgP+k/vBSrinn X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a62:1687:0:b0:50d:3364:46d4 with SMTP id 129-20020a621687000000b0050d336446d4mr42409947pfw.74.1654813195848; Thu, 09 Jun 2022 15:19:55 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:26 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-8-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 07/12] driver/char: 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 , Daniel Kiper , Ross Philipson , 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/char/mem.c:775:16: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] NULL, devlist[minor].name); ^~~~~~~~~~~~~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- drivers/char/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 84ca98ed1dad..32d821ba9e4d 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c @@ -772,7 +772,7 @@ static int __init chr_dev_init(void) continue; device_create(mem_class, NULL, MKDEV(MEM_MAJOR, minor), - NULL, devlist[minor].name); + NULL, "%s", devlist[minor].name); } return tty_init(); -- 2.36.1.255.ge46751e96f-goog