Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp1774926rdh; Sat, 25 Nov 2023 02:38:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IEs94smGasC1UPqwbumAKEcreogvcwYieWUx17irGEqRjEJ2w2UsbS6DXCsodzIRKNdDL1P X-Received: by 2002:a05:6359:1501:b0:16e:3719:e621 with SMTP id jt1-20020a056359150100b0016e3719e621mr80284rwb.18.1700908737297; Sat, 25 Nov 2023 02:38:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700908737; cv=none; d=google.com; s=arc-20160816; b=DcLTVvOFihdz6rQzajcC2WDnavNNxsi8/u0N8L3ERav1BUsZikkB3CZw/DJCPda3w0 ktEeBpNe3YPc7DTPGJhLTQ7OZAAJ0zJymkQSl5aiDWwgZnSnqs4yauCSQuOnzE/G538G FI/vMJoRbh5wxaZERCG4hgqBW3YtqUVqfJBn9Ntj6HLHgfzM5wz23LGnjjPG8UAtZBAu ajurBHVDhKmgTDDq92+NPv5B2wKjXy6AtZFmw5o3+Pu6WIbcoxEnQb51YvD/gErg8ZOl CmPLUnBjQIxuFZdffkAAYJpp3+1w0PGc2i3dkvDENKhnhK4bekH65gc2NFrafsumfvOh wRRQ== 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=PXFneQjP6zgIu5wP25pIwVR/uw+BBfx38amLHoRbtvU=; fh=F+Qhsb4TVrOlwRrBD6xyWmL3Oi8a5RmaiYFzloXnqNA=; b=Dy27wF/l/RtwSxU6nK/5LqNOGaC36Hk5qoI9Kz36/5KWmjGcymQ5vl33IvmoPZrsTT VkBk/cdGsx9zYxIWlSsNb+Kxy7HLvhIxvMLelZ0cbksueYTAF+K48OGQnEwVhUwX5q5d WXZMxclQXcKUVCgx2mKqM97uHt2ujRFqbL0AWm+akxiALf5G7MKocpjjzItdlxEoaB19 etcTFGz2tgTwrGvmOuuZrfwMY1g3L5SG8simUnULn8RTBSRVOl3h7oe3b7VyfEEVnow/ joNUpXQ6TOnPVxElycaS7/dcsKxZmA4smHcE1QmTp8GkYkuNsnPlmKHvorbFonWWWTNd tVzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MVlOFapV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id l19-20020a635b53000000b0058986c61bb6si5377629pgm.706.2023.11.25.02.38.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Nov 2023 02:38:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MVlOFapV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B5D4B807860E; Sat, 25 Nov 2023 02:38:54 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231856AbjKYKik (ORCPT + 99 others); Sat, 25 Nov 2023 05:38:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232023AbjKYKbZ (ORCPT ); Sat, 25 Nov 2023 05:31:25 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88D6E10E4 for ; Sat, 25 Nov 2023 02:31:32 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4015CC433C8; Sat, 25 Nov 2023 10:31:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1700908292; bh=1NjYyVMTbEYrYJbWYo16fYRJ4go93r4tTFjTVNLyfms=; h=From:To:Cc:Subject:Date:From; b=MVlOFapVpx90KH1wMWShYB/xzzNDh16Atogs82J3zghXoqUFi+xcapJ6fODrvVGTj f8PKozrX4yioUdDuibC4/52x5/HDy9jh35vyHoK+iBupoTA71fJr+6k4z6645jg/H3 1DeDWjz3kfsDpEBTUtmK/rSdVRrAMSH8fE0niSrFj27KTeohvchgKXObM8Yv+iBfH0 zwpEh9eRbOZOChuT7cADbeikGoVOADxGNRSWqov7vBf+f+53FjfsWulDh6Q92P88FW ydTuV0NieSNCF0TTpjTj4wRpSEmRMBggu7emM7j7pbGQcOdiGN2CUYYWPjgOS4m9qy FTIcDOzAUT3fw== From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Nathan Chancellor , Nicolas Schier , Masahiro Yamada Subject: [PATCH 1/3] modpost: move __attribute__((format(printf, 2, 3))) to modpost.h Date: Sat, 25 Nov 2023 19:31:14 +0900 Message-Id: <20231125103116.797608-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Sat, 25 Nov 2023 02:38:54 -0800 (PST) This attribute must be added to the function declaration in a header for comprehensive checking of all the callsites. Fixes: 6d9a89ea4b06 ("kbuild: declare the modpost error functions as printf like") Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 3 +-- scripts/mod/modpost.h | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index cb6406f485a9..ca0a90158f85 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -60,8 +60,7 @@ static unsigned int nr_unresolved; #define MODULE_NAME_LEN (64 - sizeof(Elf_Addr)) -void __attribute__((format(printf, 2, 3))) -modpost_log(enum loglevel loglevel, const char *fmt, ...) +void modpost_log(enum loglevel loglevel, const char *fmt, ...) { va_list arglist; diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 69baf014da4f..9fe974dc1a52 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -197,7 +197,8 @@ enum loglevel { LOG_FATAL }; -void modpost_log(enum loglevel loglevel, const char *fmt, ...); +void __attribute__((format(printf, 2, 3))) +modpost_log(enum loglevel loglevel, const char *fmt, ...); /* * warn - show the given message, then let modpost continue running, still -- 2.40.1