From patchwork Thu Jun 9 22:16:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Wendling X-Patchwork-Id: 580381 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 39CC9CCA47E for ; Thu, 9 Jun 2022 22:18:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345616AbiFIWSy (ORCPT ); Thu, 9 Jun 2022 18:18:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345604AbiFIWSy (ORCPT ); Thu, 9 Jun 2022 18:18:54 -0400 Received: from mail-pl1-x64a.google.com (mail-pl1-x64a.google.com [IPv6:2607:f8b0:4864:20::64a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A8F9D47ACA for ; Thu, 9 Jun 2022 15:18:48 -0700 (PDT) Received: by mail-pl1-x64a.google.com with SMTP id u22-20020a170902a61600b0016363cdfe84so13409257plq.10 for ; Thu, 09 Jun 2022 15:18:48 -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=HlrKEzC+OauxSUT5xZtPYeK0f3N3z3B8pf9PvEyK7vc=; b=qNUPK/S5iHdXgPK57Bkixsq++QOQQMHfyV6r2MtPs7v9I3SUg8azHVdlWi+Vmpdk0V e9swXJWEpf/dXShWMQkD9tdieecIjQpQiuIyNIyGp6c4DhP+OHtn6lVN3Jb0aUWnt0zX 6WRDoSX5skQyQJy1DXGgbB1frbSREBbKFeP8ovCXNP1nwpzQihNeuZDVsxzVVQEW/FTO oasKzV38q06qXK4hlfrcDIvuu6az9YMh+LOMOYwAEM/GaKPtPsyF6cfogObTYmCvxbsF HDhlFK8BOzg5MG7pql3z3B69jG4uxkigcwMhH0FMhZG9+AiHWiMvxTL/b/XFzI/yrt60 XE4w== 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=HlrKEzC+OauxSUT5xZtPYeK0f3N3z3B8pf9PvEyK7vc=; b=yCCg3f114XP406m+PyUrAFO54c91EKxZFfB8tdx+UDbCuVmAkze8HoEt0yAt6v7tIy fvda/qREs7JG3WagbC6HWyKYbCz6zN/gq8aMjftZhkXkhbOLs+KOV8etrhwDg2AkB7wQ Wneg47Hd/MIRKbng2EvK5RziZIeYwVgbFdXvEYPeUsAAx43/YN+BBgPEqdY/PC9/Ppm1 0+7JgZAtE2rrVd8RlMeGYER8iR+Ita/XlmCWriUAUyhxs/y8Ufefx4bU72V2NYSWbAU+ /u1tZ2d7tR8OcZYSP+2ALDbwXCdrE/BeJXOa/FBfxWT5F31idvJPTl/DXmc3ILbShYBP RhAg== X-Gm-Message-State: AOAM531AM6YTYv0uPoOHTuiM4M0xU8NPz/rpyvMDbBbsypjMuKe016J4 VlVFwqH/Mi9CYgxbDF6m/hddSx5B X-Google-Smtp-Source: ABdhPJxktSZZjGsZMg+ncs7oCo7UsGcqz2MItXnZVpN7aAWxKCb/sSBN71lrVJLJ6nxui+334t4TDARu1w== X-Received: from fawn.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5795]) (user=morbo job=sendgmr) by 2002:a63:5924:0:b0:3fb:a75e:9e8a with SMTP id n36-20020a635924000000b003fba75e9e8amr36694755pgb.394.1654813127925; Thu, 09 Jun 2022 15:18:47 -0700 (PDT) Date: Thu, 9 Jun 2022 22:16:23 +0000 In-Reply-To: <20220609221702.347522-1-morbo@google.com> Message-Id: <20220609221702.347522-5-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 04/12] blk-cgroup: 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 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bill Wendling When compiling with -Wformat, clang emits the following warnings: mm/backing-dev.c:880:57: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] dev = device_create(bdi_class, NULL, MKDEV(0, 0), bdi, bdi->dev_name); ^~~~~~~~~~~~~ Use a string literal for the format string. Link: https://github.com/ClangBuiltLinux/linux/issues/378 Signed-off-by: Bill Wendling --- mm/backing-dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index ff60bd7d74e0..7b7786dceff3 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -877,7 +877,7 @@ int bdi_register_va(struct backing_dev_info *bdi, const char *fmt, va_list args) return 0; vsnprintf(bdi->dev_name, sizeof(bdi->dev_name), fmt, args); - dev = device_create(bdi_class, NULL, MKDEV(0, 0), bdi, bdi->dev_name); + dev = device_create(bdi_class, NULL, MKDEV(0, 0), bdi, "%s", bdi->dev_name); if (IS_ERR(dev)) return PTR_ERR(dev);