Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp1046082rdg; Wed, 11 Oct 2023 12:41:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGSgxVKOfekr4ip2QuJOqitQdpwz9dROGnJoibnIJif+wvJfZ2fRTTQFCKnpIA72aBoYQOC X-Received: by 2002:a17:90b:1017:b0:279:1141:398b with SMTP id gm23-20020a17090b101700b002791141398bmr19737699pjb.26.1697053291240; Wed, 11 Oct 2023 12:41:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697053291; cv=none; d=google.com; s=arc-20160816; b=xt219tAOFSn+TzSu2t0dhNEAqr7yb7NerLnVlYDgkejWRTLRF39BuBNqs+DY6wW6s2 SVeTIqHMLDky1DsXqS/OI5MDmjGe9nAKTajukYVcdgluTTnWVsEi5CJG3tOBxKrJZ+bP 1is1wH6RWANcdeZeH712NXAkDtcAiSWjzI2Kiu3AlNJOT9u01LP9+yTaMaMCxaKSL+5l H/LOlIEYz4ID2lYEps/ppwfqsrE3/Si+aQcheV5unjrfvE28EpOIdW+pqqVTDW7oJFAP vnI0VT8U0iEobfabZyTDSXRmL/gU7Z/BJGrbVCL83bV1Zf8RKevzC19dKIoZfH6ZGDX6 N8/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=DT46mvsai3dcQ7w6RLEhQLhVfFCbLZVVFq4eIpm9OoU=; fh=WotfP48s6BrutivXIqRrzF4RPPTVIsSoUQDuICc445s=; b=VFC1B2GuNh0u9G8CIISWJ4uk99Mrl7aKf4lBa6XqFbKPQ1HRdv0zP9XdOvJ5+41D6q +S8qVfeUSzpoUW7bVjSjSiBat8E8JX5F2APtK7NClnlKns3g9Q3rY+XADtJZVV7TXY0F PgyDdSgrKutLwN3kgqhKEN4dscevtNKGUdYi1SrI4uVEi/OBz6Z1LRCu4CGrAkMy39N/ sDMgPiRIMQXBkDlJNkOBvuMB9JmO54daGTwY2ilF7JmN1LbyNVhMEJ8V9FYT6dcEdw9t YcYSLwgo7LxixGMPSEn+dyM/F12wAuIpCX0/3Rtr/Qqt5HCgajecbwQYLHuyTMozv5FP uEfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I9ADnPXs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id v15-20020a17090a088f00b002790e0af4aasi494817pjc.174.2023.10.11.12.41.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 12:41:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I9ADnPXs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (Postfix) with ESMTP id E63728050F97; Wed, 11 Oct 2023 12:41:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233369AbjJKTlT (ORCPT + 99 others); Wed, 11 Oct 2023 15:41:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43270 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233119AbjJKTlS (ORCPT ); Wed, 11 Oct 2023 15:41:18 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36BCE94; Wed, 11 Oct 2023 12:41:16 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80806C433C7; Wed, 11 Oct 2023 19:41:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697053275; bh=wyUZr0T2KKwwXCDYer3RRt6Sel9/hsansQuF2CNrmtU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=I9ADnPXsjFXvnmubhrjROigjHerM0TGu995M83tV13RmcZYKfisoONeqOnjXipMNM wZsPfYrMC4OC3hq0HKKKG0r/nvT2gp5LXVOr9fLAcylOnOcNvVKzPoaQiOvU7LWvxd Las82HeLIh7OIh5e2bSB0zQ8yFNqJuUkMTp1svH+AbFlMZvPC8AnqL/xBHYWfkJuvW Nv4OdhY5aBOPZP/1k8LZmqZBTW6mCv7BnKwNvTPmtQH2oc6ieAHgPgTKLZ0XLzWHVC BSi6fjq6Syn2H2ohjmQ3ia3FGlwN5ftnr5FSiNK0bUzYyer3UvjiI7l194BfwT69Sw Vj+e8JUiCla1A== Message-ID: Date: Wed, 11 Oct 2023 13:40:48 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 1/8] selftests: Add printf attribute to kselftest prints Content-Language: en-US To: Maciej Wieczor-Retman Cc: ilpo.jarvinen@linux.intel.com, Reinette Chatre , linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, shuah References: <13a47130763d109aa40de153ecbee9ede22d8356.1697012398.git.maciej.wieczor-retman@intel.com> From: Shuah In-Reply-To: <13a47130763d109aa40de153ecbee9ede22d8356.1697012398.git.maciej.wieczor-retman@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 11 Oct 2023 12:41:27 -0700 (PDT) X-Spam-Level: ** On 10/11/23 02:23, Maciej Wieczor-Retman wrote: > Kselftest header defines multiple variadic functions that use printf > along with other logic. > > There is no format checking for the variadic functions that use > printing inside kselftest.h. Because of this the compiler won't > be able to catch instances of mismatched printf formats and debugging > tests might be more difficult. > > Add the common __printf attribute macro to kselftest.h. > > Add __printf attribute to every function using formatted printing with > variadic arguments. > > Signed-off-by: Maciej Wieczor-Retman > Reviewed-by: Ilpo Järvinen > Reviewed-by: Reinette Chatre > --- > Changelog v4: > - Fix typo in patch subject. (Reinette) > - Add Reinette's reviewed-by tag. > I still need information on how you found these problems. Please add it to change log for each of these patches. I am seeing checkpatch warning: WARNING: Prefer __printf(a, b) over __attribute__((format(printf, a, b))) #102: FILE: tools/testing/selftests/kselftest.h:81: +#define __printf(a, b) __attribute__((format(printf, a, b))) thanks, -- Shuah