Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp4972546pxb; Sun, 13 Feb 2022 03:23:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyCiU1UQ0gFwKV+7V19Xb60WVkdrV+/MN9BR+6ge62OYTwSgVsb/9vLUu80yu634z3/AOOZ X-Received: by 2002:a17:90a:d157:: with SMTP id t23mr9228886pjw.193.1644751417591; Sun, 13 Feb 2022 03:23:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644751417; cv=none; d=google.com; s=arc-20160816; b=Lov3kWU8kZKWnF3VDsAE581Z1NrAPdSpD8gaCPV+AsWMNJEjQnmQxqkn0mlL/Q7BvU m2Ex/b4XeuNLv4Cf/JbPwM/n0NY5Al3IY7BFe6B4zoBM5FtxwXvd7CJO8HVpVDl/LU2t FLK/Rxjdw5qi29phcPiO2XUjt8O3efsGRzuRWJpNILI8fUEB2EFGixK9YT5AGe6kqNAL esDRG5nxgDxOuKDJObLXrOy9krAKG2w1Gwtw92T8zfJucHH3vEfNgx3XVkF9wxH411wt JmgB6qsXnN94qApaQUTHYilIyZEU/AZUpYW3GsqOG90P1hYed3AU3ysd9jy+xfYeWIug /B/g== 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:dkim-signature; bh=8jN3bHrs2SjohtF/Og+xdp1QXzW54h0HCo7HFf5/MZw=; b=ezw95z9Ki9nIJLkmWIXXamPQNbqYZq+fHvQ5p9IkzFvCbVRcTSjosGMgud/rhePhD5 +bKbhmVONtEG51FoI7x9Tf9P+rLEUzaWyL5zvRxWcoiEVpgQgKaqgJwnVFARg+wKGmiB h0BJDd9WI2TNzYnhlDAStQmcdK7OF73sdKd8rL2l/54032yDL/1Jlnum8f7BzpjyoaPs ODhXfEVLY8XZ6wIDQJF8jpXJ8xN2mvhemkjczQg35GbiiMTpCxTeY0bkRhoWJOZasmff f///PFLFHjhj2r0YfbMtPqVgllpFT+WT/oHocriCoQS0ZpI3UygQ/F3D7TPpUaQ5hGzS Stiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=eGO6WKGk; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j13si26892633pgk.413.2022.02.13.03.23.07; Sun, 13 Feb 2022 03:23:37 -0800 (PST) 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=@gmail.com header.s=20210112 header.b=eGO6WKGk; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233986AbiBMGvk (ORCPT + 99 others); Sun, 13 Feb 2022 01:51:40 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:39300 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233949AbiBMGvk (ORCPT ); Sun, 13 Feb 2022 01:51:40 -0500 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 255795DE4B for ; Sat, 12 Feb 2022 22:51:35 -0800 (PST) Received: by mail-pf1-x433.google.com with SMTP id i6so21854796pfc.9 for ; Sat, 12 Feb 2022 22:51:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8jN3bHrs2SjohtF/Og+xdp1QXzW54h0HCo7HFf5/MZw=; b=eGO6WKGk4GF2G1wmSF6YwpVCyUpzoU7kgAHkt2OWvZscvoVLb2sotXMmB0JArmFkdH GZxv240kCgeHEhPXTYzUDow84izMIzZxlfxRqdHQ6poqNxgqd3SBEdZaBIbOt2VfzCOz WB90oXtyxZJqjWoJkG72qtck4qMxHp+GNv+NNlHkFfVAzLOP6WpCXganJp/d3GKhz3Yp dDQ2IWWdYJRDLLYVl86vEf0KIoDIv6kqdWbViLcQzUP/6utM0FpBiWqZQKW5fLsjZNxa AqbUxPohLLEDKau9zLqZLxyzAnQdLrzEjf/iAMJb2D4TcTY3N0qUMmOdvnfMu8pjio9Y a0FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=8jN3bHrs2SjohtF/Og+xdp1QXzW54h0HCo7HFf5/MZw=; b=K86focrZ0ljOzY7UG5HOuN5yhyA+dSzMvZruTx1apyg2rQ/HDR5qHW5ycSeGLJtDAB mki8rxXAaRyVEMkK2+4TOjGCuDX5mXTd9QMzV8V+lJd6Pjtpnyrd77TFz/VMgD+pewm+ YySpaCngsWrTyxDcMPfPNcx2U+9AlaMiYsA19MInSPGL9qTxz34AiX8jqFXerJk7Rlwj nk0SBo+qOo/r/rBnZA8ZWp7mQzFCui9lIoAhGv64WCo+ic0FALaCBq49zxJbZhf0ZvCY gTFAEUTdCwBCf7WELKIEDps2txeUZhfF0sDffDEtV1pokf/pfq7g5TONFwc6rtiPqeJC 3Jww== X-Gm-Message-State: AOAM531Qn/HbWi1DmlG4Tj71OQzJmQKMOib+uIRTGquZ5QFzxU0rmB5W WdCw/NONdaEFT/0vZssDcaE= X-Received: by 2002:a63:d318:: with SMTP id b24mr7253607pgg.255.1644735094326; Sat, 12 Feb 2022 22:51:34 -0800 (PST) Received: from ubuntu-server.local (99-105-211-126.lightspeed.sntcca.sbcglobal.net. [99.105.211.126]) by smtp.googlemail.com with ESMTPSA id v2sm9794515pjt.55.2022.02.12.22.51.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 12 Feb 2022 22:51:34 -0800 (PST) From: Tong Zhang To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Daniel Vetter , Nathan Chancellor , Nick Desaulniers , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Cc: Tong Zhang Subject: [PATCH] drm/i915: fix build issue when using clang Date: Sat, 12 Feb 2022 22:51:06 -0800 Message-Id: <20220213065106.48062-1-ztong0001@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 drm/i915 target adds some extra cflags, especially it does re-apply -Wall. In clang this will override -Wno-format-security and cause the build to fail when CONFIG_DRM_I915_WERROR=y. While with GCC this does not happen. We reapply -Wno-format-security here to get around this issue. drivers/gpu/drm/i915/gt/intel_gt.c:983:2: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security] GEM_TRACE("ERROR\n"); ^~~~~~~~~~~~~~~~~~~~ ./drivers/gpu/drm/i915/i915_gem.h:76:24: note: expanded from macro 'GEM_TRACE' #define GEM_TRACE(...) trace_printk(__VA_ARGS__) ^~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:369:3: note: expanded from macro 'trace_printk' do_trace_printk(fmt, ##__VA_ARGS__); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ./include/linux/kernel.h:383:30: note: expanded from macro 'do_trace_printk' __trace_bprintk(_THIS_IP_, trace_printk_fmt, ##args); \ ^~~~~~~~~~~~~~~~ drivers/gpu/drm/i915/gt/intel_gt.c:983:2: note: treat the string as an argument to avoid this Signed-off-by: Tong Zhang --- drivers/gpu/drm/i915/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 1b62b9f65196..c04e05a3d39f 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -13,6 +13,7 @@ # will most likely get a sudden build breakage... Hopefully we will fix # new warnings before CI updates! subdir-ccflags-y := -Wall -Wextra +subdir-ccflags-y += -Wno-format-security subdir-ccflags-y += -Wno-unused-parameter subdir-ccflags-y += -Wno-type-limits subdir-ccflags-y += -Wno-missing-field-initializers -- 2.25.1