From patchwork Mon Apr 12 08:41:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 419515 Delivered-To: patch@linaro.org Received: by 2002:a02:c4d2:0:0:0:0:0 with SMTP id h18csp1562442jaj; Mon, 12 Apr 2021 02:02:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyGDeTdcGLGMH5WDtn706/nT+47zt1iCg+aE3svQNRAaFT1cAPt5eo1cjrXDNWjtNvII4NF X-Received: by 2002:a17:902:52a:b029:e9:496d:4a55 with SMTP id 39-20020a170902052ab02900e9496d4a55mr25372016plf.83.1618218137783; Mon, 12 Apr 2021 02:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618218137; cv=none; d=google.com; s=arc-20160816; b=odgOhpjJdI7Ptw4lTDQkE1ziHRfQP7DXRxYSx0Xhx++rfgbAPB2jRWKAytKN4zj+XY ha/HkyBam/gv6bi70DxohwozR4UqDtbAUBGW2b7GjXEWKL502CbT5cwUeyvGiFG0mdTi 7htCiYx+GSxHbrAVckNpMJ4uVljndxnkeH48Zn65ndJzXOGsmMLkudDgDS7+92eRr8Gb qdaw1EvsfePj3AKrTT5gx2C9mT7WcYCKfbmSzVwy4qgkk/p3dvS6l4tmLB220X6EG7XT aMm1PwUWNZdjS2P9GJD1sKOnu4028732hFQeGnnR2nzUc6FP9Waqvrb+zLmVbhg9LhFT vL4w== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=2SG4c2Bfoh8bx0DucewTZI1AGK/0WgypQ5x0hSprm4Q=; b=mGJvp1NC0zUQhPeGCA/rCri904/V/eNF3qdbxfuvDtgphN99WPX1c/n01lS1YPsNWB DOpfS8/2V4RIHmfNixBzU7llsJsNHbw3j20Gkap1dOCwqM2oh6dP7sfyNTpXWcVba5na CO5+bgLMmuPhnFQFRAwYdq2kKf87+Fz49fskqQwSIgVdTdISR60Z+kydkpItq7GFHVn1 +S4GGuskfYw5QLvMhZ5HNQaE8tsvmkyp5kgMjVMJgezN5wXgSqfy/EDA6+x/vJzNXI74 q8gsKP+YlgbMYzLuqHgRWLTDENr9fS7XJ03b8L8AmEftSko3vhH22CGOPi9I6CYx5mgl k0KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=krMagAxS; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si13212109plr.283.2021.04.12.02.02.17; Mon, 12 Apr 2021 02:02:17 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=krMagAxS; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238698AbhDLJCN (ORCPT + 12 others); Mon, 12 Apr 2021 05:02:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:49450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239176AbhDLI7V (ORCPT ); Mon, 12 Apr 2021 04:59:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8562361247; Mon, 12 Apr 2021 08:57:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1618217862; bh=ycZ+K1QVjJVrFHKx6vy53aD6c9O5+ao7tn+zuFkruNw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=krMagAxSB8toyxdP+zpfbLYgjt1m6gtT3M/gH4ZPJQ2ByYlNSuDEc2dhyE1xwyrTP 1d1vRyo6WlNBk6m49xBLcPPeBQ7Q39YFKteI1WJwKBy0z+hs1rWZTC3OS+rfZj4Pw9 IL8uZw4BUi2NlSwIlWp/e36ITNryI6rp1pgmDwno= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , Ingo Molnar Subject: [PATCH 5.10 171/188] lockdep: Address clang -Wformat warning printing for %hd Date: Mon, 12 Apr 2021 10:41:25 +0200 Message-Id: <20210412084019.309502844@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210412084013.643370347@linuxfoundation.org> References: <20210412084013.643370347@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann commit 6d48b7912cc72275dc7c59ff961c8bac7ef66a92 upstream. Clang doesn't like format strings that truncate a 32-bit value to something shorter: kernel/locking/lockdep.c:709:4: error: format specifies type 'short' but the argument has type 'int' [-Werror,-Wformat] In this case, the warning is a slightly questionable, as it could realize that both class->wait_type_outer and class->wait_type_inner are in fact 8-bit struct members, even though the result of the ?: operator becomes an 'int'. However, there is really no point in printing the number as a 16-bit 'short' rather than either an 8-bit or 32-bit number, so just change it to a normal %d. Fixes: de8f5e4f2dc1 ("lockdep: Introduce wait-type checks") Signed-off-by: Arnd Bergmann Signed-off-by: Ingo Molnar Link: https://lore.kernel.org/r/20210322115531.3987555-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman --- kernel/locking/lockdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/kernel/locking/lockdep.c +++ b/kernel/locking/lockdep.c @@ -705,7 +705,7 @@ static void print_lock_name(struct lock_ printk(KERN_CONT " ("); __print_lock_name(class); - printk(KERN_CONT "){%s}-{%hd:%hd}", usage, + printk(KERN_CONT "){%s}-{%d:%d}", usage, class->wait_type_outer ?: class->wait_type_inner, class->wait_type_inner); }